wrapyfi_ros2_interfaces package from wrapyfi_ros2_interfaces repo

wrapyfi_ros2_interfaces

Package Summary

Tags No category tags.
Version 0.4.30
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/modular-ml/wrapyfi_ros2_interfaces.git
VCS Type git
VCS Version master
Last Updated 2024-01-30
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Wrapyfi ROS 2 interfaces

Additional Links

No additional links.

Maintainers

  • Fares Abawi

Authors

No additional authors.

Wrapyfi ROS 2 interfaces

WARNING: These instructions are located in https://github.com/modular-ml/wrapyfi_ros2_interfaces

To run the Wrapyfi ROS 2 services and transmit audio messages, you need to compile the ROS 2 interfaces. ROS 2 must already be installed on your system, with all its build dependencies. You can find the installation instructions here or install using Robostack.

Prerequisites

  • ROS 2 Galactic/Humble
  • Python 3.6

Installation

We recommend compiling the Wrapyfi ROS 2 interfaces rather than installing them. However, if ROS 2 was installed locally (not within mamba/micromamba), Then the Wrapyfi interfaces can be installed directly using APT ROS Package Index

APT (local Humble only)

source /opt/ros/humble/setup.bash
sudo apt update
sudo apt install ros-humble-wrapyfi-ros2-interfaces
# test package: should return the service message types for ROS 2 Native objects
ros2 interface show wrapyfi_ros2_interfaces/srv/ROS2NativeObjectService


Compiling

  1. Copy the wrapyfi_ros2_interfaces folder to your ROS 2 workspace (assumed to be ~/ros2_ws).
    # from the current directory 
    cd ../
    cp -r wrapyfi_ros2_interfaces ~/ros2_ws/src


  1. Compile the ROS 2 interfaces:
    cd ~/ros2_ws
    colcon build --packages-select wrapyfi_ros2_interfaces


**Note**: If the wrong version of Python is used, the compilation will fail. Make sure that the correct version of cmake 
is used by modifying the `cmake_minimum_required` version in the `~/ros2_ws/src/wrapyfi_ros2_interfaces/CMakeLists.txt` file:
    # CMakeLists.txt
    cmake_minimum_required(VERSION 3.5)
    # ...

Replacing VERSION 3.5 with the correct version of cmake.
  1. Source the ROS 2 workspace:
    source ~/ros2_ws/install/setup.bash

  1. Verify that the ROS 2 Native object service interface is compiled:
    ros2 interface show wrapyfi_ros2_interfaces/srv/ROS2NativeObjectService

Which should output:
    string request
    ---
    string response

  1. Verify that the ROS 2 Image service interface is compiled:
    ros2 interface show wrapyfi_ros2_interfaces/srv/ROS2ImageService

Which should output:
    string request
    ---
    sensor_msgs/Image response
        std_msgs/Header header
            builtin_interfaces/Time stamp
                int32 sec
                uint32 nanosec
            string frame_id
                                     # Header frame_id should be optical frame of camera
                                     # origin of frame should be optical center of cameara
                                     # +x should point to the right in the image
                                     # +y should point down in the image
                                     # +z should point into to plane of the image
                                     # If the frame_id here and the frame_id of the CameraInfo
                                     # message associated with the image conflict
                                     # the behavior is undefined
        uint32 height
        uint32 width
        string encoding
                              # taken from the list of strings in include/sensor_msgs/image_encodings.hpp
        uint8 is_bigendian
        uint32 step
        uint8[] data


  1. Verify that the ROS 2 Audio service interface is compiled:
    ros2 interface show wrapyfi_ros2_interfaces/srv/ROS2AudioService

Which should output:
   string request
   ---
   wrapyfi_ros2_interfaces/ROS2AudioMessage response
       std_msgs/Header header
           builtin_interfaces/Time stamp
               int32 sec
               uint32 nanosec
           string frame_id
       uint32 chunk_size
       uint8 channels
       uint32 sample_rate
       string encoding
       uint8 is_bigendian
       uint32 bitrate
       string coding_format
       uint32 step
       uint8[] data


 Run your Wrapyfi enabled script from the same terminal. Now you can use the REQ/REP pattern (server/client) in Wrapyfi [\[example\]](https://wrapyfi.readthedocs.io/en/latest/examples/examples.communication_patterns.html#module-examples.communication_patterns.request_reply_example), and transmit ROS 2 audio messages [\[example\]](https://wrapyfi.readthedocs.io/en/latest/examples/examples.sensors.html#module-examples.sensors.cam_mic).
CHANGELOG
No CHANGELOG found.

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Recent questions tagged wrapyfi_ros2_interfaces at Robotics Stack Exchange

No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.