Issues with Optitrack and ROS Melodic
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 ...
if those two images show text, please just copy-paste it into your question.