Porting Gazebo to ROS2

I am trying to create a gazebo simulation for the stretch 2 in ros2. First of all, is there any particular reason as to why the stretch_gazebo package hasn’t been ported to ros2? If not, how would I go about implementing the simulation?

Hi @mlalji, it’s great to hear you’re working on this. We haven’t tackled porting Stretch Gazebo to ROS2 because we’re currently focused on improving the support for the core Stretch ROS2 packages. If you wanted to implement a Gazebo ROS2 implementation of Stretch, here’s a few things to note:

  • URDFs for Stretch 2 are available in the Stretch Description package. STL meshes are in the stretch_ros2/stretch_description/meshes/ folder and they’ve been optimized to remove internal geometry which should make simulation faster. XACROs are in the stretch_ros2/stretch_description/urdf folder and you’ll want to use to edit the stretch_description.xacro to include the tool you are using (e.g. Standard Gripper vs Dex Wrist) before compiling it to a URDF.
  • Despite being called “Gazebo”, the new Gazebo (previously called Ignition) is different from the Gazebo Classic simulator used in ROS1’s Stretch Gazebo package. The physics engine is different, so you will see different physics behavior (might be better, might be worse). The rendering engine is different, so the graphics will look different. The assert library is upgraded and called Fuel. The API is different, so any Gazebo Classic plugins will need to be ported forward.

Happy to answer any questions that come up as you make progress on your implementation.

1 Like

Hi @bshah. I’ve been going through the process of just being able to vizualize the stretch in gazebo using ros2. I am getting this error when trying to run the entity spawner through gazebo:

[gzclient-2] [Err] [InsertModelWidget.cc:403] Missing model.config for model “/home/hello-robot/ament_ws/install/stretch_gazebo/share/stretch_gazebo/…/ament_index”
[gzclient-2] [Err] [InsertModelWidget.cc:403] Missing model.config for model “/home/hello-robot/ament_ws/install/stretch_gazebo/share/stretch_gazebo/…/colcon-core”
[gzclient-2] [Err] [InsertModelWidget.cc:403] Missing model.config for model “/home/hello-robot/ament_ws/install/stretch_gazebo/share/stretch_gazebo/…/stretch_gazebo”
[spawn_entity.py-3] [INFO] [1702484354.468531980] [urdf_spawner]: Calling service /spawn_entity
[spawn_entity.py-3] [INFO] [1702484354.808944571] [urdf_spawner]: Spawn status: SpawnEntity: Successfully spawned entity [stretch]
[gzserver-1] [Msg] Waiting for master.
[gzserver-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
[gzserver-1] [Msg] Publicized address: 192.168.1.120
[gzserver-1] [Msg] Loading world file [/usr/share/gazebo-11/worlds/empty.world]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/base_link.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/base_link.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/base_link.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_mast.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_mast.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_mast.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_head.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_head.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_head.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_left_wheel.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_left_wheel.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_left_wheel.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_head_pan.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_head_pan.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_head_pan.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_head_tilt.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_head_tilt.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_head_tilt.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_lift.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_lift.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_lift.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_arm_l4.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_arm_l4.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_arm_l4.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_arm_l3.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_arm_l3.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_arm_l3.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_arm_l2.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_arm_l2.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_arm_l2.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_arm_l1.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_arm_l1.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_arm_l1.STL]
[gzserver-1] [Wrn] [FuelModelDatabase.cc:313] URI not supported by Fuel [$(find stretch_gazebo)/meshes/link_arm_l0.STL]
[gzserver-1] [Wrn] [SystemPaths.cc:459] File or path does not exist [“”] [$(find stretch_gazebo)/meshes/link_arm_l0.STL]
[gzserver-1] [Err] [MeshShape.cc:64] Failed to find mesh file [$(find stretch_gazebo)/meshes/link_arm_l0.STL]

This repeats for all of the mesh files used in the urdf. Can you help me with this issue?

Hi @bshah , is there any way to use stretch_gazebo in ROS2 (or any guideline to build)?

Hi @mpal, Gazebo Ignition in ROS 2 doesn’t exist currently, so you’d have to build your own. I had some suggestions on how to start in this post: Porting Gazebo to ROS2 - #2 by bshah

Hello,
Our lab has been trying to port the “stretch_gazebo” package found in “stretch_ros” to ROS2 using Ubuntu 22.04. The current status of the simulation is that the robot launches and controllers are activated [arm and head position controller are claimed, and mobile base velocity controllers are claimed]. The problem we are encountering is that as soon as we move the mobile base it seems like the robot breaks and every joint moves to the position (0, 0, 0). We have tried to simplify the problem as much as possible but still we are getting this errors. Are there any suggestions to overcome this problem?

Code can be found here: GitHub - CardiffUniversityComputationalRobotics/stretch_gazebo: Package to simulate Stretch RE1 robot within Gazebo Classic simulation with ROS2

This has been done as a package for development purposes although once is all functional the plan is to integrate with stretch_ros2 meta-package.

For reference, this is the output of the terminal:

"[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [20074]
[INFO] [gzclient-2]: process started with pid [20076]
[INFO] [spawn_entity.py-3]: process started with pid [20078]
[INFO] [robot_state_publisher-4]: process started with pid [20080]
[INFO] [ros2_control_node-5]: process started with pid [20082]
[robot_state_publisher-4] [WARN] [1716462550.164359306] [kdl_parser]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
[robot_state_publisher-4] [INFO] [1716462550.164423656] [robot_state_publisher]: got segment base_link
[robot_state_publisher-4] [INFO] [1716462550.164451872] [robot_state_publisher]: got segment caster_link
[robot_state_publisher-4] [INFO] [1716462550.164455068] [robot_state_publisher]: got segment link_arm_l0
[robot_state_publisher-4] [INFO] [1716462550.164457293] [robot_state_publisher]: got segment link_arm_l1
[robot_state_publisher-4] [INFO] [1716462550.164459398] [robot_state_publisher]: got segment link_arm_l2
[robot_state_publisher-4] [INFO] [1716462550.164461411] [robot_state_publisher]: got segment link_arm_l3
[robot_state_publisher-4] [INFO] [1716462550.164463429] [robot_state_publisher]: got segment link_arm_l4
[robot_state_publisher-4] [INFO] [1716462550.164465472] [robot_state_publisher]: got segment link_head
[robot_state_publisher-4] [INFO] [1716462550.164467629] [robot_state_publisher]: got segment link_head_pan
[robot_state_publisher-4] [INFO] [1716462550.164469908] [robot_state_publisher]: got segment link_head_tilt
[robot_state_publisher-4] [INFO] [1716462550.164472082] [robot_state_publisher]: got segment link_left_wheel
[robot_state_publisher-4] [INFO] [1716462550.164474237] [robot_state_publisher]: got segment link_lift
[robot_state_publisher-4] [INFO] [1716462550.164476309] [robot_state_publisher]: got segment link_mast
[robot_state_publisher-4] [INFO] [1716462550.164478346] [robot_state_publisher]: got segment link_right_wheel
[robot_state_publisher-4] [INFO] [1716462550.164480400] [robot_state_publisher]: got segment link_wrist_yaw
[ros2_control_node-5] [INFO] [1716462550.523177054] [controller_manager]: Subscribing to ‘~/robot_description’ topic for robot description file.
[ros2_control_node-5] [INFO] [1716462550.524209101] [controller_manager]: update rate is 100 Hz
[ros2_control_node-5] [INFO] [1716462550.524291285] [controller_manager]: RT kernel is recommended for better performance
[spawn_entity.py-3] [INFO] [1716462550.543707043] [spawn_entity]: Spawn Entity started
[spawn_entity.py-3] [INFO] [1716462550.543896632] [spawn_entity]: Loading entity published on topic /robot_description
[spawn_entity.py-3] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[spawn_entity.py-3] warnings.warn(
[spawn_entity.py-3] [INFO] [1716462550.544993825] [spawn_entity]: Waiting for entity xml on /robot_description
[spawn_entity.py-3] [INFO] [1716462550.556331847] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-3] [INFO] [1716462550.556487541] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-3] [INFO] [1716462551.059391122] [spawn_entity]: Calling service /spawn_entity
[spawn_entity.py-3] [INFO] [1716462551.278850680] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [stretch]
[INFO] [spawn_entity.py-3]: process has finished cleanly [pid 20078]
[gzserver-1] [INFO] [1716462551.589353588] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-1] [INFO] [1716462551.591200073] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /
[gzserver-1] [INFO] [1716462551.591309983] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-1] [INFO] [1716462551.592702974] [gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-1] [INFO] [1716462551.594198724] [gazebo_ros2_control]: Received urdf from param server, parsing…
[gzserver-1] [INFO] [1716462551.594518619] [gazebo_ros2_control]: Loading parameter files /home/samuel/ros2_ws/install/stretch_gazebo/share/stretch_gazebo/config/stretch.yaml
[gzserver-1] [INFO] [1716462551.606882597] [gazebo_ros2_control]: Loading joint: joint_right_wheel
[gzserver-1] [INFO] [1716462551.606951335] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.606970323] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607110652] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607142230] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607339832] [gazebo_ros2_control]: Loading joint: joint_left_wheel
[gzserver-1] [INFO] [1716462551.607346791] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.607350636] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607403479] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607412384] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607470182] [gazebo_ros2_control]: Loading joint: joint_lift
[gzserver-1] [INFO] [1716462551.607475246] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.607478578] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607483308] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607487403] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607510862] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607514717] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607561836] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607573488] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607596247] [gazebo_ros2_control]: Loading joint: joint_arm_l0
[gzserver-1] [INFO] [1716462551.607600526] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.607603723] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607607333] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607610674] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607614232] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607617450] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607821716] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607831868] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607837057] [gazebo_ros2_control]: Loading joint: joint_arm_l1
[gzserver-1] [INFO] [1716462551.607840511] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.607843661] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607848534] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607852197] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607855747] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607859062] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607876565] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607886740] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607890952] [gazebo_ros2_control]: Loading joint: joint_arm_l2
[gzserver-1] [INFO] [1716462551.607894484] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.607897438] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607900733] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607903891] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607907131] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607910197] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607926186] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607936086] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607939949] [gazebo_ros2_control]: Loading joint: joint_arm_l3
[gzserver-1] [INFO] [1716462551.607943354] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.607946315] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607949537] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.607952715] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.607957462] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.607978180] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.607995405] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608005523] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608011313] [gazebo_ros2_control]: Loading joint: joint_wrist_yaw
[gzserver-1] [INFO] [1716462551.608014815] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.608018410] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.608021736] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608024982] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608028756] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.608031824] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.608042064] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608046667] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608051456] [gazebo_ros2_control]: Loading joint: joint_head_pan
[gzserver-1] [INFO] [1716462551.608055175] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.608058218] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.608062207] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608065807] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608069188] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.608072236] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.608081494] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608086292] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608090708] [gazebo_ros2_control]: Loading joint: joint_head_tilt
[gzserver-1] [INFO] [1716462551.608094083] [gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1716462551.608097347] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.608100490] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608103644] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608106969] [gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1716462551.608110042] [gazebo_ros2_control]: position
[gzserver-1] [INFO] [1716462551.608115192] [gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1716462551.608119451] [gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1716462551.608449448] [resource_manager]: Initialize hardware ‘GazeboSimSystem’
[gzserver-1] [INFO] [1716462551.609240842] [resource_manager]: Successful initialization of hardware ‘GazeboSimSystem’
[gzserver-1] [INFO] [1716462551.610962500] [resource_manager]: ‘configure’ hardware ‘GazeboSimSystem’
[gzserver-1] [INFO] [1716462551.611015110] [resource_manager]: Successful ‘configure’ of hardware ‘GazeboSimSystem’
[gzserver-1] [INFO] [1716462551.611086731] [resource_manager]: ‘activate’ hardware ‘GazeboSimSystem’
[gzserver-1] [INFO] [1716462551.611092015] [resource_manager]: Successful ‘activate’ of hardware ‘GazeboSimSystem’
[gzserver-1] [INFO] [1716462551.611348214] [gazebo_ros2_control]: Loading controller_manager
[gzserver-1] [WARN] [1716462551.631233477] [gazebo_ros2_control]: Desired controller update period (0.01 s) is slower than the gazebo simulation period (0.001 s).
[gzserver-1] [INFO] [1716462551.631896738] [gazebo_ros2_control]: Loaded gazebo_ros2_control.
[INFO] [spawner-6]: process started with pid [20338]
[spawner-6] [INFO] [1716462552.334310617] [spawner_joint_state_broadcaster]: Set controller type to “joint_state_broadcaster/JointStateBroadcaster” for joint_state_broadcaster
[spawner-6] [INFO] [1716462552.335728061] [spawner_joint_state_broadcaster]: Set controller params file to “/home/samuel/ros2_ws/install/stretch_gazebo/share/stretch_gazebo/config/stretch.yaml” for joint_state_broadcaster
[gzserver-1] [INFO] [1716462552.337382844] [controller_manager]: Loading controller ‘joint_state_broadcaster’
[spawner-6] [INFO] [1716462552.379145669] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[gzserver-1] [INFO] [1716462552.380438850] [controller_manager]: Configuring controller ‘joint_state_broadcaster’
[gzserver-1] [INFO] [1716462552.380979734] [joint_state_broadcaster]: ‘joints’ or ‘interfaces’ parameter is empty. All available state interfaces will be published
[spawner-6] [INFO] [1716462552.478607135] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[INFO] [spawner-6]: process has finished cleanly [pid 20338]
[INFO] [spawner-7]: process started with pid [20383]
[spawner-7] [INFO] [1716462554.375218495] [spawner_stretch_mobile_base_controller]: Set controller type to “diff_drive_controller/DiffDriveController” for stretch_mobile_base_controller
[spawner-7] [INFO] [1716462554.376658152] [spawner_stretch_mobile_base_controller]: Set controller params file to “/home/samuel/ros2_ws/install/stretch_gazebo/share/stretch_gazebo/config/stretch.yaml” for stretch_mobile_base_controller
[gzserver-1] [INFO] [1716462554.377245772] [controller_manager]: Loading controller ‘stretch_mobile_base_controller’
[spawner-7] [INFO] [1716462554.424776424] [spawner_stretch_mobile_base_controller]: Loaded stretch_mobile_base_controller
[gzserver-1] [INFO] [1716462554.425456900] [controller_manager]: Configuring controller ‘stretch_mobile_base_controller’
[spawner-7] [INFO] [1716462554.533405581] [spawner_stretch_mobile_base_controller]: Configured and activated stretch_mobile_base_controller
[INFO] [spawner-7]: process has finished cleanly [pid 20383]
[INFO] [spawner-8]: process started with pid [20412]
[spawner-8] [INFO] [1716462557.505311218] [spawner_stretch_head_controller]: Set controller type to “joint_trajectory_controller/JointTrajectoryController” for stretch_head_controller
[spawner-8] [INFO] [1716462557.506724552] [spawner_stretch_head_controller]: Set controller params file to “/home/samuel/ros2_ws/install/stretch_gazebo/share/stretch_gazebo/config/stretch.yaml” for stretch_head_controller
[gzserver-1] [INFO] [1716462557.507381677] [controller_manager]: Loading controller ‘stretch_head_controller’
[gzserver-1] [WARN] [1716462557.522596051] [stretch_head_controller]: [Deprecated]: “allow_nonzero_velocity_at_trajectory_end” is set to true. The default behavior will change to false.
[spawner-8] [INFO] [1716462557.528517403] [spawner_stretch_head_controller]: Loaded stretch_head_controller
[gzserver-1] [INFO] [1716462557.529679039] [controller_manager]: Configuring controller ‘stretch_head_controller’
[gzserver-1] [INFO] [1716462557.529839567] [stretch_head_controller]: No specific joint names are used for command interfaces. Using ‘joints’ parameter.
[gzserver-1] [INFO] [1716462557.529865414] [stretch_head_controller]: Command interfaces are [position] and state interfaces are [position].
[gzserver-1] [INFO] [1716462557.529878891] [stretch_head_controller]: Using ‘splines’ interpolation method.
[gzserver-1] [INFO] [1716462557.531253269] [stretch_head_controller]: Controller state will be published at 50.00 Hz.
[gzserver-1] [INFO] [1716462557.532075331] [stretch_head_controller]: Action status changes will be monitored at 20.00 Hz.
[spawner-8] [INFO] [1716462557.634909506] [spawner_stretch_head_controller]: Configured and activated stretch_head_controller
[INFO] [spawner-8]: process has finished cleanly [pid 20412]
[INFO] [spawner-9]: process started with pid [20438]
[spawner-9] [INFO] [1716462559.509862244] [spawner_stretch_arm_controller]: Set controller type to “joint_trajectory_controller/JointTrajectoryController” for stretch_arm_controller
[spawner-9] [INFO] [1716462559.511530573] [spawner_stretch_arm_controller]: Set controller params file to “/home/samuel/ros2_ws/install/stretch_gazebo/share/stretch_gazebo/config/stretch.yaml” for stretch_arm_controller
[gzserver-1] [INFO] [1716462559.512065990] [controller_manager]: Loading controller ‘stretch_arm_controller’
[gzserver-1] [WARN] [1716462559.518236762] [stretch_arm_controller]: [Deprecated]: “allow_nonzero_velocity_at_trajectory_end” is set to true. The default behavior will change to false.
[spawner-9] [INFO] [1716462559.522629963] [spawner_stretch_arm_controller]: Loaded stretch_arm_controller
[gzserver-1] [INFO] [1716462559.523566453] [controller_manager]: Configuring controller ‘stretch_arm_controller’
[gzserver-1] [INFO] [1716462559.523744313] [stretch_arm_controller]: No specific joint names are used for command interfaces. Using ‘joints’ parameter.
[gzserver-1] [INFO] [1716462559.523756482] [stretch_arm_controller]: Command interfaces are [position] and state interfaces are [position].
[gzserver-1] [INFO] [1716462559.523763004] [stretch_arm_controller]: Using ‘splines’ interpolation method.
[gzserver-1] [INFO] [1716462559.524010336] [stretch_arm_controller]: Controller state will be published at 50.00 Hz.
[gzserver-1] [INFO] [1716462559.524468886] [stretch_arm_controller]: Action status changes will be monitored at 20.00 Hz.
[spawner-9] [INFO] [1716462559.626684162] [spawner_stretch_arm_controller]: Configured and activated stretch_arm_controller
[INFO] [spawner-9]: process has finished cleanly [pid 20438]
"

Photo of simulation before moving:

Photo of simulation after moving:

Hi @SamuelMN005, It is interesting to see the Gazebo Classic supported directly into ros2. This is a very useful project your lab is working on. The robot breaks on motion usually when the TF tree is not published properly and there are missing links between the frame. I would start investigating this issue by monitoring the TF messages and tree visualization to make sure all the links are present and connected to the Odom. I also suggest that you try out the ros1 implementation of the stretch_gazebo and see if it works with that original implementation.