ros-drivers / mocap_optitrack

ROS nodes for working with the NaturalPoint Optitrack motion capture setup
99 stars 139 forks source link

Connection issues between ROS Melodic and Optitrack Streaming Engine #59

Open geothan opened 3 years ago

geothan commented 3 years ago

I can't retrieve the pose of a 3D object in ROS . I have 2 computers, one with Windows 10 and one with Ubuntu 18.

The Windows PC has Motive: Tracker 2.2.0 with the following settings in Optitrack Streaming Engine:

  1. Bradcase Frame Data: On
  2. Local Interface: the computer's IP, not loopback
  3. Rigid Bodies: On
  4. Transmission Type: Multicast
  5. Command Port: 1510
  6. Data Port: 1511
  7. Multicast Interface: 239.255.42.99

    The Linux PC has ROS Melodic and with following installation steps: cd ~/catkin_ws/src git clone https://github.com/ros-drivers/mocap_optitrack.git cd .. catkin build

The project was built with the below modifications:

  1. Command Port: 1510
  2. Data Port: 1511
  3. Multicast Interface: 239.255.42.99

I run the following command : roslaunch mocap_optitrack mocap.launch

and get the below:

roslaunch mocap_optitrack mocap.launch ... logging to /home/george/.ros/log/0bbc8108-88c0-11eb-a872-000c2978f07e/roslaunch-ubuntu-69992.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://ubuntu:38971/

SUMMARY

PARAMETERS

NODES / mocap_node (mocap_optitrack/mocap_node)

auto-starting new master process[master]: started with pid [70002] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 0bbc8108-88c0-11eb-a872-000c2978f07e process[rosout-1]: started with pid [70013] started core service [/rosout] process[mocap_node-2]: started with pid [70020] [ WARN] [1616164398.362593479]: Could not get server version, using auto

jadhm commented 3 years ago

@geothan Hi, did you define the the id streaming of the rigidbody ? because what you see in the config yaml file of this package that there are 2 rgigbodies are defines the first one with the streaming id 1 and the other is 2 so please make sure that the rigigbody in motive has the streaming id of 1 or 2

image

geothan commented 3 years ago

Hi @jadhm!

i think that i i've defined properly the streaming ID.

motive

I redownload and built the driver optitrack succesfully, making the below change:

Screenshot from 2021-03-24 12-38-50

I executed the following:

Screenshot from 2021-03-24 12-41-06

Could the specific driver not be compatibe with motive 2.2? Can i define server version? Generally, linux and windows computers see each other through ip ping. Windows PC is connected through Ethernet and Linux PC wirelessly in router.

jadhm commented 3 years ago

Hi @geothan
That's weird but it should work because I am also using motive 2.2.0 and the driver is compatible with it. could you please try to launch it using --screen so I can see the initialization logs roslaunch mocap_optitrack mocap.launch --screen

and if you try rostopic list would you see the all the topics ?

geothan commented 3 years ago

Hi @jadhm ,

Here is a screenshot of launch file execution:

Screenshot from 2021-03-24 17-03-15

The result of topics is the following:

Screenshot from 2021-03-24 17-10-05

The first time that i tried the above settings, topics of robot1 weren't visible only parameter_descriptions and parameter_updates topics. These topics are empty, is that normal?

Screenshot from 2021-03-24 17-21-28

Finally, when i run roslaunch mocap_optitrack mocap.launch & rosrun rviz rviz

Shall i see my robot in rviz? Because i see an empty world.

Screenshot from 2021-03-24 17-25-35

jadhm commented 3 years ago

It seems it works just fine ! I see that you can read the topic /mocap_node/Robot_1/pose which is basically the position of the tracked object. So I don't think you have any problems and for visualizing the pose in RVIZ you should add the topic manually and also configure the Fixed frame.

lixryjz commented 2 years ago

hi,yet I am very happy to see that, but i have down the fixed frame and add topic as you said in RVIZ,there is only a red line with an arrow.can you tell me how to do?i hope you can screenshot

chennuo0125-HIT commented 1 year ago

@geothan @lixryjz the problem has been solved ? i get same problem as follows:

[ WARN] [1679050884.023240442]: Could not get server version, using auto

and no more print