Ask Your Question
0

Issues with Optitrack and ROS Melodic

asked 2021-03-26 14:59:23 -0500

sageedwards gravatar image

System Setup:

Master Computer with Ubuntu 18.04 and 16.04 kernels, hosting ROS (Melodic and Kinetic) is connected to two networks:

  • A private network at the University for internet access (via addded network card)
  • A local network for communication to our local agents and MOCAP system (via integrated network adapter on motherboard connected to a router)

The MOCAP computer with OptiTrack is running Windows 7.

The Problem

While the Master computer is running the 18.04 kernel and Melodic while it is connected to both networks. A roscore is opened and then optitrack is launched, like so:

roscore
roslaunch mocap_optitrack mocap.launch

This command gives the following output (nothing streaming after):

    NODES
  /
    mocap_node (mocap_optitrack/mocap_node)

ROS_MASTER_URI=http://localhost:11311

process[mocap_node-1]: started with pid [4337]
[ INFO] [1616782719.638698852]: Creating socket...
[ INFO] [1616782719.639353716]: Setting socket options...
[ INFO] [1616782719.639388051]: Local address: 0.0.0.0:1511
[ INFO] [1616782719.639404621]: Binding socket to local address...
[ INFO] [1616782719.639432566]: Multicast IP: 224.0.0.1
[ INFO] [1616782719.639450082]: Joining multicast group 224.0.0.1...
[ INFO] [1616782719.639470483]: Enabling non-blocking I/O

This results in what seems to be successful launch however, when the pose data is echoed nothing is reported. Commands used:

rostopic echo /turtlebot4/ground_pose

Now, if I was to unplug the Ethernet cable that connects the master to the private university network (not the local one with MOCAP) and relaunch optitrack mocap, the following error is given:

NODES
  /
    mocap_node (mocap_optitrack/mocap_node)

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

setting /run_id to 0ee6c0dc-8e60-11eb-86fc-00e04c6e10e2
process[rosout-1]: started with pid [5011]
started core service [/rosout]
process[mocap_node-2]: started with pid [5018]
[ INFO] [1616782878.790805513]: Creating socket...
[ INFO] [1616782878.791311313]: Setting socket options...
[ INFO] [1616782878.791327908]: Local address: 0.0.0.0:1511
[ INFO] [1616782878.791341296]: Binding socket to local address...
[ INFO] [1616782878.791360231]: Multicast IP: 224.0.0.1
[ INFO] [1616782878.791382587]: Joining multicast group 224.0.0.1...
terminate called after throwing an instance of 'SocketException'
  what():  Failed to set socket option: unknown error
================================================================================REQUIRED process [mocap_node-2] has died!
process has died [pid 5018, exit code -6, cmd /home/ncr/ncr_ws/devel/lib/mocap_optitrack/mocap_node __name:=mocap_node __log:=/home/ncr/.ros/log/0ee6c0dc-8e60-11eb-86fc-00e04c6e10e2/mocap_node-2.log].
log file: /home/ncr/.ros/log/0ee6c0dc-8e60-11eb-86fc-00e04c6e10e2/mocap_node-2*.log
Initiating shutdown!
================================================================================
[mocap_node-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Additional Information

However, everything works fine on 16.04 with Kinetic, regardless if Master is connected to the private university network. Along with this, MOCAP has been working with 18.04 and Melodic for a few months now without issue, and there have been no obvious changes made to the system which could have caused this.

OptiTrack Setup

The .yaml file is properly setup and has the proper identification and naming conventions that match with what is on mocap computer. This is true, since it works on 16.04. However, see the two images below for ... (more)

edit retag flag offensive close merge delete

Comments

However, see the two images below for possible details that may help.

... never mind, I do not have enough karma to use images...

if those two images show text, please just copy-paste it into your question.

gvdhoorn gravatar image gvdhoorn  ( 2021-03-27 01:42:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-03-26 15:30:30 -0500

piupiu_island gravatar image

looks like the problem of mocap, have you tried delete this package and install it again?

edit flag offensive delete link more

Comments

Yes, we did. A colleague of mine tried using the mocap_optitrack package from the ubuntu 16.04 system (https://github.com/jwag/mocap_optitrack), and also tried the up-to-date mocap_optitrack package (https://github.com/ros-drivers/mocap_...). Unfortunately, those didn't solve our problem.

sageedwards gravatar image sageedwards  ( 2021-03-26 20:34:33 -0500 )edit

the odd thing is at the beginning it worked, but now get failed without any changes. I used to run into similar problem when I tried to install a package, and my final solution was installing all packages again.. I had only 10 packages, and that was easy for me. If it really doesn't work, maybe you need to consider using 16.04...

piupiu_island gravatar image piupiu_island  ( 2021-03-27 20:48:58 -0500 )edit

Using only 16.04 is out of the question since we need to use packages that are only available for Melodic on 18.04. But maybe there are conflicting packages.

Another thing, we are going to try to VRPN monday to see if that will work.

sageedwards gravatar image sageedwards  ( 2021-03-28 15:59:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-03-26 14:59:23 -0500

Seen: 219 times

Last updated: Mar 26 '21