Universal_Robots_ROS_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS_Driver copied to clipboard

UR5e with PC ros + moveit Can't accept new action goals Controller is not running.

Open rrapi opened this issue 3 years ago • 2 comments

Hi everyone,

For moving the real robot I am using the default setup of universal robots repo (calibration-devel branch of fmauch) and the ur_robot_driver (melodic branch) of Universal_Robots_ROS_Driver. I am using a Docker container with Ubuntu 18.04 and ROS Melodic and a RGB camera for the robot perception.

The commands that I execute for connecting with robot are:

  1. roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=IP kinematics_config:=${HOME}/project/configs/ur5e_calibration.yaml use_tool_communication:=true tool_device_name:=/tmp/ttyUR
  2. roslaunch ur5e_moveit_config ur5e_moveit_planning_execution.launch
  3. roslaunch ur5e_moveit_config moveit_rviz.launch

I execute also rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /tmp/ttyUR for controlling the gripper.

The 3 commands ends perfectly and the bringup (1.) one gives as output:

[INFO] [1656453338.784869]: Controller Spawner: Loaded controllers: joint_state_controller, scaled_pos_joint_traj_controller, speed_scaling_state_controller, force_torque_sensor_controller [INFO] [1656453338.790774]: Started controllers: joint_state_controller, scaled_pos_joint_traj_controller, speed_scaling_state_controller, force_torque_sensor_controller [ INFO] [1656453340.[297242114]: Robot requested program [ INFO] [1656453340.[297387822]: Sent program to robot [ INFO] [1656453340.[347174194]: Robot connected to reverse interface. Ready to receive control commands.

(in my case I am using scaled_pos_joint_traj_controller)

But after a while, that robot moves correctly, the connected between PC Ros and UR5e is loosed and the output that the bringup command shows is:

[ INFO] [1656453371.[261849346]: Connection to reverse interface dropped. [ERROR] [1656453371.[262043525]: Sending data through socket failed. [ INFO] [1656453371.[262272895]: Robot connected to reverse interface. Ready to receive control commands. [ INFO] [1656453372.[713791775]: Connection to reverse interface dropped. [ERROR] [1656453372.[714016804]: Sending data through socket failed. [ INFO] [1656453372.[714270865]: Robot connected to reverse interface. Ready to receive control command

........

[ WARN] [1656453432.[335778376]: Connection attempt on port 50003 while maximum number of clients (1) is already connected. Closing connection. [ INFO] [1656453491.[972101142]: Connection to reverse interface dropped. [ERROR] [1656453491.[972204776]: Sending data through socket failed. [ INFO] [1656453491.[972560075]: Robot connected to reverse interface. Ready to receive control commands.

........

[ INFO] [1656453614.[344554151]: Connection to reverse interface dropped. [ INFO] [1656453614.[345102856]: Robot connected to reverse interface. Ready to receive control commands. [ WARN] [1656453672.[108785302]: Connection attempt on port 50001 while maximum number of clients (1) is already connected. Closing connection. [ INFO] [1656453672.[177746651]: Connection to reverse interface dropped. [ERROR] [1656453673.[679565620]: Could not get fresh data package from robot [ERROR] [1656453673.[780101071]: Could not get fresh data package from robot

........

[INFO] [1656453680.549199]: Shutting down spawner. Stopping and unloading controllers... [INFO] [1656453680.557386]: Stopping all controllers... [ERROR] [1656453680.[563616827]: Could not stop controller 'pos_joint_traj_controller' since it is not running [INFO] [1656453680.564576]: Unloading all loaded controllers... [ERROR] [1656453680.[580085416]: Could not stop controller 'scaled_pos_joint_traj_controller' since it is not running

In the UR side I set an External Control with my IP address and port 50002 that I start after I launch the bringup command. I verified also that the Ethernet/IP is disabled.

Could it be a problem that in my plan I am using two actions that both starts moveit_commander for sending poses to the robot through MoveI??

I do not have any idea of what can be the problem and how to solve it. Could you please help me?

Thank you very much!! I would appreciate a lot your help!!

rrapi avatar Jun 28 '22 19:06 rrapi

On non-realtime kernel systems it can happen that the robot loses connection to the ROS interface due to missing packages. I'll probably address this pretty soon, as this is actually disturbing me in one of my projects, as well...

fmauch avatar Jun 29 '22 04:06 fmauch

Perfect!! Thank you very much @fmauch !!
I made some tests for understanding this problem, I didn't solve it properly, but I saw that this occurs very often, as I am using the robot in a network where is also my PC Ros, when there is like a ping from some other request. So I thought when there is like google chrome in background in my case. So when I was dealing with the robot, I exited from Chrome and then this problem happened very rarely. So I did not solve the problem but this could be a reason and a workaround. It happened some other few times also after closing Chrome, but I was using also VLC for registering the screen so maybe even this could affect this behaviour.

rrapi avatar Jun 30 '22 09:06 rrapi

@fmauch I've got the same problem, can you please help?

https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/issues/589#issuecomment-1328025373

stevensu1838 avatar Nov 26 '22 11:11 stevensu1838

This issue has not been updated for a long time. If no further updates are added, this will be closed automatically. Comment on the issue to prevent automatic closing.

github-actions[bot] avatar Feb 24 '23 22:02 github-actions[bot]

This issue has been closed due to inactivity. Feel free to comment or reopen if this is still relevant.

github-actions[bot] avatar Mar 27 '23 22:03 github-actions[bot]