Ask Your Question
0

How to implement velocity control? [closed]

asked 2021-03-08 11:21:45 -0600

TGSP gravatar image

Hello, i started working with ROS 3 months ago and i currently work on a University Project.

The Idea: I'm using the Universal Robot UR10. Mounted on the tip of it is a Force-Torque-Sensor. An object is attached to the sensor. The robot should follow a generated cartesian path until it moves into another Object. As soon as the Sensor Data changes/spikes, the robot should move slower. I'm working with ROS Melodic on Ubuntu 18.04

Current status: I added the sensor to the URDF (visualization/joint/link). I started creating a Program in Python to move the Robot in MoveIt via the moveitcommander/movegroup. While using the compute_cartesian_path() function and the retime_trajectory() function, i could change the velocity but only for the next given movement. After searching i realized, that what i want cannot be possible with my current Setup. I thought, maybe another Controller is necessary. Currently the follow_joint_trajectory controller is used. I came across other controllers like joint_effort_controller or velocity_controller. I cant decide which is better for me. As far as i know, the effort_controller uses the PID Values given from the robot itself. I only need the one from my own sensor.

Is there maybe a easier way to achieve my goal? Which controller should work best for me? Is there maybe an example of something similar (preferred in python?)

Ps: Should i be mixing some stuff up, please tell me. Currently I'm happy to have achieved to move the robot, change a URDF, spawn/attaching boxes),implementing the sensor

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by TGSP
close date 2021-03-14 10:52:14.727965

Comments

I assume, you use the ur_robot_driver? If so, you could use the set_speed_slider service to slow down the robot directly.

fexner gravatar image fexner  ( 2021-03-08 14:59:11 -0600 )edit

Thank you, Right now, i use the Industrial universal driver driver. Could you tell me the difference between the one I used and yours? Both are named universal robots driver. It's a bit confusing. It was,when I started,the first one I have seen. Right now my robot is in a simulated area with MoveIt and Gazebo. The sensor data will be changed by pressing my hand against. If all works, i can try it on the real robot.

I will try to implement the set_speed_slider, but is it really a realtime function? I mean,I need something I can put in my algorithm. The program should start and constantly readout the sensor data. And if,for example, a third of 50N (example value) is reached,the robot should slow down 50%. I need a function,to change the speed white the robot moves. Without stopping him.

TGSP gravatar image TGSP  ( 2021-03-08 15:21:31 -0600 )edit

I believe fzi-forschungszentrum-informatik/cartesian_controllers#16 is also posted by you, correct?

gvdhoorn gravatar image gvdhoorn  ( 2021-03-09 03:16:00 -0600 )edit

Hello gvdhoorn, no this Isn't me. I'm not studying Informatics and not using the UR5.

TGSP gravatar image TGSP  ( 2021-03-09 03:32:51 -0600 )edit

Ok. Seems like it's a least a similar context.

gvdhoorn gravatar image gvdhoorn  ( 2021-03-09 03:36:15 -0600 )edit

@TGSP if you want real-time interaction with your trajectory you'll have to go down to a controller level. Basically, you'll need a controller that reads FTS data while controlling the robot. If you hand the job of watching your force measurements to a separate node, then using the set_sped_slider service isn't the single critical operation inside this structure. The topic communication between the sensor and the watchdog node will also take a major effect on real-time performance.

fexner gravatar image fexner  ( 2021-03-10 03:15:06 -0600 )edit

I'm closing this for now. Thank you for your Answers. As my time for the submission deadline runs out, we took an easier approach.

TGSP gravatar image TGSP  ( 2021-03-14 10:50:34 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-03-09 03:07:00 -0600

gvdhoorn gravatar image

updated 2021-03-09 03:08:31 -0600

Right now, i use the Industrial universal driver driver. Could you tell me the difference between the one I used and yours?

the main difference would be that anything but UniversalRobots/Universal_Robots_ROS_Driver is deprecated for any Universal Robots robot with a CB3 controller and newer (including e-Series).

As stated in various places: do not use ur_modern_driver nor ur_driver for anything any more.

Or in other words:

Only UniversalRobots/Universal_Robots_ROS_Driver is supported with Universal Robots robots with a CB3 controller and newer (including e-Series).

edit flag offensive delete link more

Comments

Thank you, I didn't now that the Industrial one is also the modern driver. I'm will change that in my setup. As for the function set_speed_slider named in the comments, can you confirm (if you know it),that this is what I need?

TGSP gravatar image TGSP  ( 2021-03-09 03:37:27 -0600 )edit

I only posted this (ie: the deprecation information) as an answer to give it extra visiblity.

If stopping is your only concern, and you have no real-time requirements, perhaps the scaling offered by the service @fexner mentions could be useful.

gvdhoorn gravatar image gvdhoorn  ( 2021-03-09 03:41:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-03-08 11:21:45 -0600

Seen: 188 times

Last updated: Mar 09