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

Revision history [back]

click to hide/show revision 1
initial version

Each package may consist of many different resources, e.g.

  • tools, binaries or scripts like xacro which do their job quickly and then quit
  • nodes, binaries or scripts like rviz or gazebo or joint_state_publisher which usually run all the time, participating in message processing and emitting.
  • message and action specification
  • configs and resources, which include urdfs, materials and images, yaml configs for ros_control
  • libraries like tf or PyKDL or pid
  • launch files, which run several tools/nodes at once
  • maybe something else

So each of this resource types may utilize some other resource. Say, if your node have to communicate with some other node, you use messages. If it is your own message type, both of nodes (and their packages) should depend on the package with that message specification.

These are some mechanisms for utilizing other packages inside your own: - adding a dependency on the other package in package.xml and CMakeLists.txt (if you need link other library to your code) - using find_package in your launch files to refer files from other packages - using package utils in runtime (cpp or python) to find resources from other packages (usually configuration, images and so on) - using parameter server to prepare parameters for other nodes or to get it from there - using messages and actions to communicate to other running nodes, possibly and usually originating from other packages

Hope this helps

Each package may consist of many different resources, e.g.

  • tools, binaries or scripts like xacro which do their job quickly and then quit
  • nodes, binaries or scripts like rviz or gazebo or joint_state_publisher which usually run all the time, participating in message processing and emitting.
  • message and action specification
  • configs and resources, which include urdfs, materials and images, yaml configs for ros_control
  • libraries like tf or PyKDL or pid
  • launch files, which run several tools/nodes at once
  • maybe something else

So each of this resource types may utilize some other resource. Say, if your node have to communicate with some other node, you use messages. If it is your own message type, both of nodes (and their packages) should depend on the package with that message specification.

These are some mechanisms for utilizing other packages inside your own: - own:

  • adding a dependency on the other package in package.xml and CMakeLists.txt (if you need link other library to your code) - code)
  • using find_package in your launch files to refer files from other packages - packages
  • using package utils in runtime (cpp or python) to find resources from other packages (usually configuration, images and so on) - on)
  • using parameter server to prepare parameters for other nodes or to get it from there - there
  • using messages and actions to communicate to other running nodes, possibly and usually originating from other packages

Hope this helps