Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I generated cpp files from DDS_Data.idl file . and error occured. it's report imformation likes below. please give me a help! #398

Open
senses1 opened this issue Sep 12, 2024 · 6 comments
Labels
need more info More information is required to reproduce

Comments

@senses1
Copy link

senses1 commented Sep 12, 2024

/home/people/Fast-DDS-Gen-master/scripts# ./fastddsgen ./DDS_Data.idl
openjdk version "19.0.2" 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-Ubuntu-0ubuntu322.04)
OpenJDK 64-Bit Server VM (build 19.0.2+7-Ubuntu-0ubuntu322.04, mixed mode, sharing)
Processing the file DDS_Data.idl...
ERROR: context [/struct_type /extensibility] 1:5 no such property or can't access: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java:163)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:87)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1222)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:216)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:755)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:687)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:291)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.ST.write(ST.java:432)
at com.eprosima.idl.generator.manager.TemplateGroup.setAttribute(TemplateGroup.java:100)
at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:352)
at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:867)
at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:697)
at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:466)
at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1641)

ERROR: context [/struct_type /extensibility] 1:5 no such property or can't access: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java:163)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:87)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1222)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:216)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:755)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:687)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:291)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.ST.write(ST.java:432)
at com.eprosima.idl.generator.manager.TemplateGroup.setAttribute(TemplateGroup.java:100)
at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:352)
at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:867)
at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:697)
at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:466)
at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1641)

ERROR: context [/struct_type /extensibility] 1:5 no such property or can't access: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java:163)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:87)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1222)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:216)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:755)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:687)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:291)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.ST.write(ST.java:432)
at com.eprosima.idl.generator.manager.TemplateGroup.setAttribute(TemplateGroup.java:100)
at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:352)
at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:867)
at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:697)
at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:466)
at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1641)

ERROR: context [/struct_type /extensibility] 1:5 no such property or can't access: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java:163)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:87)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1222)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:216)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:755)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:687)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:291)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.ST.write(ST.java:432)
at com.eprosima.idl.generator.manager.TemplateGroup.setAttribute(TemplateGroup.java:100)
at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:352)
at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:867)
at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:697)
at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:466)
at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1641)

ERROR: context [/struct_type /extensibility] 1:5 no such property or can't access: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java:163)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:87)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1222)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:216)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:755)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:687)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:291)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.ST.write(ST.java:432)
at com.eprosima.idl.generator.manager.TemplateGroup.setAttribute(TemplateGroup.java:100)
at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:352)
at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:867)
at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:697)
at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:466)
at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1641)

@JesusPoderoso
Copy link
Contributor

Hi @senses1, thanks for your report.
Which Fast DDS-Gen version are you using?
And which Linux distribution?
Could you share the .idl file content?
Thanks!

@JesusPoderoso JesusPoderoso added the need more info More information is required to reproduce label Sep 12, 2024
@senses1
Copy link
Author

senses1 commented Sep 20, 2024

openjdk version "19.0.2" 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-Ubuntu-0ubuntu322.04)
OpenJDK 64-Bit Server VM (build 19.0.2+7-Ubuntu-0ubuntu322.04, mixed mode, sharing)
fastddsgen version 4.0.0

IDL content is below:
`// 激光雷达数据
struct LaserData
{
sequence ranges;
sequence intensity;
unsigned long long time_stamp;
};

//机器人位姿
struct RobotPose
{
float pose_x;
float pose_y;
float pose_theta;
};

//机器人轮速
struct WheelSpeed
{
unsigned long speed_l;
unsigned long speed_r;
};

//机器人速度
struct Velocity
{
// 线速度
float v;
// 角速度
float w;
};

//机器人码盘值
struct Encoder
{
// 左
unsigned long enc_l;
// 右
unsigned long enc_r;
};

// 车体参数
struct RobotParams
{
//使用地图id
unsigned long map_id;
//机器人位姿
RobotPose pose;
//机器人轮速
WheelSpeed robot_speed;
//激光避停状态
boolean laser_blocking;
//电池充电次数
unsigned long charge_cycles;
//车体工作时长
unsigned long working_time;
//车体当前运行模式 ,auto/manual
unsigned long moving_status;
};`

@senses1
Copy link
Author

senses1 commented Sep 20, 2024

addtionally
1 I removed all comments .
2 I removed all comments and left only one struct of any one .
it sttill report this information.

@JesusPoderoso
Copy link
Contributor

Hi @senses1, I could not reproduce your issue, but your idl is malformed.
Mind that the sequence needs to be followed by the data type (check the sequence section of Fast DDS-Gen documentation).
Once that is addressed, the code should be generated successfully.

@senses1
Copy link
Author

senses1 commented Sep 20, 2024

thanks @JesusPoderoso ,but I make the idl simple like:
struct RobotPose
{
float pose_x;
float pose_y;
float pose_theta;
};
it still report error:
root@DESKTOP-A2ICLLO:/home/tby/Fast-DDS-Gen-master/scripts# ./fastddsgen ./DDS_Data.idl
openjdk version "19.0.2" 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-Ubuntu-0ubuntu322.04)
OpenJDK 64-Bit Server VM (build 19.0.2+7-Ubuntu-0ubuntu322.04, mixed mode, sharing)
Processing the file DDS_Data.idl...
ERROR: context [/struct_type /extensibility] 1:5 no such property or can't access: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
Caused by: org.stringtemplate.v4.misc.STNoSuchPropertyException: no such property: com.eprosima.fastdds.idl.parser.typecode.StructTypeCode.annotationExtensibilityNotApplied
at org.stringtemplate.v4.misc.ObjectModelAdaptor.throwNoSuchProperty(ObjectModelAdaptor.java:163)
at org.stringtemplate.v4.misc.ObjectModelAdaptor.getProperty(ObjectModelAdaptor.java:87)
at org.stringtemplate.v4.Interpreter.getObjectProperty(Interpreter.java:1222)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:216)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.Interpreter.writeObject(Interpreter.java:755)
at org.stringtemplate.v4.Interpreter.writeObjectNoOptions(Interpreter.java:687)
at org.stringtemplate.v4.Interpreter._exec(Interpreter.java:291)
at org.stringtemplate.v4.Interpreter.exec(Interpreter.java:151)
at org.stringtemplate.v4.ST.write(ST.java:432)
at com.eprosima.idl.generator.manager.TemplateGroup.setAttribute(TemplateGroup.java:100)
at com.eprosima.idl.parser.grammar.IDLParser.specification(IDLParser.java:352)
at com.eprosima.fastdds.fastddsgen.parseIDL(fastddsgen.java:867)
at com.eprosima.fastdds.fastddsgen.process(fastddsgen.java:697)
at com.eprosima.fastdds.fastddsgen.execute(fastddsgen.java:466)
at com.eprosima.fastdds.fastddsgen.main(fastddsgen.java:1641)

@senses1
Copy link
Author

senses1 commented Sep 23, 2024

I move back to 2.2.1 ,it does not show this error infomation .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info More information is required to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants