ADVRHumanoids / XBotControl

XBotControl framework: XBotCore + OpenSoT + CartesI/O
33 stars 3 forks source link

auto_generate_plugin compilitaion #15

Closed nkashiri closed 10 months ago

nkashiri commented 5 years ago

The auto generated plug-in does not include the catkin compilation configuration, may we have this? @liesrock

liesrock commented 5 years ago

I fixed the issue putting in the skeleton of the plugin the catkin_package declaration and adding the package.xml as requested by ROS.

I will release the new version of the xbotcontrol with these fix soon!

liesrock commented 5 years ago

It can happen, based on user choice, that the catkin Package name does not follow the ROS naming conventions

liesrock commented 5 years ago

Should be fixed in this releaseç https://github.com/ADVRHumanoids/XBotControl/releases/tag/v1.1.2

Please test it and give us some feedback!

nkashiri commented 5 years ago

thanks @liesrock May you have a simple example in the wiki for this? to generate a custom plugin (the default functionality can be homing to target zero position or joint range mid point) and then compiling it

liesrock commented 5 years ago

Hi @nkashiri this is the catkin tool usage

liesrock commented 5 years ago

Anyhow I can include an example, even though you can use any build tool for the xbot plugins

nkashiri commented 5 years ago

Yes, I can also take it from the ros catkin page, and copy paste it somewhere. But in my opinion, to have a user-friendly instruction, it's better to have the complete process in one place. A procedure said by the developer to follow one by one, and see an expected result. This what I would appreciate as a user.

liesrock commented 5 years ago

So the point is that the user of the RT plugin generator is suppose to be a developer (i.e. skilled user), with basic knowledge of C++ and its related building/linking tools.

I fully agree with you about the user-friendliness, but a standard user will never write an RT plugin: for this category we should develop GUI and high level scripting tools.

Nevertheless, I will document one possible use-cases of the usage of XBotCore, documenting how to build a custom plugin with catkin

nkashiri commented 5 years ago

I see your point, it's not meant for any user. Yet, please consider that a skilled user for developing control schemes, while having beyond basic knowledge of C++, may not have the experience of dealing of ROS tools (although, I know it's becoming a trend now). Not every user is meant to be a computer scientist ;) I would say let's think of it as Simulink toolbox: when you install it, there is a test file that you can run it and realize if everything is fine, or no, you may get a message that you're missing some compiling library or some graphics driver...
Anyway, even for a user with basic knowledge of C++, in my opinion, it gives a much better impression if the first run/test can come at no effort. This is just my perspective though :) Just as an example: http://gazebosim.org/tutorials/?tut=ros_urdf#GettingRRBot

liesrock commented 5 years ago

Exactly! For non computer scientist we need a tool like Simulink J

nkashiri commented 5 years ago

So, I auto-generated plugin (generate_XBot_Plugin.sh Mytest) in my "~/catkin_ws/src" then used "catkin_make" in the upper folder to compile it, and got the final message "[100%] Built target Mytest" Next, source the setup.bash by ". /home/navvab/catkin_ws/devel/setup.bash" But, when adding the "Mytest" to my config file, the launch fails Am I missing some steps?

nkashiri commented 5 years ago

@liesrock found an issue with sourcing when doing roslaunch the temporary workaround is add to the bashrc the following: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/?????????????????/catkin_ws/devel/lib

liesrock commented 5 years ago

Basically the issue is related to the sourcing of the catkin workspace which leads to an overwriting of the ROS_PACKAGE_PATH : looks like ROS is not giving much alternatives to this, except http://wiki.ros.org/catkin/Tutorials/workspace_overlaying @alaurenzi

liesrock commented 10 months ago

I close this for inactivity