-
Notifications
You must be signed in to change notification settings - Fork 276
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
Hello world plugin added #699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. I don't think this is being compiled right now, because there's no CMakeLists
file.
This also seems to be very similar to SampleSystem. Maybe that example can be improved instead of adding another one? What are you envisioning Hello_world
to help with that isn't accomplished by SampleSystem
?
@chapulina, I have added the CMakeLists.txt file. |
Well, my only intention is to add a proper Hello world file just like the one in Gazebo classic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, my only intention is to add a proper Hello world file just like the one in Gazebo classic.
Got it, you're talking about this one, right?
https://github.com/osrf/gazebo/tree/gazebo11/examples/plugins/hello_world
I have added the CMakeLists.txt file.
Our CI is failing because this plugin can't be compiled. Have you tried compiling it locally?
Can you also add a README
to the plugin's folder like the newest example plugins have? See this for example. While working on the README, you should also follow the steps to check that the plugin works for you.
Current build failures
2021-03-22T20:24:36.7352330Z [ 50%] Building CXX object CMakeFiles/Hello_world.dir/Hello_world.cc.o
2021-03-22T20:24:36.7353488Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:6:19: error: expected '{' before ';' token
2021-03-22T20:24:36.7354229Z namespace ignition;
2021-03-22T20:24:36.7354624Z ^
2021-03-22T20:24:36.7355519Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:7:17: error: expected '{' before ';' token
2021-03-22T20:24:36.7356257Z namespace gazebo;
2021-03-22T20:24:36.7356625Z ^
2021-03-22T20:24:36.7357527Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:8:18: error: expected '{' before ';' token
2021-03-22T20:24:36.7358253Z namespace systems;
2021-03-22T20:24:36.7358638Z ^
2021-03-22T20:24:36.7359622Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:15:1: error: qualified name does not name a class before '{' token
2021-03-22T20:24:36.7360344Z {
2021-03-22T20:24:36.7360640Z ^
2021-03-22T20:24:36.7361526Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:18:1: error: 'Hello_world' does not name a type
2021-03-22T20:24:36.7362570Z Hello_world::Hello_world() : System(), dataPtr(std::make_unique<Hello_world>())
2021-03-22T20:24:36.7363106Z ^~~~~~~~~~~
2021-03-22T20:24:36.7364162Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:26:6: error: 'MyPlugin' has not been declared
2021-03-22T20:24:36.7365051Z void MyPlugin::Configure(const Entity &_entity,
2021-03-22T20:24:36.7365529Z ^~~~~~~~
2021-03-22T20:24:36.7366443Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:26:32: error: 'Entity' does not name a type
2021-03-22T20:24:36.7367276Z void MyPlugin::Configure(const Entity &_entity,
2021-03-22T20:24:36.7367764Z ^~~~~~
2021-03-22T20:24:36.7368842Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:28:5: error: 'EntityComponentManager' has not been declared
2021-03-22T20:24:36.7369861Z EntityComponentManager &_ecm,
2021-03-22T20:24:36.7370360Z ^~~~~~~~~~~~~~~~~~~~~~
2021-03-22T20:24:36.7371326Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:29:5: error: 'EventManager' has not been declared
2021-03-22T20:24:36.7372152Z EventManager &/*_eventMgr*/)
2021-03-22T20:24:36.7372580Z ^~~~~~~~~~~~
2021-03-22T20:24:36.7373707Z /github/workspace/examples/plugin/Hello_world/Hello_world.cc:37:20: error: expected constructor, destructor, or type conversion before '(' token
2021-03-22T20:24:36.7374890Z IGNITION_ADD_PLUGIN(Hello_world, System, Hello_world::ISystemConfigure)
2021-03-22T20:24:36.7375489Z ^
2021-03-22T20:24:36.7376482Z CMakeFiles/Hello_world.dir/build.make:62: recipe for target 'CMakeFiles/Hello_world.dir/Hello_world.cc.o' failed
2021-03-22T20:24:36.7377700Z make[3]: *** [CMakeFiles/Hello_world.dir/Hello_world.cc.o] Error 1
2021-03-22T20:24:36.7378796Z CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Hello_world.dir/all' failed
2021-03-22T20:24:36.7379596Z make[2]: *** [CMakeFiles/Hello_world.dir/all] Error 2
2021-03-22T20:24:36.7381310Z Makefile:83: recipe for target 'all' failed
2021-03-22T20:24:36.7382003Z make[1]: *** [all] Error 2
2021-03-22T20:24:36.7383015Z �[1;36m[Dbg] [examples_build.cc:151] �[0m�[1;36mSource: �[0m�[1;36m/github/workspace/examples/plugin/command_actor�[0m�[1;36m�[0m
2021-03-22T20:24:36.7384175Z �[1;36m[Dbg] [examples_build.cc:157] �[0m�[1;36mBuild directory: �[0m�[1;36m/tmp/oTA1RF�[0m�[1;36m�[0m
2021-03-22T20:24:36.7385351Z �[1;36m[Dbg] [examples_build.cc:151] �[0m�[1;36mSource: �[0m�[1;36m/github/workspace/examples/plugin/custom_component�[0m�[1;36m�[0m
2021-03-22T20:24:36.7386513Z �[1;36m[Dbg] [examples_build.cc:157] �[0m�[1;36mBuild directory: �[0m�[1;36m/tmp/YQWpPd�[0m�[1;36m�[0m
2021-03-22T20:24:36.7387677Z �[1;36m[Dbg] [examples_build.cc:151] �[0m�[1;36mSource: �[0m�[1;36m/github/workspace/examples/plugin/gui_system_plugin�[0m�[1;36m�[0m
2021-03-22T20:24:36.7388822Z �[1;36m[Dbg] [examples_build.cc:157] �[0m�[1;36mBuild directory: �[0m�[1;36m/tmp/30O5P9�[0m�[1;36m�[0m
2021-03-22T20:24:36.7389968Z �[1;36m[Dbg] [examples_build.cc:151] �[0m�[1;36mSource: �[0m�[1;36m/github/workspace/examples/plugin/system_plugin�[0m�[1;36m�[0m
2021-03-22T20:24:36.7391123Z �[1;36m[Dbg] [examples_build.cc:157] �[0m�[1;36mBuild directory: �[0m�[1;36m/tmp/LUwUwT�[0m�[1;36m�[0m
2021-03-22T20:24:36.7392267Z �[1;36m[Dbg] [examples_build.cc:151] �[0m�[1;36mSource: �[0m�[1;36m/github/workspace/examples/plugin/Hello_world�[0m�[1;36m�[0m
2021-03-22T20:24:36.7395745Z �[1;36m[Dbg] [examples_build.cc:157] �[0m�[1;36mBuild directory: �[0m�[1;36m/tmp/WykYGa�[0m�[1;36m�[0m
2021-03-22T20:24:36.7396550Z /github/workspace/test/integration/examples_build.cc:164: Failure
2021-03-22T20:24:36.7397300Z Expected equality of these values:
2021-03-22T20:24:36.7397759Z system(cmd)
2021-03-22T20:24:36.7398107Z Which is: 512
2021-03-22T20:24:36.7398431Z 0
2021-03-22T20:24:36.7398745Z Hello_world
2021-03-22T20:24:36.7399392Z [ FAILED ] Plugins/ExamplesBuild.Build/0, where GetParam() = "plugin" (56687 ms)
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Yes, this plugin. No, I couldn't manage to compile it locally cause I got this error |
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
@chapulina Ma'am, it was not the slightest of my intention to waste your time(gazebosim/ros_gz#148). I have updated the code and have a compiled plugin (terminal output below) for your reference. ##Terminal Output
I could compile it locally. Lastly, here's the library. Thanks PS: You can still reject it. |
Sorry if that's what it sounded like! I completely understand you have the best intentions, I was just making suggestions on how to optimize the review process 😉 This is in the review queue 👍 |
@chapulina, any update on this 🙂? |
Hi @addy1997 , the plugin still can't be compiled. I see you're using ROS packages like catkin, roscpp and rospy, which aren't dependencies of Ignition. It may compile on your system if you have those on your workspace, but to be included into our examples, it can't depend on ROS. You can see how the test fails to compile on our CI. Click on the "Details" for the "Ubuntu CI" check and see on the logs how your plugin fails to compile:
Also, please clean up the code and remove all references to |
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
Signed-off-by: addy1997 <[email protected]>
@chapulina, I have checked the log files it says this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, the test passes now, which means the plugin compiles correctly!
Could you remove the .so
file? We don't commit those to the repository, because they may not work for all users across all platforms.
Signed-off-by: addy1997 <[email protected]>
@chapulina, are there any more changes required in this plugin? If not, could you please approve the workflow request? |
Hi @addy1997 , this is on my review queue 👍 |
Codecov Report
@@ Coverage Diff @@
## ign-gazebo4 #699 +/- ##
===============================================
- Coverage 65.98% 65.97% -0.02%
===============================================
Files 239 239
Lines 17657 17657
===============================================
- Hits 11651 11649 -2
- Misses 6006 6008 +2
Continue to review full report at Codecov.
|
@chapulina, please could you merge this PR? |
Signed-off-by: Louise Poubel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: addy1997 <[email protected]> Signed-off-by: Louise Poubel <[email protected]> Co-authored-by: Jose Luis Rivero <[email protected]> Co-authored-by: Louise Poubel <[email protected]>
Signed-off-by: addy1997 <[email protected]> Signed-off-by: Louise Poubel <[email protected]> Co-authored-by: Jose Luis Rivero <[email protected]> Co-authored-by: Louise Poubel <[email protected]>
I have added the hello_world plugin
Checklist
codecheck
passed (See contributing)