ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This repository has an example of a robot description with a Gazebo plugin and a launch file to spawn them for ROS 2:
https://gitlab.com/boldhearts/ros2_boldbot/-/tree/master
This was used amongst others in this workshop:
https://gitlab.com/boldhearts/ros2_workshop/-/tree/master
Without more info it is difficult to know where you're exactly stuck, but for me the trickiest was to get all the paths set up correctly so that everything was loaded correctly.
Note for instance the model path set in the package.xml file of the description package, which is then picked up in the launch file.
Most complexity is because ${prefix}
in package.xml, get_package_share_directory
in the launch file, and package://
in the URDF don't all point to the same directory under your installation, especially if you involve Rviz. See especially this commit to see some changes I had to make along the way to get it all to work:
https://gitlab.com/boldhearts/ros2_boldbot/-/commit/3196c6449f405a2642ec5707b0ddb4a636e81a13
Hopefully this helps you in the right direction! Let us know of specific issues/error messages you're getting, so that I can then try to make this answer more specific.
2 | No.2 Revision |
This repository has an example of a robot description with a Gazebo plugin and a launch file to spawn them for ROS 2:
https://gitlab.com/boldhearts/ros2_boldbot/-/tree/masterhttps://gitlab.com/boldhearts/ros2_boldbot
This was used amongst others in this workshop:
https://gitlab.com/boldhearts/ros2_workshop/-/tree/masterhttps://gitlab.com/boldhearts/ros2_workshop
Without more info it is difficult to know where you're exactly stuck, but for me the trickiest was to get all the paths set up correctly so that everything was loaded correctly.
Note for instance the model path set in the package.xml file of the description package:
<export>
<build_type>ament_cmake</build_type>
<gazebo_ros gazebo_model_path="${prefix}/.." />
</export>
, which is then picked up in the launch file.
GazeboRosPaths
: model_path, plugin_path, media_path = GazeboRosPaths.get_paths()
Most of the complexity is because ${prefix}
in package.xml, get_package_share_directory
in the launch file, and package://
in the URDF don't all point to the same directory under your installation, especially if you involve Rviz. See especially this commit to see some changes I had to make along the way to get it all to work:
https://gitlab.com/boldhearts/ros2_boldbot/-/commit/3196c6449f405a2642ec5707b0ddb4a636e81a13
Hopefully this helps you in the right direction! Let us know of specific issues/error messages you're getting, so that I can then try to make this answer more specific.