Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

real robots overshoots #5

Open
chwimmer opened this issue Nov 27, 2014 · 6 comments
Open

real robots overshoots #5

chwimmer opened this issue Nov 27, 2014 · 6 comments

Comments

@chwimmer
Copy link

Hallo Sven!
Hi, I am trying to use your Kinematics Solver with a real youbot (Hydro and MoveIt!). It works, but the Robot overshoots hard. So its impossible to use it.
Here is an example:
I tried just to move to this Joint Values:
Joint 1 = 2.56244
Joint 2 = 1.04883
Joint 3 = -2.43523
Joint 4 = 1.73184
And than back to the start position:
Joint 1 = 0.11;
Joint 2 = 0.11;
Joint 3 = -0.11;
Joint 4 = 0.11;
And the results are:
[ INFO] [1417081506.139020171]: Unfold the arm:
[ INFO] [1417081506.139160314]: Joint 1: 2.463744
[ INFO] [1417081506.139221442]: Joint 2: 1.022458
[ INFO] [1417081506.139326833]: Joint 3: -2.243019
[ INFO] [1417081506.139434231]: Joint 4: 2.004181
[ INFO] [1417081506.139554560]: Fold the arm
[ INFO] [1417081511.904251690]: Back to the start position:
[ INFO] [1417081511.904400356]: Joint 1: -0.007522
[ INFO] [1417081511.904490749]: Joint 2: 0.093472
[ INFO] [1417081511.904563730]: Joint 3: -0.124973
[ INFO] [1417081511.904638793]: Joint 4: -0.004159

So you can see its not really working properly on my Robot.
When I just use the Youbot_API it works really fine.
Same Example:
Info: unfold arm
Joint 1: 2.56244
Joint 2: 1.04883
Joint 3: -2.43524
Joint 4: 1.73184
Info: fold arm
Joint 1: 0.109996
Joint 2: 0.109996
Joint 3: -0.110003
Joint 4: 0.11

Did you have the same problem? And when yes, how did you solve it?

Thanks!

chwimmer

@svenschneider
Copy link
Owner

Hi chwimmer,

sorry for the delayed answer.

We also have/had issues with the arm overshooting. In order to find out, if the source of the issue is the same, I would like to know, which interface of the youBot API you have been using in the second scenario? Was it

If you have used the position interface I would like to ask you to try out the trajectory interface and identify if you also have overshooting then (i.e. the controller parameters in the youBot driver are not correct). In contrast, if you have used the trajectory interface already, we will have to search further.

Best regards
Sven

@chwimmer
Copy link
Author

Hallo again!
I think you missunderstood what I have done at the second scenario. I didn’t use the ROS-Topics at all. I used the Youbot-API like in the Hello-World Example Program (https://github.com/youbot/youbot_applications/blob/master/hello_world_demo/src/main.cpp)
What shows that the internal control of the arm works.
So I got a solussion but its not really a good one and it doesn’t satiesfy me at all.
So my Sollusion ist to edit the joint_limits.yaml-Configuration file and set down the max_velocity to 0.2.
Now it works correctly but its so slow... And slow ist boring ;)
How I understand it Moveit sends for each joint a Message like this:
A few Waypoints between the Start and the End Position with this values:
-position
-velocity
-acceleration
So there can be two possibilities:
First the MoveIt Planner calculates the values wrong.
Or second the actionserver at the youbot which receives the message fails somehow. (Perhaps just the internal PC is too slow or something like that)
I hope I'm on the right way :)

@svenschneider
Copy link
Owner

Hi chwimmer,

I understood what you have done in the second scenario (but the links were probably confusing). In the link which you provided, though, the position interface of the internal arm controllers is used. This is the same controller which is used by the "arm_controller/position_command" ROS topic. However, when you run MoveIt!, it uses the "arm_controller/follow_joint_trajectory" ROS action. This action, in contrast, is built on the velocity interface of the internal arm controllers (see https://github.com/youbot/youbot_driver/blob/master/youbot/JointTrajectoryController.cpp#L327). Therefore, you get a different behavior in your scenarios. Since the motion planner works in the simulation, I would claim that the generated plans are correct, but the configuration of the real robot is non-optimal.

So, how to solve this problem? I'm not exactly sure, but I would start tuning the joint trajectory controller inside of the youBot driver, which you can find here: https://github.com/youbot/youbot_driver/blob/master/youbot/JointTrajectoryController.cpp#L56

Please let me know if this is still unclear or solves the problem.

Best regards
Sven

@Ahmed-Nouman
Copy link

Well Sven,
I am having the same problem with Joint Trajectory Controller. It overshoot a lot and the problem is that it even does not go to same position if we run the code again.
I think that the trajectory generated by moveit is fine but the controller gains are not set optimally. The robot tries to move to fast to my liking and in the end overshoot.
Did you find a solution for it till yet?

@svenschneider
Copy link
Owner

Hi,

I have not worked further on the issue. But as you mentioned, this is a problem of the youBot driver (https://github.com/youbot/youbot_driver) and not this package. Have you tried following the hint in my previous comment and adjusted the gains? If so, you could send a pull request to the youbot_driver repository.

Best regards
Sven

@Ahmed-Nouman
Copy link

Hello,
The problem is that trajectory from OMPL or Move it uses Trajectory messages and require torque controller which for youbot has not been configured in my opinion. I spend a few days and finally found theses stuff. I have tried 1 and 2 but not 3. Option 2 works well for me However Option 3 might be the best one.

  1. You can tune the parameter. Here is a configuration file i found. I tried it it did work better but still it was far from what i needed.
    https://gitlab.com/robottoOvGU/youbot_driver/blob/f86ce87a88297b6054415529a4debb6da9813082/config/youbot-manipulator.cfg
  2. I use your youbot package but convert my geometrr messages or trajectory messages into arm_controller/position messages just like link below and it works very well.
    https://libraries.io/github/usnistgov/youbot
  3. You can use torque controller and configure it like they did in link below but i could not proceed on it as solution 2 works very well for me.
    https://github.com/uzh-rpg/rpg_youbot_torque_control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants