Gazebo sim UR10e plus Robotiq gripper
Dear All,
I am trying to create a Gazebo simulation of an assembled robot comprised of the Universal Robots UR10e arm and an attached Robotiq 3-fingers gripper. I am using the ros-industrial packages for both: UR10e, Robotiq.
I have created a package for my custom solution, called cobot_description
and there I have a urdf
folder containing my custom urdf file. I have asked for help in a previous question in order to create such URDF and now it spawns nicely in RViz (I am using Visual Studio Code's ROS extension to see it inside of an RViz windows in Visual Studio).
I have now moved ahead trying to create the Gazebo Sim for the robot. To that end, I have created a new package in the same directory of the previously introduced cobot description
one, called cobot_gazebo
.
Here, I have created a launch
folder, where I have created a file called cobot_empty_world.launch
which is intended to spawn my assembled robot in Gazebo.
The following is the code I have written to spawn it:
<?xml version="1.0"?>
<launch>
<!-- Args copied from ur10e.launch -->
<arg name="limited" default="false" doc="If true, limits joint range [-PI, PI] on all joints." />
<arg name="paused" default="false" doc="Starts gazebo in paused mode" />
<arg name="gui" default="true" doc="Starts gazebo gui" />
<!-- Startup of empty Gazebo world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" default="worlds/empty.world"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="gui" value="$(arg gui)"/>
</include>
<!-- Upload the ur10e + robotiq to param server -->
<include file="$(find cobot_description)/launch/ur10e_robotiq_upload.launch">
</include>
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1" respawn="false" output="screen" />
<!-- At this point, the Robotiq launch file ends, while the ur10e continues with controllers -->
<!-- Code from ur10e.launch -->
<include file="$(find ur_e_gazebo)/launch/controller_utils.launch"/>
<!-- start this controller -->
<rosparam file="$(find ur_e_gazebo)/controller/arm_controller_ur10e.yaml" command="load"/>
<node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>
<!-- load other controllers -->
<node name="ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false" output="screen" args="load joint_group_position_controller" />
</launch>
As you can tell from the code, I have copied its structure from the same-purpose files in the UR and Robotiq packages. I have copied the content of the UR10e file which includes, as commented, some controllers.
The file I am calling to upload the robot to the param server is simply this:
<?xml version="1.0"?>
<launch>
<param name="robot_description" command="$(find xacro)/xacro.py '$(find cobot_description)/urdf/ur10e_robotiq.urdf.xacro'" />
</launch>
Issue: when launching the cobot_empty_world.launch
file, I get the following error:
[ERROR] [1625147930.347361207]: Failed to find root link: Two root links ...