0
$\begingroup$

Just updated to ROS2 Humble and Ubuntu 22.04, Went through all the setup instructions for both ROS2 humble and Turtlebot3,

ROS2 humble and Gazebo Classic

This is the error that is occurring,

[INFO] [launch]: All log files can be found below /home/zorx/.ros/log/2023-11-15-19-13-16-666336-zorx-48737
[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : turtlebot3_waffle_pi.urdf
urdf_file_name : turtlebot3_waffle_pi.urdf
[INFO] [gzserver-1]: process started with pid [48738]
[INFO] [gzclient-2]: process started with pid [48740]
[INFO] [robot_state_publisher-3]: process started with pid [48742]
[INFO] [spawn_entity.py-4]: process started with pid [48744]
[robot_state_publisher-3] [INFO] [1700055797.383270144] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-3] [INFO] [1700055797.383338670] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1700055797.383343727] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-3] [INFO] [1700055797.383346669] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-3] [INFO] [1700055797.383349388] [robot_state_publisher]: got segment camera_rgb_frame
[robot_state_publisher-3] [INFO] [1700055797.383352226] [robot_state_publisher]: got segment camera_rgb_optical_frame
[robot_state_publisher-3] [INFO] [1700055797.383355080] [robot_state_publisher]: got segment caster_back_left_link
[robot_state_publisher-3] [INFO] [1700055797.383357847] [robot_state_publisher]: got segment caster_back_right_link
[robot_state_publisher-3] [INFO] [1700055797.383360588] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-3] [INFO] [1700055797.383363294] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-3] [INFO] [1700055797.383366170] [robot_state_publisher]: got segment wheel_right_link
[spawn_entity.py-4] [INFO] [1700055797.608546486] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1700055797.608755151] [spawn_entity]: Loading entity XML from file /home/zorx/Desktop/tb3_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models/turtlebot3_waffle_pi/model.sdf
[spawn_entity.py-4] [INFO] [1700055797.609309410] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1700055797.609487792] [spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-4] [ERROR] [1700055827.665935221] [spawn_entity]: Service %s/spawn_entity unavailable. Was Gazebo started with GazeboRosFactory?
[spawn_entity.py-4] [ERROR] [1700055827.666978495] [spawn_entity]: Spawn service failed. Exiting.
[ERROR] [spawn_entity.py-4]: process has died [pid 48744, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity waffle_pi -file /home/zorx/Desktop/tb3_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models/turtlebot3_waffle_pi/model.sdf -x 0.0 -y 0.0 -z 0.01 --ros-args'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-3] [INFO] [1700055838.792738296] [rclcpp]: signal_handler(signum=2)
[gzserver-1] [INFO] [1700055838.793474120] [rclcpp]: signal_handler(signum=2)
[ERROR] [gzclient-2]: process has died [pid 48740, exit code -2, cmd 'gzclient'].
[INFO] [robot_state_publisher-3]: process has finished cleanly [pid 48742]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) again, ignoring...
[gzserver-1] [INFO] [1700055839.056530545] [rclcpp]: signal_handler(signum=2)
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) again, ignoring...
[gzserver-1] [INFO] [1700055839.272136691] [rclcpp]: signal_handler(signum=2)
[ERROR] [gzserver-1]: process[gzserver-1] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
[INFO] [gzserver-1]: sending signal 'SIGTERM' to process[gzserver-1]
[gzserver-1] [INFO] [1700055843.802515876] [rclcpp]: signal_handler(signum=15)
[ERROR] [gzserver-1]: process[gzserver-1] failed to terminate '10.0' seconds after receiving 'SIGTERM', escalating to 'SIGKILL'
[INFO] [gzserver-1]: sending signal 'SIGKILL' to process[gzserver-1]
[ERROR] [gzserver-1]: process has died [pid 48738, exit code -9, cmd 'gzserver /home/zorx/Desktop/tb3_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/worlds/empty_world.world -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so'].

These are env variables in my .bashrc

source /opt/ros/humble/setup.bash
export TURTLEBOT3_MODEL=waffle_pi
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/humble/share/turtlebot3_gazebo/models

Any fix?

$\endgroup$

1 Answer 1

0
$\begingroup$

[spawn_entity.py-4] [ERROR] [1700055827.665935221] [spawn_entity]: Service %s/spawn_entity unavailable. Was Gazebo started with GazeboRosFactory?

That usually points to needing to execute the gazebo process with the ROS factory SO

https://github.com/ros-planning/navigation2/blob/main/nav2_bringup/launch/tb3_simulation_launch.py#L175-L186

    start_gazebo_server_cmd = ExecuteProcess(
        condition=IfCondition(use_simulator),
        cmd=[
            'gzserver',
            '-s',
            'libgazebo_ros_init.so',
            '-s',
            'libgazebo_ros_factory.so',
            world,
        ],
        cwd=[launch_dir],
        output='screen',
    )
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.