Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Robot Model not loading in gazebo #3419

Open
2vin2vin opened this issue Jan 31, 2025 · 1 comment
Open

Robot Model not loading in gazebo #3419

2vin2vin opened this issue Jan 31, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@2vin2vin
Copy link

I am using ubuntu 22 and ros2 humble
I have been working with simulating linorobot2 and it worked earlier and out of nowhere today the model doesn't spawn.
I have checked even with turtlebot3 and the model doesn't spawn
All of them worked earlier, without any changes made to the launch file now they don't
The issue should possibly be with gazebo
ros2 launch linorobot2_gazebo gazebo_world.launch.py
[INFO] [launch]: All log files can be found below /home/brahms
/.ros/log/2025-01-29-14-41-58-758884-D104714-37311
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gazebo-1]: process started with pid [37313]
[INFO] [robot_state_publisher-2]: process started with pid [37315]
[INFO] [spawn_entity.py-3]: process started with pid [37317]
[INFO] [ekf_node-4]: process started with pid [37319]
[robot_state_publisher-2] [INFO] [1738141918.884631128] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-2] [INFO] [1738141918.884700091] [robot_state_publisher]: got segment base_link
[robot_state_publisher-2] [INFO] [1738141918.884706924] [robot_state_publisher]: got segment camera_depth_link
[robot_state_publisher-2] [INFO] [1738141918.884710100] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-2] [INFO] [1738141918.884712908] [robot_state_publisher]: got segment front_left_wheel_link
[robot_state_publisher-2] [INFO] [1738141918.884715806] [robot_state_publisher]: got segment front_right_wheel_link
[robot_state_publisher-2] [INFO] [1738141918.884718445] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-2] [INFO] [1738141918.884721019] [robot_state_publisher]: got segment rear_left_wheel_link
[robot_state_publisher-2] [INFO] [1738141918.884723750] [robot_state_publisher]: got segment rear_right_wheel_link
[robot_state_publisher-2] [INFO] [1738141918.884726371] [robot_state_publisher]: got segment velodyne
[robot_state_publisher-2] [INFO] [1738141918.884729100] [robot_state_publisher]: got segment velodyne_base_link
[gazebo-1] Gazebo multi-robot simulator, version 11.10.2
[gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gazebo-1] Released under the Apache 2 License.
[gazebo-1] http://gazebosim.org/
[gazebo-1]
[spawn_entity.py-3] [INFO] [1738141919.105162694] [urdf_spawner]: Spawn Entity started
[spawn_entity.py-3] [INFO] [1738141919.105332658] [urdf_spawner]: 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] [1738141919.106057186] [urdf_spawner]: Waiting for entity xml on robot_description
[gazebo-1] Gazebo multi-robot simulator, version 11.10.2
[gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gazebo-1] Released under the Apache 2 License.
[gazebo-1] http://gazebosim.org/
[gazebo-1]
[gazebo-1] [Msg] Waiting for master.
[gazebo-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345/
[gazebo-1] [Msg] Publicized address: 192.168.16.129
[gazebo-1] [Msg] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[gazebo-1] [Err] [Scene.cc:227] Service call[/shadow_caster_material_name] timed out
[gazebo-1] [Err] [Scene.cc:249] Service call[/shadow_caster_render_back_faces] timed out
[gazebo-1] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[gazebo-1] [Wrn] [Scene.cc:463] Ignition transport [/scene_info] service call failed, falling back to gazebo transport [scene_info] request.

@2vin2vin 2vin2vin added the bug Something isn't working label Jan 31, 2025
@2vin2vin
Copy link
Author

I am using ubuntu 22 and ros2 humble I have been working with simulating linorobot2 and it worked earlier and out of nowhere today the model doesn't spawn. I have checked even with turtlebot3 and the model doesn't spawn All of them worked earlier, without any changes made to the launch file now they don't The issue should possibly be with gazebo ros2 launch linorobot2_gazebo gazebo_world.launch.py [INFO] [launch]: All log files can be found below /home/brahms /.ros/log/2025-01-29-14-41-58-758884-D104714-37311 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [gazebo-1]: process started with pid [37313] [INFO] [robot_state_publisher-2]: process started with pid [37315] [INFO] [spawn_entity.py-3]: process started with pid [37317] [INFO] [ekf_node-4]: process started with pid [37319] [robot_state_publisher-2] [INFO] [1738141918.884631128] [robot_state_publisher]: got segment base_footprint [robot_state_publisher-2] [INFO] [1738141918.884700091] [robot_state_publisher]: got segment base_link [robot_state_publisher-2] [INFO] [1738141918.884706924] [robot_state_publisher]: got segment camera_depth_link [robot_state_publisher-2] [INFO] [1738141918.884710100] [robot_state_publisher]: got segment camera_link [robot_state_publisher-2] [INFO] [1738141918.884712908] [robot_state_publisher]: got segment front_left_wheel_link [robot_state_publisher-2] [INFO] [1738141918.884715806] [robot_state_publisher]: got segment front_right_wheel_link [robot_state_publisher-2] [INFO] [1738141918.884718445] [robot_state_publisher]: got segment imu_link [robot_state_publisher-2] [INFO] [1738141918.884721019] [robot_state_publisher]: got segment rear_left_wheel_link [robot_state_publisher-2] [INFO] [1738141918.884723750] [robot_state_publisher]: got segment rear_right_wheel_link [robot_state_publisher-2] [INFO] [1738141918.884726371] [robot_state_publisher]: got segment velodyne [robot_state_publisher-2] [INFO] [1738141918.884729100] [robot_state_publisher]: got segment velodyne_base_link [gazebo-1] Gazebo multi-robot simulator, version 11.10.2 [gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation. [gazebo-1] Released under the Apache 2 License. [gazebo-1] http://gazebosim.org/ [gazebo-1] [spawn_entity.py-3] [INFO] [1738141919.105162694] [urdf_spawner]: Spawn Entity started [spawn_entity.py-3] [INFO] [1738141919.105332658] [urdf_spawner]: 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] [1738141919.106057186] [urdf_spawner]: Waiting for entity xml on robot_description [gazebo-1] Gazebo multi-robot simulator, version 11.10.2 [gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation. [gazebo-1] Released under the Apache 2 License. [gazebo-1] http://gazebosim.org/ [gazebo-1] [gazebo-1] [Msg] Waiting for master. [gazebo-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345/ [gazebo-1] [Msg] Publicized address: 192.168.16.129 [gazebo-1] [Msg] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. [gazebo-1] [Err] [Scene.cc:227] Service call[/shadow_caster_material_name] timed out [gazebo-1] [Err] [Scene.cc:249] Service call[/shadow_caster_render_back_faces] timed out [gazebo-1] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call [gazebo-1] [Wrn] [Scene.cc:463] Ignition transport [/scene_info] service call failed, falling back to gazebo transport [scene_info] request.

As the gazebo has launched without the robot, I tried to spawn the robot separately and got this error
ros2 run gazebo_ros spawn_entity.py -file /home/brahms/husky_ws/src/linorobot2/linorobot2_description/urdf/robots/4wd.urdf.xacro -entity linorobot2
[INFO] [1738147673.815682195] [spawn_entity]: Spawn Entity started
[INFO] [1738147673.815846110] [spawn_entity]: Loading entity XML from file /home/brahms/husky_ws/src/linorobot2/linorobot2_description/urdf/robots/4wd.urdf.xacro
[INFO] [1738147673.816098277] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[INFO] [1738147673.816226352] [spawn_entity]: Waiting for service /spawn_entity
[ERROR] [1738147703.861967413] [spawn_entity]: Service %s/spawn_entity unavailable. Was Gazebo started with GazeboRosFactory?
[ERROR] [1738147703.862745864] [spawn_entity]: Spawn service failed. Exiting.
[ros2run]: Process exited with failure 1

Then i tried out
ros2 topic list
/parameter_events
/rosout

Gazebo is still open, it seems like gazebo did not start with ros
but in my launch file I am starting it with
ExecuteProcess(
cmd=['gazebo', '--verbose', '-s', 'libgazebo_ros_factory.so', '-s', 'libgazebo_ros_init.so', LaunchConfiguration('world')],
output='screen'
),

I am really confused on how to get this working

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant