Giter VIP home page Giter VIP logo

realsense_ros2_interface's Introduction

realsense_ROS2_interface

This ROS2 package interfaces robots and/or joysticks with the official Intel RealSense ROS wrapper.

While it's targeting Intel RealSense and Sony Playstation Joystick, the package can be easily modified to work with any USB camera and controller.

For any questions, please contact the author, Irving Fang.

This package is heavily influenced and inspired by a similar ROS1 package written by Dr. Takuma Yoneda from TTIC.

Setup

This package is only tested on Ubuntu 22.04 and ROS humble distribution.

It requires the official RealSense ROS2 wrapper and the Intel RealSense SDK.

I expect this package to be easily portable to other Ubuntu versions and ROS 2 distros, since it does not utilize anything specific to Ubuntu 22.04 and ROS humble.

Installation

After acquiring all the prerequisites, simply put this folder (which contains two ROS2 packages, technically speaking) inside your ROS workspace's src folder and run the following command in your ROS workspace.

colcon build

Package Breakdown

I will walk through the package structure briefly here. Feel free to skip over if you are familiar with how a typical ROS2 package works.

This project is actually made of two ROS2 packages:

  • realsense_capture: contains all the code that actually does the job.

  • realsense_interface_msg: contains the definition for the service message type that's being used.

It's a conventional ROS practice to dedicate an independent package for message type definitions.

Inside realsense_capture:

  • realsense_image_server.py: responsible for constantly getting images from the camera, and is ready to serve the image whenever requested, that is, the capture button on the joystick is hit.

  • realsense_image_client.py: responsible for acquiring the image whenever the capture button on the joystick is hit.

Usage

To use the package, run

ros2 launch realsense_capture realsense_sys_launch.py

Note: The launch file also launches Foxglove, a visualization/monitoring app for ROS2. Get rid of related lines if desired.

There is no need to launch the RealSense ROS wrapper separately, as they are integrated into the launch file.

Parameters

There are many parameters you can tune that come with RealSense, but some of the most important ones are:

  1. camera_namespace and camera_name: the topic name of your camera in ROS2 will be in the form of `camera_namespace/camera_name/xxx

  2. save_folder: indicates where to save the .png of the depth and color images.

Contributing

Contributions to this project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.

Citation

If you find this little package helpful, please consider citing it in your paper/work.

realsense_ros2_interface's People

Contributors

irvingf7 avatar

Watchers

 avatar

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.