Getting Optitrack running with ROS2 Original Source: https://github.com/MOCAP4ROS2-Project/mocap4ros2_optitrack
- Git Clone this Repository Recursively "--recursive"
- cd into mocap4r2_ws/src and verify mocap4r2 + mocap4ros2_optitrack + mocap_msg
- do "cd .." and then "rosdep install --from-paths src --ignore-src -r -y"
- do "cd into src" and then "vcs import < mocap4ros2_optitrack/dependency_repos.repos"
- do "cd .." into Optitrack-ROS2/mocap4r2_ws
- do "colcon build --symlink-install"
- do "nano src/mocap4ros2_optitrack/mocap4r2_optitrack_driver/config/mocap4r2_optitrack_driver_params.yaml"
- change [connection_type: "Unicast"] to [connection_type: "Multicast"]
- Verify [server_address: "192.168.0.118"] with Optitrack Computer IP
- Verify [local_address: "192.168.0.87"] with your Computer IP
- Verify [multicast_address: "239.255.42.99"] with Optitrack Computer
- Verify [server_command_port: 1510] with Optitrack Computer
- Verify [server_data_port: 1511] with Optitrack Computer
- Match [rigid_body_name: "insert_name_of_body"] with Optitrack Body Frame/Object
- Save the file and make sure your in Optitrack-ROS2/mocap4r2_ws
- do "colcon build --symlink-install" + "source install/local_setup.bash" + "source /opt/ros/your_ros_version/setup.bash"
- do "ros2 launch mocap4r2_optitrack_driver optitrack2.launch.py" and make sure you dont get "driver not connected... :(" type of error but the "... conected!" along with other info lines
- go to another terminal and do "ros2 lifecycle set /mocap4r2_optitrack_driver_node activate" to activate its node when needed
- go to another terminal and do "ros2 launch mocap4r2_marker_viz mocap4r2_marker_viz.launch.py mocap4r2_system:=optitrack" and see if the body is displaying