-
multi_arm_lab_sim_description
- holds the sdf description of the simulated system and any other assets. -
multi_arm_lab_sim_gazebo
- holds gazebo specific code and configurations. Namely this is where systems end up. -
multi_arm_lab_sim_application
- holds ros2 specific code and configurations. -
multi_arm_lab_sim_bringup
- holds launch files and high level utilities.
- Ubuntu Jammy 22.04
- CMake version >= 3.5
- Python 3.10
-
For convenience, add the following line to .bashrc. Other possible values are setup.sh, setup.zsh
source /opt/ros/humble/setup.bash
-
Dependencies:
cd ~/cps-gazebo-sim source /opt/ros/humble/setup.bash sudo rosdep init rosdep update rosdep install --from-paths src --ignore-src -r -i -y --rosdistro humble
-
ros-gz
package which includes the necessary bridges and interfaces between ROS2 Humble and Gazebo Fortresssudo apt-get install ros-humble-ros-gz
-
Install Interbotix robot packages https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2/software_setup.html#amd64-architecture (instead of 6. maybe edit the github source links for repos that I modified. in the xsarm_amd64_install.sh script)
-
Update sources by running (insert my script which updates remote urls to my customized repos)
sudo apt install ros-humble-moveit
Robot | Installation Link |
---|---|
ViperX 300s | https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2/software_setup.html |
UR3e series | https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/humble |
Build
cd ~/cps-gazebo-sim
colcon build --cmake-args -DBUILD_TESTING=ON
Run
# source the workspace
. ~/cps-gazebo-sim/install/setup.sh
# launch the simulation and visualize in RViz
ros2 launch multi_arm_lab_sim_bringup ur3e.launch.py
Gazebo→ROS2
ros2 run ros_gz_bridge parameter_bridge /TOPIC@ROS_MSG@IGN_MSG
The ROS message type is followed by an @, [, or ] symbol where:
- @ is a bidirectional bridge.
- [ is a bridge from Ignition to ROS.
- ] is a bridge from ROS to Ignition.
source: https://gazebosim.org/docs/fortress/ros2_integration#bidirectional-communication
More info on message types and bridge communication
For example,
ros2 run ros_gz_bridge parameter_bridge /diff_drive/cmd_vel@geometry_msgs/msg/Twist]ignition.msgs.Twistros2 topic pub /diff_drive/cmd_vel geometry_msgs/Twist "linear: { x: 0.1 }"
# list topics in the Ignition simulation environment
ign topic -l
# list topics in a ROS 2 system
ros2 topic list
# print messages published to a topic
ros2 topic echo /TOPIC
sudo apt install ros-humble-launch-testing
Compile and run tests:
colcon test --ctest-args tests [package_selection_args]
See test results:
colcon test-result --all
Add --verbose
flag to see failing test cases.
Documentation for this repo is generated with Sphinx. To update documentation: cd docs
, make necessary edits, then run make html
. View the output _build/html/index.html
in a web browser.
Extra: Google slides presentation from Summer 2024 Intern/UG Event.
- Gazebo fortress docs
- Gazebo Sim 6.16 API Reference
- ros_gz_project_template
- UR3e description
- SDFormat
- Humble Testing docs
- ufw firewall must be disabled for Gazebo to run