问题描述
在工作空间下执行以下指令
roslaunch turtlebot_gazebo turtlebot_world.launch
终端内容如下,并卡在【Physics dynamic reconfigure ready.】这句不动了
... logging to /home/lhj/.ros/log/460c37f2-a78d-11ed-85b4-c858c0b868a7/roslaunch-lhj-Lenovo-8741.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://lhj-Lenovo:36233/ SUMMARY ======== PARAMETERS * /bumper2pointcloud/pointcloud_radius: 0.24 * /cmd_vel_mux/yaml_cfg_file: /home/lhj/ontolog... * /depthimage_to_laserscan/output_frame_id: camera_depth_frame * /depthimage_to_laserscan/range_min: 0.45 * /depthimage_to_laserscan/scan_height: 10 * /gazebo/enable_ros_network: True * /robot_description: <?xml version="1.... * /robot_state_publisher/publish_frequency: 30.0 * /rosdistro: melodic * /rosversion: 1.14.13 * /use_sim_time: True NODES / bumper2pointcloud (nodelet/nodelet) cmd_vel_mux (nodelet/nodelet) depthimage_to_laserscan (nodelet/nodelet) gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient) laserscan_nodelet_manager (nodelet/nodelet) mobile_base_nodelet_manager (nodelet/nodelet) robot_state_publisher (robot_state_publisher/robot_state_publisher) spawn_turtlebot_model (gazebo_ros/spawn_model) auto-starting new master process[master]: started with pid [8776] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 460c37f2-a78d-11ed-85b4-c858c0b868a7 process[rosout-1]: started with pid [8798] started core service [/rosout] process[gazebo-2]: started with pid [8805] process[gazebo_gui-3]: started with pid [8810] process[spawn_turtlebot_model-4]: started with pid [8815] process[mobile_base_nodelet_manager-5]: started with pid [8816] process[cmd_vel_mux-6]: started with pid [8817] process[bumper2pointcloud-7]: started with pid [8818] process[robot_state_publisher-8]: started with pid [8820] process[laserscan_nodelet_manager-9]: started with pid [8829] process[depthimage_to_laserscan-10]: started with pid [8835] [ INFO] [1675846074.144006979]: Finished loading Gazebo ROS API Plugin. [ INFO] [1675846074.144957413]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1675846074.225662399]: Finished loading Gazebo ROS API Plugin. [ INFO] [1675846074.226633664]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting... [ INFO] [1675846074.674315811]: waitForService: Service [/gazebo/set_physics_properties] is now available. [ INFO] [1675846074.685590537]: Physics dynamic reconfigure ready.
此时Gazebo虽然打开了,但是是黑屏状态,电脑像死机一样
问题原因
Gazebo打开的时候,会先从网上或者它自己的模型库里检索模型,然后才会从其他包里导入模型,所以如果找不到目标模型的话,打开Gazebo就会发现一直卡着不动
解决方法
切断电脑网络,重新执行指令
roslaunch turtlebot_gazebo turtlebot_world.launch
会发现很顺利
想要以后每次打开的时候都不需要断网的话,需要你自己下载模型并放到模型目录下
首先访问连接:https://github.com/osrf/gazebo_models
直接下载为压缩包
下载好之后,解压所有模型到home/.gazebo/models文件夹下
问题解决