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

How should premade packages be implemented with packages that I design?

asked 2017-04-13 16:51:54 -0500

mclambchops gravatar image

Hi, I am trying to get an understanding of how to combine and use pre-made packages that I design. I am working on an AUV, and I have found ROS packages for a PID as well as other components. I understand how they work individually; however, I am lost on the process of integrating them with the nodes that I have created. I am very new to ROS so any help that you give is greatly appreciated.

edit retag flag offensive close merge delete

Comments

The question is a bit too general. Could you maybe add an example of a current problem?

NEngelhard gravatar image NEngelhard  ( 2017-04-14 04:53:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-04-14 17:56:27 -0500

eugene.katsevman gravatar image

updated 2017-04-14 17:57:33 -0500

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-04-13 16:51:54 -0500

Seen: 106 times

Last updated: Apr 14 '17