Universal_Robots_ROS_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS_Driver copied to clipboard

whether urscript and twist_controller CANNOT be used in one python program

Open Luminary-S opened this issue 2 years ago • 1 comments

Prepare: I start the UR3 use ur_robot_driver nice and well in the terminal, and start the TP as fmauch told us in many previous answers.

Target: I have a program for controlling the UR3 first go to an init cartesian position and then use twist_controller to fulfill a twist control in the cartesian space.

Problem: The whole function used in one program, but when I publish urscript movel through topic "/ur_hardware_interface/script_command", the ur_robor_driver terminal shows [ERROR] [1685584458.273543300]: Sending data through socket failed. and the twist control published to "/twist_controller/command" CANNOT be impemented.

Then in TP, I find the external control stop, after restart the external control again by press the button, the resend "/twist_controller/command" CAN be impemented. However, the program can not be running well if no manual TP pressing the button.

Trial: I try to use switch_on_controller which gives us as an example in Integration_test.py and test_move, and try to change the controller through using 'switch_on_controller(TWIST_CONTROLLER,JOINT_VEL_CONTROLLER)' after the urscript publish finished, then erro msg shows: [ERROR] [1685584418.743013293]: Robot control is currently inactive. Starting controllers that claim resources is currently not possible. Not starting controller 'twist_controller' [ERROR] [1685584418.743218564]: Could not switch controllers. The hardware interface combination for the requested controllers is unfeasible.

Doubt: the urscript and twist_controller can not be used in one python program?

Luminary-S avatar Jun 01 '23 02:06 Luminary-S

Hi @Luminary-S I am facing the same issue. I want to use the ROS controllers first and then want to switch to urscript without manually changing it through reach pendant. Did you find any solutions?

MCR100 avatar Jul 31 '23 06:07 MCR100