Move manipulator on smooth trajectory

Typically: "How do I... ", "How can I... " questions
Post Reply
dknetz
Posts: 8
Joined: 07 May 2014, 14:23

Move manipulator on smooth trajectory

Post by dknetz »

Hi,

I currently try to move a 7DOF arm on a smooth trajectory consisting of several waypoints (joint values). The waypoints are computed with moveit and are sent to V-REP via a ROS service (using a v-rep plugin). I am able to retrieve the data in the LUA script in the simulator. For moving the arm to the target I use simRMLMoveToJointPositions(). My idea was to use the targetVelocity and currentVelocity fields to get a smooth movement by setting the targetVelocity to a velocity pointing into the direction of the second next waypoint and the currentVelocity to the value that is returned by simRMLMoveToJointPositions(). As long as I use a 0 table in the target velocity field everything is fine and moves as expected. However, due to the 0 target velocities the robot stops every few centimeters. If I set a target velocity != 0 a strange behaviour occurs - the arm is moving back and forth and will never reach the goal. Do you have an idea, why this happens or is there another way of doing it?

Cheers,
dknetz

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Move manipulator on smooth trajectory

Post by coppelia »

Hello dknetz,

what you are experiencing is very probably due to following situation:

simRMLMoveToJointPositions will simply compute and apply new joint positions, without taking into account the joint limitations (e.g. limitations in torque, or probably more important in your case: limitations in velocity). So if your joint's settings in the joint dynamic properties have an upper velocity limit, these might be incompatible with the parameters provided to the simRMLMoveToJointPositions function (such as the maximumVelocity argument).

Have a look how the situation is handled in routine executeMotion in the child script attached to one of the two robots in the demo scene motionPlanningAndGraspingDemo.ttt.

Cheers

Post Reply