ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Velocity control of PR2 arms and head

asked 2015-05-22 07:11:47 -0500

Fleurmond gravatar image

Hi all,

I'm trying to implement a visual servoing on PR2. I want to send joint velocities at some rate to the PR2 arms and the head.

After reading this tutorial Moving the arm using the joint trajectory action I computed an complete trajectory for joints of arms with around 800 waypoints (and provide velocity) with a period of 100 Hz, and send them to the robot in Gazebo simulation, it works almost perfectly [see bad video] ( https://www.youtube.com/watch?v=z8Ltc... ).

But when I compute periodically joints velocities and send them to the robot using the joint trajectory action with 1,2 or 3 way points, it seems to me that the arms follows the complete trajectory and stop at the last waypoint, whatever the given velocity.(and the visual servoing task is completed after 8 minutes instead of 13 seconds).

And also the head fall down to the front, while the next way point is computed to raise the head. I got all these results in Gazebo, with ROS Groovy on Ubuntu 12.04. ( I cannot upgrade the ROS neither the OS).

Is someone can point me the mistakes I possibly (probably) made, and suggest me a better way to implement the control, it would be really helpful.

Thank you in advance !

I can provide a more recent video if need, and please excuse the mistakes made by a french speaker.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-05-26 10:39:44 -0500

Fleurmond gravatar image

updated 2015-05-26 10:42:12 -0500

I solved one part of the problem.

The main part is the periodicity of the control loop. I had to be sure that the control was sent to the robot in a suitable rate.

The computation time of the block for compute and send the command was evolving between 0.13 to 0.62 secs, but the time length of sent trajectory was really smaller around 0.05 secs

I optimized my code, mainly the most expensive functions, remove some weirds waiting calls. and the computation time drop down under 0.002 sec in ROS time on my computer. Then I could send easily control at 40 Hz.

But there still one problem, the head always fall down.

edit flag offensive delete link more

Comments

1

The tilt controller in the PR2 head cannot raise the head once it's pointed straight down. You should set a limit in your algorithm so that you don't send head tilt positions below a certain threshold. (I don't remember the exact threshold; you'll have to test and find out).

ahendrix gravatar image ahendrix  ( 2015-05-26 15:32:14 -0500 )edit

I will check that, but its the same for the controller on the robot and in gazebo simulator ? I had the problems on simulation, I did not checked yet in the real robot.

Fleurmond gravatar image Fleurmond  ( 2015-05-27 08:33:25 -0500 )edit

I checked on the real robot, the head falls down. I will look for the threshold. But I'm surprised to not be able to find other peoples with my problem.

Fleurmond gravatar image Fleurmond  ( 2015-06-16 09:50:59 -0500 )edit

Question Tools

Stats

Asked: 2015-05-22 07:11:47 -0500

Seen: 609 times

Last updated: May 26 '15