gazebo版本:harmonic;
<launch>
<group>
<let name="robot_description" value="$(command 'xacro $(find-pkg-share gazebo_pkg)/urdf/total.xacro')"/>
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen"/>
<node pkg="robot_state_publisher" exec="robot_state_publisher" name="robot_state_publisher">
<param name="robot_description" value="$(var robot_description)"/>
</node>
<node name="joint_state_publisher" exec="joint_state_publisher" pkg="joint_state_publisher"/>
<include file="$(find-pkg-share ros_gz_sim)/launch/gz_sim.launch.py">
<arg name="gz_args" value="-v 4 default.sdf"/>
</include>
<node pkg="ros_gz_sim" exec="create" args="-world default -file $(find-pkg-share gazebo_pkg)/urdf/total.urdf">
</node>
<node pkg="ros_gz_bridge" exec="parameter_bridge" args="/chatter@geometry_msgs/msg/Twist@ignition.msgs.Twist"/>
</group>
</launch>
为了保证这次试验的可重复性,我关机后重启再次运行,结果如下:
还是有,说明不是意外了,对了备份,用作也许算灾难恢复