Hi,

I am trying to have a manipulator follow a cube on a conveyor belt. I have looked at the 'blobDetectionWithPickAndPlace' demo, but I am controlling my arm through a similar way that the Kinovas are controlled in the 'motionPlanningAndGraspingDemo' (using sim.rmlStep rather than sim.rmlMoveToPosition). The reason I do this is because I want to be able to step the environment from Python; hence why I am using the sim.rmlPos and sim.rmlStep function.

I have tried to replicate what was done in 'blobDetectionWithPickAndPlace', which in this case is simple because you can just work out where the object will be after a certain number of timesteps and then use sim.rmlMoveToPosition (setting the velocity to match that of the conveyor). But with the simplifying assumptions made for the planning with the Kinovas in 'motionPlanningAndGraspingDemo' (you talked about it some in this post), it becomes more difficult because we are working with 1 dimensional rml.

So 2 questions:

- How would you deal with it in this case?

- Has there been any updates since that forum post I shared? i.e. the RML functions for N DoFs of the robot.

Thanks!

## Tracking Object on Conveyor Belt with sim.rmlStep

### Re: Tracking Object on Conveyor Belt with sim.rmlStep

Hello,

the RML functions can since always be used for N-DoF spaces.

For what you want to do, you could have a look at the demo scene

Cheers

the RML functions can since always be used for N-DoF spaces.

For what you want to do, you could have a look at the demo scene

*blueRealityTeaser.brs*. The robot executes motions using routine*RobPlace*in file*/BlueWorkforce/modelScripts/ragnar_child.lua*Cheers

### Re: Tracking Object on Conveyor Belt with sim.rmlStep

Thanks!

In that case, I guess if I wanted to reproduce the 'motionPlanningAndGraspingDemo' today without this 1D workaround that was added due to the RML limitation, then how would I proceed? Is the following correct:

- (As befoe) Plan a collision free path to get a series of way-points in configuration space (i.e. array of length: #DOF*PathLength).

- Call

Is this the correct way to go about this? Taking note that the joints are in torque/force mode for this demo, and not in IK mode.

My issue with this over the original method in the demo, is that letting rml consider the trajectory as a whole (making the 1D assumption) means that you have a smooth acceleration/deceleration, where as if you implement the one I suggested above, then I assume you would get a relatively sudden acceleration/deceleration.

In that case, I guess if I wanted to reproduce the 'motionPlanningAndGraspingDemo' today without this 1D workaround that was added due to the RML limitation, then how would I proceed? Is the following correct:

- (As befoe) Plan a collision free path to get a series of way-points in configuration space (i.e. array of length: #DOF*PathLength).

- Call

**sim.rmlPos**for way-point**i**along the path (setting DOF to 6 and setting dynamic constraints), followed by calling**sim.rmlStep**. If rmlStep returns true, then we can advance to the next way-point (**i+=1**), otherwise we repeat with the same way-point.Is this the correct way to go about this? Taking note that the joints are in torque/force mode for this demo, and not in IK mode.

My issue with this over the original method in the demo, is that letting rml consider the trajectory as a whole (making the 1D assumption) means that you have a smooth acceleration/deceleration, where as if you implement the one I suggested above, then I assume you would get a relatively sudden acceleration/deceleration.

### Re: Tracking Object on Conveyor Belt with sim.rmlStep

You basically have 2 options:

- You use the path points (in conf. space), which gives you a N-DoF curve. You decide of a metric for that space, which allows you to compute a distance along that N-DoF curve. Then, having the distance of your curve, you can move along it using 1-DoF RML functions. Your manipulator will perfectly follow the curve, but you can't take into account individual joint limitations (e.g. max. vel. or acceleration constraints)
- You consider separately the N path points, which allows you to compute N distances. Then you can use N-DoF RML functions to bring each joint from its start to its desired position/angle. The problem here is that you won't perfectly follow the curve. On the other hand you can take into account individual joint limitations (max. velocity and max. acceleration)