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

NatNet 2 support #3

Open
omardarwish1995 opened this issue Mar 5, 2019 · 16 comments
Open

NatNet 2 support #3

omardarwish1995 opened this issue Mar 5, 2019 · 16 comments

Comments

@omardarwish1995
Copy link

I get the following error when I run "rosrun natnet_ros client _server:=10.195.79.98":

_```
radlab@DESKTOP-TSTVI8U:~/catkin_ws$ rosrun natnet_ros client _server:=10.195.79.98
[INFO] [1551755108.133212]: Connecting to 10.195.79.98
Traceback (most recent call last):
File "/home/radlab/catkin_ws/src/natnet_ros/natnet_ros/scripts/client", line 217, in
node.run()
File "/home/radlab/catkin_ws/src/natnet_ros/natnet_ros/scripts/client", line 207, in run
client = natnet.Client.connect(server, logger=self.log)
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/comms.py", line 415, in connect
return cls._simple_connect(server, logger, timeout)
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/comms.py", line 393, in _simple_connect
timeout=timeout)
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/comms.py", line 154, in wait_for_message_with_id
return protocol.deserialize_payload(message_id, payload), received_time
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/protocol/common.py", line 271, in deserialize_payload
return _registry.deserialize_payload(*args, **kwargs)
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/protocol/common.py", line 221, in deserialize_payload
message = message_type.deserialize(payload_data, version)
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/protocol/ServerInfoMessage.py", line 67, in deserialize
high_resolution_clock_frequency = data.unpack(uint64_t)
File "/home/radlab/catkin_ws/src/natnet_ros/python_natnet/python_natnet/src/natnet/protocol/common.py", line 92, in unpack
value = struct_type.unpack(self.data[self.offset:self.offset + struct_type.size])
struct.error: unpack requires a string argument of length 8


Motive Version: 1.10.3
ROS Version: Kinetic
Ubuntu: 16.04
Python: 2.7.12

Note: It works when using the fake client and crashes when I enter the Motive IP Address

Thanks in advance! 
@mje-nz
Copy link
Owner

mje-nz commented Mar 5, 2019

Thanks for letting me know!

Unfortunately I don't have access to a Motive version that old, so I don't have any test data for the old protocol. If you give me a packet capture of another NatNet client successfully communicating with your version of Motive I'll put it on my to-do list.

@omardarwish1995
Copy link
Author

Win_Data

We were able to get it working with Natnet 2.10. The attached data was captured after we ran the "WinFormTestApp.exe" in the NatnetSDK samples.

Is that what you were asking for or do you need more information?

@mje-nz
Copy link
Owner

mje-nz commented Mar 12, 2019

Nice work. What I need is a recording of your raw network traffic, captured with a network sniffing tool like Wireshark.

First, start the capture with the filter "port 1510 or port 1511" so you only include NatNet traffic.
Screen Shot 2019-03-12 at 3 28 49 PM

Then, open WinFormTestApp.exe and do whatever you did to get it going. You should see packets appearing in Wireshark. Give it a few seconds, then stop capturing in Wireshark, save the capture file, and upload it here.

It would be ideal if you could run WinFormTestApp.exe on a different computer to Motive, but if you can't then I can probably still figure out what's going on.

@omardarwish1995
Copy link
Author

WireSharkData.zip

Thank you for your reply. Unfortunately we were not able to run it on two separate machines.

Please see attached the captured data requested

@mje-nz
Copy link
Owner

mje-nz commented Mar 13, 2019

That's great, thanks! The error you reported is in the skeleton parsing code, which I've never been able to test as we only use our mocap for robots. The packet format doesn't seem to be what NaturalPoint says it is, would you mind collecting a little more data for me?

Open a command prompt in the NatNet SDK samples folder. Start the capture in Wireshark as before. Run SampleClient.exe in the command prompt, press 1 to connect, wait a few seconds while data flashes past, then press q to quit. It should look something like this:
Capture

Select all the output (Ctrl-A), copy it (Enter), and attach it here along with the capture file.

@omardarwish1995
Copy link
Author

Please see attached the captured data and the SampleData.exe data

Thank you,

WireShark_03-13-2018.zip

@mje-nz
Copy link
Owner

mje-nz commented Mar 14, 2019

That's perfect, thanks again.

I've made some changes in the dev branch which should fix your issue. Please try it out and let me know how it goes. Depending on your git config you might have to run git submodule update when you change branches.

At the moment I have each bone in the skeleton published as a PoseStamped. What do you want to be able to do with the data? I'm open to suggestions for how to represent it.

@omardarwish1995
Copy link
Author

Thank you very much. Unfortunately we get a new error (please see attached.)

and to answer your question, we are trying to capture live stream data and create a live stream simulation.

Thanks in advance
Capture

@mje-nz
Copy link
Owner

mje-nz commented Mar 15, 2019

Okay, that's an issue with connecting to old versions of Motive. It should be fixed now, please update (git pull and git submodule update) and try again.

@omardarwish1995
Copy link
Author

Hi,
We tried the updated library and ran into a similar error as seen in the attached screenshot. As you can see, we are using the right data port and multicast address. Even when we tried to use an IP address instead of setting Motive to loopback, we got the same exact error. Any help fixing this would be appreciated!

Capture_31519

@mje-nz
Copy link
Owner

mje-nz commented Mar 15, 2019 via email

@omardarwish1995
Copy link
Author

Hi Matthew,
Sorry for not replying earlier as we were on spring break and had no access to the mocap system.

I tried your suggestion in the previous comment and it still gave me the same error as attached.

Is it because the program is using "multicast_address" while it is labeled "Multicast Interface" in the motive application?

Please advise.

capture_32519

@mje-nz
Copy link
Owner

mje-nz commented Mar 25, 2019

Ah I see the problem, try again now.

@mje-nz
Copy link
Owner

mje-nz commented Mar 31, 2019

Hi Omar, have you had a chance to test these changes?

@omardarwish1995
Copy link
Author

Hi Matthew,

We tried out the update and still ran into errors. It seems too tedious of a process to force the library to work with an older version so after speaking with senior members of our lab, we have decided to update our Motive software to the latest version (2.1).
The purpose of our project is to live stream data from Motive in order to create simulations of the human motions and eventually control robots. My teammates and I would like to acknowledge your work and your assistance to us in our paper. Is there a certain affiliation that you would like us to recognize?

Again, we are immensely thankful for your help. I will keep you in the loop once we get our updated software and test your library.

Best,
Omar

@mje-nz
Copy link
Owner

mje-nz commented May 1, 2019

Sorry Omar, I missed this one! If it's not too late, my affiliation is Electrical and Computer Engineering, University of Canterbury, New Zealand. I'd be interested to see your paper if you don't mind sharing.

How are you getting on with updating Motive?

@mje-nz mje-nz changed the title struct.error: unpack requires a string argument of length 8 NatNet 2 support May 28, 2019
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

2 participants