0
$\begingroup$

I've install ros2 rolling, navigation2, slam_toolbox, Gazebo 11, and the turtelbot3 in my Docker container. Running this Gazebo launch ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py returns these error messages:

[INFO] [launch]: All log files can be found below /home/y/.ros/log/2023-09-26-21-01-10-628365-pop23-1122
[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : turtlebot3_waffle.urdf
urdf_file_name : turtlebot3_waffle.urdf
[INFO] [gzserver-1]: process started with pid [1125]
[INFO] [gzclient-2]: process started with pid [1127]
[INFO] [robot_state_publisher-3]: process started with pid [1129]
[INFO] [spawn_entity.py-4]: process started with pid [1131]
[robot_state_publisher-3] [INFO] [1695754871.582602597] [robot_state_publisher]: Robot initialized
[spawn_entity.py-4] [INFO] [1695754871.982227902] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1695754871.982449226] [spawn_entity]: Loading entity XML from file /opt/ros/rolling/share/turtlebot3_gazebo/models/turtlebot3_waffle/model.sdf
[spawn_entity.py-4] [INFO] [1695754871.983068964] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1695754871.983301368] [spawn_entity]: Waiting for service /spawn_entity
[gzserver-1] ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
[gzserver-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
[gzserver-1] ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
[gzserver-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
[gzserver-1] ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
[gzserver-1] ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[gzserver-1] ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
[gzserver-1] ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
[gzserver-1] AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
[spawn_entity.py-4] [INFO] [1695754872.741016925] [spawn_entity]: Calling service /spawn_entity
[gzserver-1] [INFO] [1695754872.823695242] [turtlebot3_imu]: <initial_orientation_as_reference> is unset, using default value of false to comply with REP 145 (world as orientation reference)
[spawn_entity.py-4] [INFO] [1695754872.890246420] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [waffle]
[gzserver-1] [INFO] [1695754873.002695193] [turtlebot3_diff_drive]: Wheel pair 1 separation set to [0.287000m]
[gzserver-1] [INFO] [1695754873.002724088] [turtlebot3_diff_drive]: Wheel pair 1 diameter set to [0.066000m]
[gzserver-1] [INFO] [1695754873.003448619] [turtlebot3_diff_drive]: Subscribed to [/cmd_vel]
[gzserver-1] [INFO] [1695754873.005967828] [turtlebot3_diff_drive]: Advertise odometry on [/odom]
[gzserver-1] [INFO] [1695754873.008795563] [turtlebot3_diff_drive]: Publishing odom transforms between [odom] and [base_footprint]
[gzserver-1] [INFO] [1695754873.015334446] [turtlebot3_joint_state]: Going to publish joint [wheel_left_joint]
[gzserver-1] [INFO] [1695754873.015355489] [turtlebot3_joint_state]: Going to publish joint [wheel_right_joint]
[INFO] [spawn_entity.py-4]: process has finished cleanly [pid 1131]
[gzclient-2] gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed.
[ERROR] [gzclient-2]: process has died [pid 1127, exit code -6, cmd 'gzclient'].

Based on my analysis, the Gazebo client has crashed due to the assertion. But what can be the reason? or this is because I missed something in the configuration? Why does the Gazebo server need ALSA lib?

Note, if I execute this command ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False from the nav2 documentation in the getting started section, it works. I can see the robot and the lidar scan in the Gazebo simulator.

$\endgroup$

1 Answer 1

0
$\begingroup$

Sourcing the Gazebo's setup by running source /usr/share/gazebo/setup.bash solves the issue.

$\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.