Hello,
I am a Student and I have the following task:
I have to launch two UR16e in Gazebo and control the two robots with Rviz. I am working with Ros Noetic on Ubuntu 20.04.
Is it possible to launch two ur16e_bringup.launch in gazebo ? Could somebody help me to write the correct launch file.
Thank you very much for the help!
Edit: This is the launch file, which I already created. I am able to load the robots, but I am not able to get a connection between Rviz and gazebo, so I think I have an issue in my file.
<arg name="transmission_hw_interface" default="hardware_interface/PositionJointInterface" />
<arg if="$(eval tf_prefix=='')" name="tf_prefix_slashed" value="" /> <!--Important for proper substitution (empty tf_prefix must not lead to leading slashes-->
<arg unless="$(eval tf_prefix=='')" name="tf_prefix_slashed" value="$(arg tf_prefix)/" /> <!--Important for proper substitution (empty tf_prefix must not lead to leading slashes-->
<param name="robot_description"
command="$(find xacro)/xacro $(find ur_description)/urdf/ur16e.xacro transmission_hw_interface:=$(arg transmission_hw_interface) tf_prefix:=$(arg tf_prefix)"/>
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model"
args="-urdf -param robot_description -model $(arg robot_name) $(arg init_pose)"
respawn="false" output="screen"/>
<!-- Start the controllers -->
<rosparam file="$(find ur_launch_sim)/config/gazebo_joint_state_controller.yaml" command="load"/>
<node name="controller_spawner" pkg="controller_manager" type="controller_manager" output="screen"
args="spawn joint_state_controller">
</node>
<!-- Robot state publisher -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" output="screen">
<param name="tf_prefix" value="$(arg tf_prefix)"/>
</node>