## How can I get tf data from ros to v-rep?

Typically: "How do I... ", "How can I... " questions
Quartz
Posts: 7
Joined: 08 Jan 2018, 19:31

### How can I get tf data from ros to v-rep?

Hello everyone.

I'm working with kinect on ros and v-rep. And I'm using openni_tracker to get the position of my body and send it as a TF data on ROS.
And I'm writing this post because I need to know tp how receive tfdata from a ros node to v-rep using vrep_ros_interface. I created a listener to this tf broadcaster and publish a position data on ros, and this data I could subscribe using simExtRosInterface_subscribe function. But by doing this I'm getting problem with my elbow joint. When I rotate my elbow in order to change my hand position from -z to z (for example). The Z value of my elbow joint increase/decrease, when it's not supposed to. That's why I'm asking about how to subscribe the broadcaster on V-rep and manipulate this data using non-threaded script. Maybe this could fix my problem of elbow joint.

That's the function I'm using on my tf_listener node. Notice that I'm not facing any problems with my shoulder and hand joint, only my elbow joint is getting position problems

Code: Select all

// left shoulder joint
left_shoulder_pose.x = transform_left_shoulder.getOrigin().x();
left_shoulder_pose.y = transform_left_shoulder.getOrigin().y();
left_shoulder_pose.z = transform_left_shoulder.getOrigin().z();
// left elbow joint
left_elbow_pose.x = transform_left_elbow.getOrigin().x();
left_elbow_pose.y = transform_left_elbow.getOrigin().y();
left_elbow_pose.z = transform_left_elbow.getOrigin().z();
// left hand joint
left_hand_pose.x = transform_left_hand.getOrigin().x();
left_hand_pose.y = transform_left_hand.getOrigin().y();
left_hand_pose.z = transform_left_hand.getOrigin().z();
Thanks for everything

Luiz Arthur (Quartz)
Last edited by Quartz on 16 Apr 2018, 18:04, edited 1 time in total.

edward
Posts: 1
Joined: 11 Jan 2018, 09:27

### Re: How can I get tf data from ros to v-rep?

Hello,

I made v-rep vehicle simulator several month ago.
I did use tf topic to use in ROS and it's working fine.

https://github.com/tigerk0430/V-Rep-Aut ... -Simulator

.ttt file for more detail
Thank you

Quartz
Posts: 7
Joined: 08 Jan 2018, 19:31

### Re: How can I get tf data from ros to v-rep?

Thanks for these files. But i see that you broadcast a tf from v-rep to ros.

At this part right?

Code: Select all

 transformations = {}
simExtRosInterface_sendTransforms(transformations)