Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streaming position of single marker #5

Open
ghanimmukhtar opened this issue Aug 25, 2017 · 11 comments
Open

streaming position of single marker #5

ghanimmukhtar opened this issue Aug 25, 2017 · 11 comments

Comments

@ghanimmukhtar
Copy link

Hi there

Hi There, Is it possible to stream the position (no orientation) of single markers from Motive, via this package? If so what do I need to change to achieve that?

Cheers!

@fsuarez6
Copy link
Member

What is the output you get after running this: https://github.com/crigroup/optitrack#testing-the-installation?

@ghanimmukhtar
Copy link
Author

So I get the in rviz (and rostopics) the world frame and the optitrack origin frame, the tf topic also has those two frames with zeros, there is one marker in the arena that is detected in Motive but nothing in the topics I checked all of them, here are all the topics:

/clicked_point
/initialpose
/move_base_simple/goal
/optitrack/rigid_bodies
/rosout
/rosout_agg
/tf
/tf_static

@fsuarez6
Copy link
Member

I'll ask again. What is the output you get for this:

rostopic echo /optitrack/rigid_bodies

On a side note, please avoid crossposting:

@ghanimmukhtar
Copy link
Author

So for this particular topic the output is as follows:

header: 
  seq: 487
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
bodies: []

As for the multiple issue opened in other repository, I didn't think it is going to be a problem :) apologies!

@fsuarez6
Copy link
Member

It may be a problem with the Data Streaming configuration in Motive:
View -> Data Streaming -> Advanced Network Options -> Multicast Interface

Is your Local Interface in loopback mode? You should use Multicast Interface and indicate Motive your client IP.

@ghanimmukhtar
Copy link
Author

So I put the Local interface in Motive to loopback, and I already use Multicast Interface and the IP is the eth1 from my ubuntu client machine now when I try to echo the topic /optitrack/rigid_bodies there is nothing showing. RVIZ still shows optitrack & world frames.

Again I want to emphasis I don't have a rigid body in Motive just one single marker.

@fsuarez6
Copy link
Member

Again I want to emphasis I don't have a rigid body in Motive just one single marker.

Got it. My bad.

It shouldn't be difficult to get the orphan markers information.
If you go through the rigid_bodies_publisher.py script, you can see that it extracts the rigid bodies information from the packet object. It seems like this object - rx.FrameOfData - also contains the markers information.

Try adding the following two lines of code just before line 73:

print packet.labeled_markers
print packet.other_markers

What do you get?

@pratham17
Copy link

@ghanimmukhtar Were you able to get this running for a single marker, using @fsuarez6 's suggestion? I was trying and it did not work for me. Please update if you were successful by this or any other approach that you might have used.

@ghanimmukhtar
Copy link
Author

@pratham17 No I did it by using and modifying this repository. The modified repository could be found here. I don't remember all the modification I made but mostly they are in mocap_config.cpp.

Moreover I think for it to work you have to have at least one rigid body because all the other single markers will then be published alongside it.

Be careful, when you use this code you will have no protection against false markers, like in our experimental room we sometimes get faulty markers from some silvery shining objects and they will be published as single markers.

@pratham17
Copy link

Hi @ghanimmukhtar, thanks for the update. I tried using the modified repo and add a dummy rigid body in the system. However, when i run roslaunch mocap_optitrack mocap.launch, it gives me failed to set socket option:EINVAL error. Did you face similar issues? According to here, when i set the multicast addresses as suggested, it gives me bad_alloc() error. To summarize, I am using Motive 2.0.1 on a windows machine and trying to stream the data on another linux machine running ROS kinetic on same network.

@ghanimmukhtar
Copy link
Author

Hi @pratham17 so for me I didn't have this issue, my environment was Linux Ubuntu 14.04 trusty and ROS Indigo, I am not quiet sure of the Motive version though.

Regarding other aspects like the config yaml file and multicast address ...etc they were as in the repo, and it use to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants