Controlling uarm in VREP using motion planning from MOVEIT!

Typically: "How do I... ", "How can I... " questions
Post Reply
EyaR
Posts: 8
Joined: 10 Jun 2019, 10:30

Controlling uarm in VREP using motion planning from MOVEIT!

Post by EyaR » 11 Jun 2019, 09:45

Hello,

I have done the motion planning using moveit!. I 'm using move group interface (python) to create joint space goal and currently i'm visualising the motion planning in rviz.

In vrep, i was able to create a subscriber to receive the message sent from MoveIt python node. I'm subscribing to /joint_states sent from moveit node and The message type i'm using is 'sensor_msgs/JointState'. And, this way i was able to see each joint position and velocity ....

However i want to control uarm robots in vrep by using the motion planning from moveit. Tried using sim.setJointPosition and sim.setJointForce but didn't work cause the joints declared in moveit are not the same as in vrep (in vrep to move uarm uses links and motors.. while in moveit there is only joints).

My questions are:

1. How can i control uarm from moveit. is there a specific topic i should be using rather than /joint_states

2. what parameter i should use to control the arm in vrep other than simSetJointPosition

3. Are there any tutorials or references that i can refer to?

Thank you in advance.

fferri
Posts: 398
Joined: 09 Sep 2013, 19:28

Re: Controlling uarm in VREP using motion planning from MOVEIT!

Post by fferri » 11 Jun 2019, 10:41

EyaR wrote:
11 Jun 2019, 09:45
In vrep, i was able to create a subscriber to receive the message sent from MoveIt python node. I'm subscribing to /joint_states sent from moveit node and The message type i'm using is 'sensor_msgs/JointState'. And, this way i was able to see each joint position and velocity ....

However i want to control uarm robots in vrep by using the motion planning from moveit. Tried using sim.setJointPosition and sim.setJointForce but didn't work cause the joints declared in moveit are not the same as in vrep (in vrep to move uarm uses links and motors.. while in moveit there is only joints).
Then name the joints in V-REP the same as how you named those in MoveIt! node.

V-REP also has joints, there is no notion of links, I don't understand what you mean with "in vrep to move uarm uses links and motors.. while in moveit there is only joints".

If you can post a screenshot of the scene tree in V-REP showing all the relevant joints of your robot, and also print the received message from MoveIt and show the output to us, we can give you more support.

EyaR
Posts: 8
Joined: 10 Jun 2019, 10:30

Re: Controlling uarm in VREP using motion planning from MOVEIT!

Post by EyaR » 11 Jun 2019, 11:29

Hello and thank you for your quick reply,

Here's a screenshot on the screenshot of the scene tree in moveit
https://ibb.co/wNPmCJm

and here's tree in vrep
https://ibb.co/M78pWqT

the position i'm getting from moveit:
{4.4548270199448e-05, -0.78540409499386, -9.0923487860709e-05, 0, 0, 0, 0, 0, 0}

While the position i'm getting in vrep when using sim.getJointPosition on each joint are:
joint1-> 0.00081190624041483,
joint2->6.9230794906616e-05
joint4->0.00072822492802516
Joint5->1.7881393432617e-07
Joint7->0.0016228148015216
Joint8-> -7.0669397246093e-05

(joint3, joint6 &joint9 are declared in vrep as spherical joints so i can't get their positions using sim.getJointPosition)
PS : I'm vrey new in moveit and vrep

fferri
Posts: 398
Joined: 09 Sep 2013, 19:28

Re: Controlling uarm in VREP using motion planning from MOVEIT!

Post by fferri » 11 Jun 2019, 12:47

Probably the joints have different offsets in the V-REP model and in the URDF or SDF model you use in MoveIt!.

Set both to the {0,0,0,0,0,0,0} configuration (or some other arbitrary joint configuration) and make sure they match before proceeding with anything else.

You can adjust the offset of a revolute joint in V-REP by rotating it around its Z axis.

EyaR
Posts: 8
Joined: 10 Jun 2019, 10:30

Re: Controlling uarm in VREP using motion planning from MOVEIT!

Post by EyaR » 12 Jun 2019, 07:58

I just fixed the default position of both moveit and vrep to {0,0,0,0,0,0,0} position. But nothing changed.
Maybe i wasn't very clear with what i want to do. So i want my robot to use moveit motion in vrep but i guess giving it just the position of each joint isn't going to work ??

fferri
Posts: 398
Joined: 09 Sep 2013, 19:28

Re: Controlling uarm in VREP using motion planning from MOVEIT!

Post by fferri » 12 Jun 2019, 08:44

You need to implement in V-REP a controller to execute the joint trajectory given by MoveIt.

Post Reply