Ask Your Question
2

Draw a circle with a robotic arm?

asked 2012-08-01 19:50:10 -0600

updated 2014-01-28 17:13:13 -0600

ngrennan gravatar image

I believe the technical term for this would be "arm navigation planning with hard dynamic geometric constraints". But my question would be how can I implement trajectory planning of a circle or similar geometric path with a robotic arm?

Using a series of concentrated waypoints in the arm navigation would be one way I would guess. But slow to compute and carry out?

To want to draw a circle or other geometric object with a robotic arm seems fairly fundamental, yet it actually appears to be quite complicated.

Any advice?

edit retag flag offensive close merge delete

Comments

I don't work with arms but I suppose you can set something similar to a nav_msgs/Path sampling your trajectory.

martimorta gravatar imagemartimorta ( 2012-08-02 00:03:13 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
2

answered 2015-11-26 13:40:42 -0600

Shawn Schaerer gravatar image

Look at the ROS Scan and Plane application from ROS-Industrial. you can use the Descartes planner for that.

Here is a link to the ROS-Industrial training examples. I just took the training and I made a UR-5 Arm follow a complex trajectory. Getting the robot to move in a circle will be very easy to do. You need to feed the Descartes planner a list of trajectory points for your circle and it will take care of the rest.

http://aeswiki.datasys.swri.edu/rosit...

Review Session 4 and then do Application Demo - Descartes Planning and Execution

that will get you want you need.

edit flag offensive delete link more
1

answered 2015-11-19 14:59:47 -0600

Chuong Nguyen gravatar image

I use the waypoints by following this Tutorial http://docs.ros.org/indigo/api/pr2_mo...

Note that, you can specify the the interpotion resolution between two consecutive waypoints. Here is my implementation

  //2. Create Cartesian Paths
  std::vector<geometry_msgs::Pose> waypoints;
  geometry_msgs::Pose ee_point_goal; //end_effector_trajectory
  ee_point_goal.orientation.w = 1.0;
  ee_point_goal.position.z = 0.8;
      // Trajectory parameters (circle)
  double d_angle = angle_resolution*3.14/180;
  double angle= 0;

  //----------------------------------------------------------------------
  //3. Plan for the trajectory
  for (int i= 0; i< (360/angle_resolution); i++)
  {
    //discretize the trajectory
    angle+= d_angle;
    ee_point_goal.position.x = x_center + radius*cos(angle);
    ee_point_goal.position.y = y_center + radius*sin(angle);
    waypoints.push_back(ee_point_goal);
    //ROS_INFO("%d",i);
  }

  ROS_INFO("There are %d number of waypoints", waypoints.size());
  // We want cartesian path to be interpolated at a eef_resolution
  double eef_resolution = std::min(0.01,radius*angle_resolution);
  double jump_threshold = 0.0; //disable the jump threshold =0
  moveit_msgs::RobotTrajectory trajectory;
  double fraction =plan_group.computeCartesianPath(waypoints, eef_resolution,jump_threshold, trajectory);

  ROS_INFO("Visualizing plan 4 (cartesian path) (%.2f%% acheived)",  fraction * 100.0);
edit flag offensive delete link more

Comments

Hi! I'm following this tutorial you have shared (it looks really helpful), but, the robot only plans the trajectory, it doesn't execute the trajectory, how can I execute it? Usually I use group.move() for moving my robot, but in this case, it doesn't work.

Fredylucas gravatar imageFredylucas ( 2015-11-27 15:05:59 -0600 )edit

You can add the following code to make it move. Hope this help

moveit::planning_interface::MoveGroup::Plan my_plan;
my_plan.trajectory_ = trajectory;
sleep(5.0);
  plan_group.execute(my_plan);
Chuong Nguyen gravatar imageChuong Nguyen ( 2015-11-27 16:12:00 -0600 )edit

Thank you very much, indeed it moves; nevertheless, it is very slow.

Fredylucas gravatar imageFredylucas ( 2015-11-30 10:58:58 -0600 )edit

what's the"angle_resolution"mean ,where is its definition?@Freaylucas

WuJeff gravatar imageWuJeff ( 2016-05-06 01:29:59 -0600 )edit

That is just a constant you set, it means the resolution in degrees you want for the rotational movement; d_angle is the same but in radians. I.e, in this way you set the number of points you want for interpolating your trajectory.

Fredylucas gravatar imageFredylucas ( 2016-05-06 15:25:00 -0600 )edit

@Fredylucas It's just move the first waypoints,not a circle,how to do ?

WuJeff gravatar imageWuJeff ( 2016-05-14 05:22:27 -0600 )edit
0

answered 2012-08-02 10:50:20 -0600

David Lu gravatar image

I have moved the PR2 arm in "circles", but primarily using waypointss and wayvelocities(?).

edit flag offensive delete link more
4

answered 2012-08-02 07:24:37 -0600

egiljones gravatar image

Pretty much all the code I'm aware of that Willow Garage has produced in the arm navigation space is focused on getting the arm from Point A to Point B, generally in order to perform a manipulation operation. We allow users to impose constraints on the path - keep the end effector upright, for instance - but the path constraints are still designed to condition the path from point A to point B, not change the purpose of the planner.

Having the end effector follow a shape is a different kind of planning problem, one where the purpose is the path, not moving from one point to another, and we really don't have much code for such things. Coverage algorithm - for instance, plan a path that would paint an irregular surface as quickly as possible - are other examples of areas Willow Garage hasn't really focused on. There may be other code in the larger ROS landscape that does such things, but I'm not aware of it.

If I were to attempt to address such problems I'd look at the literature and try a few things out, using some of the lower-level tools from arm_navigation, like collision-checking and inverse kinematics. An approach that might work ok for attempting a geometric path would be to discretize the shape into a series of end effector positions, call IK for each one, and try to interpolate between the poses, making sure that the arm didn't hit joint limits or singularities. This might not give a great path, but could get the job done.

I suspect that general code that would do for coverage/path-focused problems what arm_navigation does for Point to Point travel would be a protracted research/tech-transfer project.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-08-01 19:50:10 -0600

Seen: 3,538 times

Last updated: Nov 26 '15