How to implement velocity control? [closed]
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
I assume, you use the
ur_robot_driver
? If so, you could use the set_speed_slider service to slow down the robot directly.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.
I believe fzi-forschungszentrum-informatik/cartesian_controllers#16 is also posted by you, correct?
Hello gvdhoorn, no this Isn't me. I'm not studying Informatics and not using the UR5.
Ok. Seems like it's a least a similar context.
@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.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.