ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is it possible to build and run a cpp nodelet without Catkin or rosbuild??

asked 2022-01-05 14:26:09 -0600

johnt gravatar image

This is similar to link text but with using Nodelets instead of nodes. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-01-05 17:45:26 -0600

Geoff gravatar image

Yes, it is possible, although I wouldn't recommend it due to the difficulty of reproducing all the functionality offered by Catkin. rosbuild is easier to do without; you can just call CMake manually on your CMakeLists.txt file.

The main difference of building a nodelet from building a node is that you need to build a shared library rather than an executable.

edit flag offensive delete link more

Comments

Thanks, Geoff. I appreciate your time. Quick followup: Is there a way to give ROS visibility to the nodelet's shared object without the package infrastructure or do I need to create a package?

johnt gravatar image johnt  ( 2022-01-05 18:25:06 -0600 )edit

Other nodes will be using pluginlib to discover and load the nodelet (ie: shared library), and pluginlib uses rospkg. The latter will only consider directories with a manifest in them as "ROS packages", so at the very minimum you'd have to place a package.xml with the correct contents in a directory. That manifest could then point to wherever the shared library is which hosts the nodelet class.

As "a directory with a manifest" is basically the definition of a package (at least at the file system level), theoretically this could work, but you'd essentially still be creating a package.


Edit: that's assuming the consumers of your nodelet-not-built-using-Catkin are in fact regular ROS nodes.


Edit 2: perhaps also good to mention: Catkin the CMake macros/functions/syntactic sugar != catkin_make (ie: the tool). Those are often confused/conflated.

gvdhoorn gravatar image gvdhoorn  ( 2022-01-06 03:43:17 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2022-01-05 14:26:09 -0600

Seen: 279 times

Last updated: Jan 05 '22