Giter VIP home page Giter VIP logo

ros2-mocap_optitrack's Introduction

ROS2 MoCap Optitrack

Set of ROS2 packages implementing the data acquisition system described in: https://www.overleaf.com/read/mggtpwfjhjzt

Configuration of NatNet server

Please first read the Streaming Guide by Optitrack to get yourself familiar with the topic.

Make sure that a static IP is used on the Optitrack (Windows) workstation for the LAN connection with the Optitrack switch. Windows Defender needs to be deactivated for all networks as well!. Nominally, the static IP should be set to 192.168.4.31, which is the same local network as of the VTEM terminal.

In the streaming pane of Motive, switch-on Broadcast Frame Data and select as the local interface 192.168.4.31. As transmission type select Multicast.

On your target machine (usually the Ubuntu lab workstation), set a static IP to the local network as well (for example 192.168.4.20) and try to pin the source workstation with ping 192.168.4.31. The IP address of the source also needs to be set in the mocap_optitrack_client/config/natnetclient.yaml file.

Usage

Build the packages:

colcon build --packages-select mocap_optitrack_client mocap_optitrack_inv_kin mocap_optitrack_w2b

Source the built packages:

. install/setup.bash

Move to the source directory and run the system via the configuration file:

ros2 launch launch/launch_y_up.py

ros2-mocap_optitrack's People

Contributors

mstoelzle avatar piepustina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ros2-mocap_optitrack's Issues

Eigen dependency

The Eigen header files will already be installed in the Docker container. So please remove the Eigen folder at the end, when you integrate the REPO into the Docker container

Replace printf with ROS logging for ROS nodes

Please replace all printf with the official ROS logging in all ROS nodes as for example here:

https://github.com/tud-cor-sr/ros2-mocap_optitrack/blob/master/mocap_optitrack_client/src/MoCapPublisher.cpp#L57

The ROS logging adds further information such as a severity level to the logging message. It for example is called like this:

RCLCPP_INFO(get_logger(), "Publishing: '%s'", msg->data.c_str());

https://github.com/ros2/demos/blob/foxy/logging_demo/src/logger_usage_component.cpp#L64

You can find further information about ROS2 logging here:
https://docs.ros.org/en/foxy/Concepts/About-Logging.html
https://docs.ros.org/en/foxy/Tutorials/Logging-and-logger-configuration.html

Please also replace all std::cout in the ROS nodes such as here:
https://github.com/tud-cor-sr/ros2-mocap_optitrack/blob/master/mocap_optitrack_w2b/src/WorldToBase.cpp#L107

Add tf2 functionality

I think it could be useful, to in addition to our custom RigidBodyArray message, also publish tf2 transform messages (with the tf2_ros::TransformBroadcaster, which are better supported by the ROS ecosystem. Could you please look into this wether this is useful and easy to implement?

https://docs.ros2.org/foxy/api/tf2_ros/

The idea would be that we still publish the RigidBodyArray, which contain more Mo-Cap-specific information, but also publish these standard tf2 messages which can be easily read by for example rviz. We would publish these tf2 messages for all rigid bodies, both in inthe MoCap client (e.g. in the world frame) and in the w2b package for the base frame of the robot.

Improve README

Please add some description on how to run the nodes to the README (e.g. mostly just how to call the launch file).

Please also add a link to the Overleaf document describing the math behind it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.