UR5e Controller stopped and unable to restart after launching bringup
Affected ROS Driver version(s)
ROS Noetic 1.16.0
Used ROS distribution.
Noetic
Which combination of platform is the ROS driver running on.
Linux without realtime patch
How is the UR ROS Driver installed.
Build both the ROS driver and UR Client Library from source
Which robot platform is the driver connected to.
UR E-series robot
Robot SW / URSim version(s)
5.11.6.1010389 (EDIT: also 5.16)
How is the ROS driver used.
Headless without using the teach pendant
Issue details
Summary
I am using a UR5e robot arm with OnRobot RG2 gripper. When launching ur5e_bringup.launch of ur_robot_driver, some controllers remain with status "stopped" and cannot be changed to "running".
Issue details
I want to control the movement of my UR5e with OnRobot RG2 gripper using Cartesian Coordinates. In particular, I am trying the test_move example located in the UR repository. In order to do this, I am using Python programming language and the twist_controller from Universal Robots. However, I am unable to run the twist_controller, as it remains with status "stopped" and I cannot start the controller with rosservice calls. The same problem occurs when trying to use scaled_pos_joint_traj_controller or forward_cartesian_traj_controller, as well as when the controllers are called individually with no other controllers initiated.
Steps to Reproduce
Step1: Execute Launch
ros-iteam@rositeam-Modern-14-C12M:~/catkin_ws$ roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=192.168.56.10 kinematics_config:=/home/ros-iteam/catkin_ws/yaml/robot_calibration.yaml
Step2: Check Controller List
ros-iteam@rositeam-Modern-14-C12M:~/catkin_ws$ rosservice call /controller_manager/list_controllers
controller:
-
name: "twist_controller"
state: "stopped"
type: "ros_controllers_cartesian/TwistController"
claimed_resources:
-
hardware_interface: "ros_controllers_cartesian::TwistCommandInterface"
resources:
- elbow_joint
- shoulder_lift_joint
- shoulder_pan_joint
- tool0_controller
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
Expected Behavior
I expect for the controllers to start and remain in "running" unless otherwise specified. This is needed for remote operating the UR5e robot arm with OnRobot RG2 gripper using Python and Cartesian Coordinates.
Actual Behavior
The launch displays "Started controller: twist_controller" but the twist_controller status is "stopped" when checking controller_manager. This happens similarly for other controllers.
Relevant log output
ros-iteam@rositeam-Modern-14-C12M:~/catkin_ws$ roscd ur_robot_driver/
ros-iteam@rositeam-Modern-14-C12M:/opt/ros/noetic/share/ur_robot_driver$ cd ./launch/
ros-iteam@rositeam-Modern-14-C12M:/opt/ros/noetic/share/ur_robot_driver/launch$ sudo vim ur5e_bringup.launch
<?xml version="1.0"?>
<launch>
<arg name="debug" default="false" doc="Debug flag that will get passed on to ur_common.launch"/>
<arg name="robot_ip" doc="IP address by which the robot can be reached."/>
<arg name="reverse_ip" default="" doc="IP of the driver, if set to empty it will detect it automatically."/>
<arg name="reverse_port" default="50001" doc="Port that will be opened by the driver to allow direct communication between the driver and the robot controller."/>
<arg name="script_sender_port" default="50002" doc="The driver will offer an interface to receive the program's URScript on this port. If the robot cannot connect to this port, `External Control` will stop immediately."/>
<arg name="trajectory_port" default="50003" doc="Port that will be opened by the driver to allow trajectory forwarding."/>
<arg name="script_command_port" default="50004" doc="Port that will be opened by the driver to allow forwarding script commands to the robot."/>
<arg name="tf_prefix" default="" doc="tf_prefix used for the robot."/>
<arg name="controllers" default="twist_controller" doc="Controllers that are activated by default."/>
<arg name="stopped_controllers" default="" doc="Controllers that are initally loaded, but not started."/>
<arg name="controller_config_file" default="$(find ur_robot_driver)/config/ur5e_controllers.yaml" doc="Config file used for defining the ROS-Control controllers."/>
<arg name="robot_description_file" default="$(find ur_description)/launch/load_ur5e.launch" doc="Robot description launch file."/>
<arg name="kinematics_config" default="$(find ur_description)/config/ur5e/default_kinematics.yaml" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description."/>
<arg name="use_tool_communication" default="false" doc="On e-Series robots tool communication can be enabled with this argument"/>
<arg name="tool_voltage" default="0" doc="Tool voltage set at the beginning of the UR program. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_parity" default="0" doc="Parity configuration used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_baud_rate" default="115200" doc="Baud rate used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_stop_bits" default="1" doc="Number of stop bits used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_rx_idle_chars" default="1.5" doc="Number of idle chars in RX channel used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_tx_idle_chars" default="3.5" doc="Number of idle chars in TX channel used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_device_name" default="/tmp/ttyUR" doc="Local device name used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_tcp_port" default="54321" doc="Port on which the robot controller publishes the tool comm interface. Only used, when `use_tool_communication` is set to true."/>
<arg name="headless_mode" default="false" doc="Automatically send URScript to robot to execute. On e-Series this does require the robot to be in 'remote-control' mode. With this, the URCap is not needed on the robot."/>
<arg name="ur_hardware_interface_node_required" default="true" doc="Shut down ros environment if ur_hardware_interface-node dies."/>
<include file="$(find ur_robot_driver)/launch/ur_common.launch" pass_all_args="true" />
</launch>
ros-iteam@rositeam-Modern-14-C12M:/opt/ros/noetic/share/ur_robot_driver/launch$ sudo vim ur_control.launch
<?xml version="1.0"?>
<launch>
<!-- GDB functionality -->
<arg name="debug" default="false" doc="If set to true, will start the driver inside gdb" />
<arg unless="$(arg debug)" name="launch_prefix" value="" />
<arg if="$(arg debug)" name="launch_prefix" value="gdb --ex run --args" />
<arg name="use_tool_communication" doc="On e-Series robots tool communication can be enabled with this argument"/>
<arg name="controller_config_file" doc="Config file used for defining the ROS-Control controllers."/>
<arg name="robot_ip" doc="IP address by which the robot can be reached."/>
<arg name="reverse_ip" default="" doc="IP of the driver, if set to empty it will detect it automatically."/>
<arg name="reverse_port" default="50001" doc="Port that will be opened by the driver to allow direct communication between the driver and the robot controller."/>
<arg name="script_sender_port" default="50002" doc="The driver will offer an interface to receive the program's URScript on this port. If the robot cannot connect to this port, `External Control` will stop immediately."/>
<arg name="trajectory_port" default="50003" doc="Port that will be opened by the driver to allow trajectory forwarding."/>
<arg name="script_command_port" default="50004" doc="Port that will be opened by the driver to allow forwarding script commands to the robot."/>
<arg name="kinematics_config" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description. Pass the same config file that is passed to the robot_description."/>
<arg name="tf_prefix" default="" doc="tf_prefix used for the robot."/>
<arg name="controllers" default="twist_controller"/>
<arg name="stopped_controllers" default=""/>
<arg name="urscript_file" default="$(find ur_client_library)/resources/external_control.urscript" doc="Path to URScript that will be sent to the robot and that forms the main control program."/>
<arg name="rtde_output_recipe_file" default="$(find ur_robot_driver)/resources/rtde_output_recipe.txt" doc="Recipe file used for the RTDE-outputs. Only change this if you know what you're doing."/>
<arg name="rtde_input_recipe_file" default="$(find ur_robot_driver)/resources/rtde_input_recipe.txt" doc="Recipe file used for the RTDE-inputs. Only change this if you know what you're doing."/>
<arg name="tool_voltage" default="0" doc="Tool voltage set at the beginning of the UR program. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_parity" default="0" doc="Parity configuration used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_baud_rate" default="115200" doc="Baud rate used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_stop_bits" default="1" doc="Number of stop bits used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_rx_idle_chars" default="1.5" doc="Number of idle chars in RX channel used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_tx_idle_chars" default="3.5" doc="Number of idle chars in TX channel used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_device_name" default="/tmp/ttyUR" doc="Local device name used for tool communication. Only used, when `use_tool_communication` is set to true."/>
<arg name="tool_tcp_port" default="54321" doc="Port on which the robot controller publishes the tool comm interface. Only used, when `use_tool_communication` is set to true."/>
<arg name="headless_mode" default="false" doc="Automatically send URScript to robot to execute. On e-Series this does require the robot to be in 'remote-control' mode. With this, the URCap is not needed on the robot."/>
<arg name="servoj_gain" default="2000" doc="Specify gain for servoing to position in joint space. A higher gain can sharpen the trajectory."/>
<arg name="servoj_lookahead_time" default="0.03" doc="Specify lookahead time for servoing to position in joint space. A longer lookahead time can smooth the trajectory."/>
<arg name="ur_hardware_interface_node_required" default="true" doc="Shut down ros environment if ur_hardware_interface-node dies."/>
<arg name="use_spline_interpolation" default="true" doc="True if splines should be used as interpolation on the robot controller when forwarding trajectory, if false movej or movel commands are used"/>
<!-- Load hardware interface -->
<node name="ur_hardware_interface" pkg="ur_robot_driver" type="ur_robot_driver_node" output="screen" launch-prefix="$(arg launch_prefix)" required="$(arg ur_hardware_interface_node_required)">
<param name="robot_ip" type="str" value="$(arg robot_ip)"/>
<param name="reverse_ip" value="$(arg reverse_ip)"/>
<param name="reverse_port" type="int" value="$(arg reverse_port)"/>
<param name="script_sender_port" type="int" value="$(arg script_sender_port)"/>
<param name="trajectory_port" value="$(arg trajectory_port)"/>
<param name="script_command_port" value="$(arg script_command_port)"/>
<rosparam command="load" file="$(arg kinematics_config)" />
<param name="script_file" value="$(arg urscript_file)"/>
<param name="output_recipe_file" value="$(arg rtde_output_recipe_file)"/>
<param name="input_recipe_file" value="$(arg rtde_input_recipe_file)"/>
<param name="headless_mode" value="$(arg headless_mode)"/>
<param name="tf_prefix" value="$(arg tf_prefix)"/>
<param name="use_tool_communication" value="$(arg use_tool_communication)"/>
<!--<param name="reverse_port" type="int" value="$(arg reverse_port)" />-->
<param name="tool_voltage" value="$(arg tool_voltage)"/>
<param name="tool_parity" value="$(arg tool_parity)"/>
<param name="tool_baud_rate" value="$(arg tool_baud_rate)"/>
<param name="tool_stop_bits" value="$(arg tool_stop_bits)"/>
<param name="tool_rx_idle_chars" value="$(arg tool_rx_idle_chars)"/>
<param name="tool_tx_idle_chars" value="$(arg tool_tx_idle_chars)"/>
<param name="servoj_gain" value="$(arg servoj_gain)"/>
<param name="servoj_lookahead_time" value="$(arg servoj_lookahead_time)"/>
<param name="use_spline_interpolation" value="$(arg use_spline_interpolation)"/>
</node>
<!-- Starts socat to bridge the robot's tool communication interface to a local tty device -->
<node if="$(arg use_tool_communication)" name="ur_tool_communication_bridge" pkg="ur_robot_driver" type="tool_communication" respawn="false" output="screen">
<param name="robot_ip" value="$(arg robot_ip)"/>
<param name="reverse_ip" value="$(arg reverse_ip)"/>
<param name="reverse_port" type="int" value="$(arg reverse_port)"/>
<param name="script_sender_port" type="int" value="$(arg script_sender_port)"/>
<param name="device_name" value="$(arg tool_device_name)"/>
<param name="tcp_port" value="$(arg tool_tcp_port)"/>
</node>
<!-- Load controller settings -->
<rosparam file="$(arg controller_config_file)" command="load"/>
<!-- spawn controller manager -->
<node name="ros_control_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" args="$(arg controllers) --timeout 600" />
<!-- load other controller -->
<node name="ros_control_stopped_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" args="--stopped $(arg stopped_controllers) --timeout 600" unless="$(eval arg('stopped_controllers') == '')"/>
<node name="controller_stopper" pkg="ur_robot_driver" type="controller_stopper_node" respawn="false" output="screen">
<remap from="robot_running" to="ur_hardware_interface/robot_program_running"/>
<rosparam param="consistent_controllers">
- "joint_state_controller"
- "speed_scaling_state_controller"
- "force_torque_sensor_controller"
- "robot_status_controller"
</rosparam>
</node>
<!-- Make sure to start this in the namespace of the hardware interface -->
<node ns="ur_hardware_interface" name="ur_robot_state_helper" pkg="ur_robot_driver" type="robot_state_helper" respawn="false" output="screen">
</node>
</launch>
Accept Public visibility
- [X] I agree to make this context public