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.