l2s-lab / natnet_ros_cpp Goto Github PK
View Code? Open in Web Editor NEWROS driver for the NatNet 4.0 protocol used for the OptiTrack motion capture system and Motive application
License: GNU General Public License v3.0
ROS driver for the NatNet 4.0 protocol used for the OptiTrack motion capture system and Motive application
License: GNU General Public License v3.0
on ros noetic
parallels@ubuntu-linux-20-04-desktop:~/demo_ws$ catkin_make
Base path: /home/parallels/demo_ws
Source space: /home/parallels/demo_ws/src
Build space: /home/parallels/demo_ws/build
Devel space: /home/parallels/demo_ws/devel
Install space: /home/parallels/demo_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/parallels/demo_ws/build"
####
####
#### Running command: "make -j6 -l6" in "/home/parallels/demo_ws/build"
####
[ 50%] Built target Hello_pub
[ 66%] Built target hello_vscode_node
[ 50%] Built target Hello_sub
[ 50%] Built target hello
[ 75%] Linking CXX executable /home/parallels/demo_ws/devel/lib/natnet_ros_cpp/natnet_ros_cpp
/usr/bin/ld: /home/parallels/demo_ws/src/natnet_ros_cpp/deps/NatNetSDK/lib/libNatNet.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [natnet_ros_cpp/CMakeFiles/natnet_ros_cpp.dir/build.make:136: /home/parallels/demo_ws/devel/lib/natnet_ros_cpp/natnet_ros_cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:1007: natnet_ros_cpp/CMakeFiles/natnet_ros_cpp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j6 -l6" failed
parallels@ubuntu-linux-20-04-desktop:~/demo_ws$
Hey, thanks for this guide. I succeeded to install and get the publishers of my markers but I encountered a problem that my publishers of markers does not get the data.
when I do rostopic echo /..../marker1 for example it isn't print anything.
daniel@de-VM:~/auto_car_ws$ roslaunch natnet_ros_cpp natnet_ros.launch
... logging to /home/daniel/.ros/log/f3eeedc2-d89e-11ee-a9a5-cf729d479363/roslaunch-de-VM-3317.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://de-VM:45791/
SUMMARY
========
PARAMETERS
* /conn_params/clientIP: **.**.**
* /conn_params/globalFrame: world
* /conn_params/multicastAddress: 239.255.42.99
* /conn_params/serverCommandPort: 1510
* /conn_params/serverDataPort: 1511
* /conn_params/serverIP: 192.***.*.***
* /conn_params/serverType: multicast
* /natnet_ros/E: 0.04
* /natnet_ros/E_x: 0.04
* /natnet_ros/E_y: 0.04
* /natnet_ros/E_z: 0.04
* /natnet_ros/cf1/marker_config: 0
* /natnet_ros/cf1/pose/orientation: []
* /natnet_ros/cf1/pose/position: [-0.2455459535121...
* /natnet_ros/individual_error: False
* /natnet_ros/kalman: False
* /natnet_ros/log_frames: False
* /natnet_ros/log_internals: False
* /natnet_ros/log_latencies: False
* /natnet_ros/nearest_nbr: True
* /natnet_ros/object_names: ['cf1']
* /natnet_ros/pub_individual_marker: False
* /natnet_ros/pub_pointcloud: True
* /natnet_ros/pub_rigid_body: True
* /natnet_ros/pub_rigid_body_marker: True
* /rosdistro: noetic
* /rosversion: 1.16.0
NODES
/
natnet_ros (natnet_ros_cpp/natnet_ros_cpp)
ROS_MASTER_URI=http://localhost:11311
process[natnet_ros-1]: started with pid [3331]
[ INFO] [1709388783.796545590]: NatNet Sample Client (NatNet ver. 4.0.0.0)
[ INFO] [1709388783.799581194]: Got server IP : 192.***.*.***
[ INFO] [1709388783.800009283]: Got client IP : **.**.**
[ INFO] [1709388783.800405660]: Got server Type : multicast
[ INFO] [1709388783.800834294]: Got server Type : 239.255.42.99
[ INFO] [1709388783.801186849]: Got server Command Port : 1510
[ INFO] [1709388783.801526712]: Got server Command Port : 1511
[ INFO] [1709388783.801837822]: Got global frame name : world
[ INFO] [1709388783.824488452]: Mocap Framerate : 120.00
[ INFO] [1709388783.826332141]: Analog Samples Per Mocap Frame : 0
[ INFO] [1709388783.826380041]: Client initialized and ready.
[ INFO] [1709388783.826387226]: [SampleClient] Requesting Data Descriptions...
[ INFO] [1709388783.828718893]: [SampleClient] Received 9 Data/Devices Descriptions:
[ INFO] [1709388783.828810906]: RigidBody found : test
[ INFO] [1709388783.833374551]: Client is connected to server and listening for data...
daniel@de-VM:~$ rostopic list
/natnet_ros/pointcloud
/natnet_ros/test/marker0/pose
/natnet_ros/test/marker1/pose
/natnet_ros/test/marker2/pose
/natnet_ros/test/marker3/pose
/natnet_ros/test/marker4/pose
/natnet_ros/test/marker5/pose
/natnet_ros/test/pose
/rosout
/rosout_agg
daniel@de-VM:~$ rostopic echo /natnet_ros/pointcloud
there is no print after the last command.
Please assist, thanks!
Hi, I am using this node to stream rigid body poses to ROS.
Does the header.stamp
in the pose msg correspond to the time at which the data was generated at the mocap optitrack system, or is it the time at which the host machine receives the streamed data?
Point cloud does not get published even after setting it to true
<!-- To publish the frame of rigid body --> <arg name="pub_rigid_body" default="true"/>
rostopic echo /natnet_ros/pointcloud
Does not return anything inspite of multiple markers being visible
[ INFO] [1680139028.704298891]: Parent Offset : 0.00,0.00,0.00
[ INFO] [1680139028.705371684]: Marker #0:
[ INFO] [1680139028.705410869]: Position: -0.05, 0.05, -0.00
[ INFO] [1680139028.705449994]: Required active label: 1
[ INFO] [1680139028.705853335]: Marker #1:
[ INFO] [1680139028.705868378]: Position: -0.05, -0.05, 0.00
[ INFO] [1680139028.705879130]: Required active label: 4
[ INFO] [1680139028.706236172]: Marker #2:
[ INFO] [1680139028.706251574]: Position: -0.00, -0.04, 0.01
[ INFO] [1680139028.706259770]: Required active label: 8
[ INFO] [1680139028.706572464]: Marker #3:
[ INFO] [1680139028.706583992]: Position: 0.05, -0.05, -0.00
[ INFO] [1680139028.706590555]: Required active label: 16
[ INFO] [1680139028.706927177]: Marker #4:
[ INFO] [1680139028.706942605]: Position: 0.05, 0.05, -0.00
[ INFO] [1680139028.706950237]: Required active label: 64
[ INFO] [1680139028.707282964]: Marker #5:
[ INFO] [1680139028.707298347]: Position: 0.00, 0.04, 0.00
[ INFO] [1680139028.707306386]: Required active label: 128
Need help with force-plate data as we do not have force-plate available at lab.
The build instructions are not mentioning the tf2 dependency. The NatNet SDK is mentioned, but could also be added to the build instructions to make it easier to use.
apt install -y ros-$ROS_DISTRO-tf2* wget
cd /path/to/workspace
wget https://s3.amazonaws.com/naturalpoint/software/NatNetSDKLinux/ubuntu/NatNet_SDK_4.0_ubuntu.tar
tar -xf NatNet_SDK_4.0_ubuntu.tar -C src/natnet_ros_cpp/deps/NatNetSDK/
Need help with Skeleton pub data as we do not have skeleton tracking available in our OptiTrack license.
Hi,
First I wanted to say thank you for making this resource, our lab has found it very useful. I am attempting to track a few single markers which are unfortunately sometimes lost temporarily. This is rare and only brief but it halts tracking of a labeled point. I was wondering if you all had any ideas for work arounds or enhancements that would help me overcome this.
SPECIFICALLY: With the new gui, when turning on the "publish individual markers" and labeling them in the "single marker naming" tab, when the marker is lost, the data for it stops being received and is never regained despite the marker reappearing. I suspect this is because when it is regained, it does not have the previous label.
As of now, my only working solution is to instead use the pointcloud setting which allows for dynamically losing/gaining points, however, this means I have to write my own custom tracking, which works but I think is less robust.
Added the following to publish the individual markers.
<!-- To publish the individual (unlabeled) markers along with the (labeled) markers of the rigid bodies -->
<!-- keep pub_rigid_body to true to publish the markers of the rigidbody -->
<arg name="pub_rigid_body_marker" default="true"/>
But, I get the following error:
[ INFO] [1680138254.776717634]: Software latency : 1.16 milliseconds
[ INFO] [1680138254.776734826]: System latency : 4.53 milliseconds
[ INFO] [1680138254.776765734]: Total client latency : 5.05 milliseconds (transit time +0.50 ms)
[ INFO] [1680138254.776775864]: FrameID : 359756
[ INFO] [1680138254.776796641]: Rigid Bodies [Count=1]
[ INFO] [1680138254.777233675]: Rigid Body [ID=11 Error=0.00]
[ INFO] [1680138254.777248227]: x y z qx qy qz qw
[ INFO] [1680138254.777259504]: 2.44 0.39 0.97 0.02 0.76 0.65 -0.04
[ INFO] [1680138254.777268671]: Markers [Count=0]
[ INFO] [1680138254.777291578]: x y z
[ INFO] [1680138254.777300436]: 2.49 0.39 1.01
[FATAL] [1680138254.777328574]: ASSERTION FAILED
file = /opt/ros/noetic/include/ros/publisher.h
line = 107
cond = false
message =
[FATAL] [1680138254.777358778]: Call to publish() on an invalid Publisher
[FATAL] [1680138254.777367665]:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.