0
$\begingroup$

Rosanswers logo

I'm using ROS Melodic and Gazebo 9.6.0 on an Ubuntu 18-04.

I've just started to learn how to connect ROS with Gazebo.

To learn it, I'm reading the book Mastering ROS for Robotics Programming - Second Edition (Packt).

I'm on chapter 3 learning about URDF.

Now I'm going to create a package for robot description and the command to create it is:

catkin_create_pkg mastering_ros_robot_description_pkg roscpp tf geometry_msgs urdf rviz xacro

Is it required to add the packages urdf, rviz and xacro to my description's package?

I have created another robot's description packages without those packages and it works perfectly.


Originally posted by Elric on ROS Answers with karma: 71 on 2019-02-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Is it required to add the packages urdf, rviz and xacro?

The reason you add those package names to the catkin_create_pkg invocation is to add those as run and (in this case: build) dependencies to the package manifest. We do that so that package managers and tools like rosdep and catkin can understand what your package needs in order to work correctly -- or at all.

I have created another robot's description packages without those packages and it works perfectly.

it may have worked, but that package does not state the runtime dependency explicitly (at least for rviz and xacro).

For a regular desktop or desktop-full installation that will not typically result in any problems, as you'll have those already installed.

But anyone who installed ROS from source, or used any of the "bare bones" installation types (ie: ros-core or ros-base), they could run into problems, as even after running rosdep check --from-paths .. --ignore-src .. (ie: the command that will make sure all dependencies of the ROS packages in a workspace are present on the system), they may not have RViz, nor xacro.


Originally posted by gvdhoorn with karma: 86574 on 2019-02-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Elric on 2019-02-11:
Thanks. So, I need to add them to my robot's description package to avoid problems in other computers that don't have installed them (urdf, rviz and xacro), isn't it?

Comment by gvdhoorn on 2019-02-11:
Yes. The information is required to make dependency management work.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.