0
$\begingroup$

Rosanswers logo

Hey,

I am new to ROS and I needed some help/guidance. I am using ROS(Fuerte) on a Virtual Machine. I am trying to understand how to transmit data(coordinates of a bot) from Optitrack(NatNet), installed on a different machine, to ROS (on a separate machine). I wish to understand this myself so if anyone can guide me or provide me with links to understand this, I would appreciate it. Please let me know if any other information is required from me.


Originally posted by nemesis on ROS Answers with karma: 237 on 2013-02-04

Post score: 1


Original comments

Comment by UbuntuROs on 2017-06-27:
Hello @nemesis how did you solve I am getting the same error like you used to get. Can you tell me how u were able to solve it?

Comment by nemesis on 2017-06-27:
@UbuntuROs I already have an answer to this question.

Comment by UbuntuROs on 2017-06-27:
Can you help me in solving the error? This is the steps I followed to connect Motive with Ros

  1. I git clone the file from https://github.com/clearpathrobotics/vrpn_client_ros
  2. exported it using the export command export VRPN_ROOT=path to where VRPN is located 3.install the necessary package

Comment by UbuntuROs on 2017-06-27:
4.Run catkin_make 5. Launch using $roslaunch vrpn_client_ros sample.launch server:=239.255.42.99 when i ran it, it says the connection is established but when i tried to run $rostopic command it says that the topic didnt established yet. What did I get wrong? I really need your help.

Comment by UbuntuROs on 2017-06-27:
Can you guide me through on how to create a connection between motive and ROS? I appreciate your help.

Comment by UbuntuROs on 2017-06-28:
@nemesis did u use Natnet or VRPN?

Comment by UbuntuROs on 2017-06-28:
@nemesis what is the link I opened https://github.com/gt-ros-pkg/ but there are many files over there which specifically did u use?

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Do you need to use NatNet? I use VRPN with OptiTrack system which is documented here: http: //www.ros.org/wiki/ros_vrpn_client


Originally posted by tonybaltovski with karma: 2549 on 2013-02-04

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by tonybaltovski on 2013-02-11:
Sure. Did you download the package?

Comment by tonybaltovski on 2013-02-11:
@Ryan is the mocap_optitrack able to work with ROS electric? Since I noticed it was for the Husky, I assume it is on groovy.

Comment by tonybaltovski on 2013-02-19:
@nemesis Setup the tracking tools to broadcast the pose and name the trackable "Tracker". Then run the ROS command.

Comment by nemesis on 2013-03-04:
@balto - I don't know if I should start a separate post for this or not, but, how can I get the node to display the "Yaw,Pitch & Roll" instead of the Quartenions?

Comment by tonybaltovski on 2013-03-04:
You must convert them using the bullet commands something like this: tf::quaternionMsgToTF(msg->transform.rotation, q);
btMatrix3x3(q).getRPY(roll,pitch,yaw);

Comment by tonybaltovski on 2013-03-04:
You must convert them using the bullet commands something like this:

Comment by nemesis on 2013-03-06:
@balto - Oh ok. The code is bit confusing (not used to all of this), so still trying to figure out how to go about "implementing" what you mentioned above.

Comment by tonybaltovski on 2013-03-09:
Is that a question? I can send you a more detailed snippet of code if you want.

Comment by nemesis on 2013-03-11:
@balto - Yes, that would be quite helpful. Thank you! I tried something similar to what you described above in a comment. But the output wasn't quite right..

Comment by tonybaltovski on 2013-03-18:
void poseCallback(const geometry_msgs::TransformStamped::ConstPtr& msg) {

curr_Pose[0] = msg->transform.translation.x; curr_Pose[1] = msg->transform.translation.y; curr_Pose[2] = msg->transform.translation.z; tf::Quaternion q; double roll,pitch, yaw; tf::quaternionMsgToTF(msg->transfo

Comment by tonybaltovski on 2013-03-18:
rm.rotation, q);
btMatrix3x3(q).getRPY(roll,pitch,yaw); curr_Pose[3] = roll; curr_Pose[4] = pitch; curr_Pose[5] = yaw;

}

Comment by nemesis on 2013-03-18:
@balto - Thank you! Just to confirm, this code is supposed to be an extension of the source code of the ros_vrpn_client? 'Cause I tried adding this code and used "Make" but it gave me back some errors. And thank you for being patient with me! Appreciate it!

Comment by tonybaltovski on 2013-03-19:
I use: #include "ros/ros.h" #include "std_msgs/String.h" #include <tf/tf.h> #include <tf/transform_listener.h> #include #include #include <tf/transform_broadcaster.h> #include <geometry_msgs/TransformStamped.h> #include <stdio.h> #include <math.h> #include <vrpn_Connection.h>

Comment by tonybaltovski on 2013-03-19:
#include <vrpn_Tracker.h> #include <LinearMath/btQuaternion.h>

Comment by nemesis on 2013-03-19:
@balto - Thanks! Errors that I get - no matching function for call to 'btMatrix3x3::btMatrix3x3(tf::Quaternion&)'. Also mentions that curr_Pose is not declared (understandable). And apart from this it shows "Notes" mentioning something like "candidate expects 9 arguments, 1 provided".

Comment by nemesis on 2013-03-20:
@balto - If you don't mind, please refer to this - http://answers.ros.org/question/58742/quaternion-to-roll-pitch-yaw/ I created a separate post all together. Thanks.

$\endgroup$
0
$\begingroup$

Rosanswers logo

I am using this post/answer to describe the procedure I followed, as a reference in case someone else has an issue -

@balto -

  1. In the "workspace" folder that you generally create (given in ROS tutorials) I used to the command "svn co link" to get/download the ros_vrpn_client. The link here refers to the gt-ros-pkg repository (I can't post the exact link right now because of low karma points)

  2. Now, using either "rosdep install ros_vrpn_client" or "rosmake ros_vrpn_client" I "built" the package (this is where I was confused, what exactly to use)

  3. Just in case, I used the "source ~/workspace/setup.bash" command after building the package.

  4. go to the ros_vrpn_client/ folder and execute the install_vrpn.sh file (command line -> go to folder containing file -> ./install_vrpn.sh )

  5. Start streaming in Tracking Tools after creating the trackable.

  6. runs "roscore" and in a separate terminal run the command given on the ros_vrpn_client wiki page (to run the node).

Issues

a) I got the error - "from Trackable1: No response from server" (This was because of an ip address problem)

b) Upon putting the correct address I got the same issue but this time I also got the message which notified me of a difference in version (7_28 and 7_20). I assumed that there is a connection with the server although no data is being sent.

c) As per your suggestion I changed the name of the trackable to "Tracker" in both: Tracking Tools as well as in the rosrun command. There is no "error" mentioning "No response from server" anymore but there is still the message about the different versions. After displaying this message, it shows nothing (and doesn't end either). So I dunno how to proceed. Or is there some other way to view the data that is being transmitted on these nodes??

**Note - ** In a separate terminal I used "rostopic echo /Tracker/pose" and I think it's displaying the coordinates correctly. Thank you so much for your time and help :)

@Ryan -

I downloaded and built the mocap_optitrack package in a similar manner like I have explained above. I faced the following issues after running the "rosrun mocap_optitrack mocap_node" command.

Issues

It displays a bunch of lines starting with [Info] and the last line mentioning "Enabling non blocking I/O". I initially thought it was because of the address given in the "Multicast Interface" under Streaming Properties of the Tracking Tools software. I tried changing it to some other address but it doesn't give me anything else either. Is there something that needs to be set separately? Like setting a particular Port in this case or something else? Or is there some other way to view the data that is being transmitted on these nodes??

Note - In Tracking Tools put the "Multicast Interface" address as the IP address of the system you have your ROS on. You can then display the coordinates using "rostopic echo /Husky_1/pose". I am still nto sure why it's called "Husky_1" instead of the name "Tracker" that I assigned in Tracking Tools.

Can you anyone comment on a difference between the two (VRPN and mocap)?

Please remember that I am running ROS via a virtual machine.

Please edit anything that you think is wrong above (so that others don't face issues later on)


Originally posted by nemesis with karma: 237 on 2013-02-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Ryan on 2013-02-10:
Yes, our method uses Tracking Tools

Comment by Ryan on 2013-02-19:
We use mocap_optitrack with a virtual machine as well. I will point another person on our team to this thread.

Comment by nemesis on 2013-02-19:
Thank you!

Comment by tonybaltovski on 2013-02-19:
Good to hear. Is all working now?

Comment by nemesis on 2013-02-21:
@balto - Yes! I think I will just have to modify the code a little bit to match with my Tracking Tools results - The axes are bit different; and get Yaw,Pitch,Roll as outputs too. That should be possible right? @Ryan - Apart from a certain variation, mocap is working for me too. Thanks!

Comment by ZiyangLI on 2014-02-26:
Anybody uses Motive? I think Tracking Tools is outdated.

Comment by tonybaltovski on 2014-02-27:
Motive works with NatNet great.

Comment by ZiyangLI on 2014-02-27:
Do you mean I can just rosmake mocap_optitrack and the node will works perfectly with the latest Motive software? Does Motive use the latest NatNet? Then it should transmit data in a different format, like having more fields. Am I wrong?

Comment by tonybaltovski on 2014-02-28:
Well, mocap_optitrack has been catkinized but yes, it was always meant to work with NatNet. I don't believe there have been many updates to NatNet.

Comment by ZiyangLI on 2014-03-03:
Nice! How do you feel about OptiTrack? Are you satisfied about the performance like latency, stability and resolution?

Comment by tonybaltovski on 2014-03-04:
I believe it works quite well. I wish it could all run on linux so the latency would be reduced but with wired connection is does what I need.

Comment by UbuntuROs on 2017-06-29:
Hey I was running $rosrun mocap_optitrack mocap_node command but keeps getting "Failed to contact master at [localhost:11311]. Retrying....." Why is that am getting this message? Can anyone help me please?

Comment by UbuntuROs on 2017-07-13:
@nemesis Did you use a virtual machine to run Ubuntu or did you use another PC with Linux OS?

$\endgroup$
0
$\begingroup$

Rosanswers logo

We use mocap_optitrack with NatNet. A more full-featured and stable version that publishes poses, odometry, and tfs is here, but we haven't updated the ROS wiki to point to it yet.


Originally posted by Ryan with karma: 3248 on 2013-02-07

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by Ryan on 2013-02-28:
Wiki updated: http://www.ros.org/wiki/mocap_optitrack

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.