multirobot_laser_nav.launch
<group ns="robot1">
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find myrobot_gazebo)/urdf/myrobot_with_rplidar.urdf.xacro' ns:=robot1" />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model robot1 -param robot_description -x 0"/>
</group>
<group ns="robot2">
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find myrobot_gazebo)/urdf/myrobot_with_rplidar.urdf.xacro' ns:=robot2" />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model robot2 -param robot_description -x 2"/>
</group>
myrobot_body.urdf.xcro
<robotNamespace>/</robotNamespace>
修改为:
<robotNamespace></robotNamespace>
myrobot_teleop.py
pub = rospy.Publisher('/cmd_vel', Twist, queue_size=5)
修改为:
pub = rospy.Publisher('cmd_vel', Twist, queue_size=5)
版权声明:本文为baidu_41800370原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。