Coder Social home page Coder Social logo

bluespace-ai / bluespace_ai_xsens_ros_mti_driver Goto Github PK

View Code? Open in Web Editor NEW
44.0 5.0 59.0 5.43 MB

xsens ros2 driver

License: BSD 3-Clause "New" or "Revised" License

CMake 0.05% Python 0.08% Makefile 0.10% C++ 71.75% C 27.63% Objective-C 0.41%

bluespace_ai_xsens_ros_mti_driver's Introduction

=[ Xsens MTi driver for ROS 2.0]============================================================

Documentation:
    You can find the full documentation in "<your MT SDK directory>/doc/xsensdeviceapi/doc/html/index.html" under "ROS MTi driver" section. The SDK can be downloaded from https://www.xsens.com/software-downloads. Please note, this is a 3rd Party driver built from MTSDK2021.2 with no official support. Check the compatibility section for the compatible devices. For official support on Xsens MTi products, please refer to Xsens knowledge base: https://base.xsens.com

Prerequisites:
    - ROS 2.0 Galactic/Foxy
    - C/C++ Compiler: GCC 5.4.0 or MSVC 14.0
    - C++14

Building:
    - Copy bluespace_ai_xsens_mti_driver folder into your ROS 2.0 workspace 'src' folder.
        Make sure the permissions are set to o+rw on your files and directories.

    - Build Xsens MTi driver package:
        $ colcon build

    - Source workspace:
        $ source install/setup.bash

Note: Building of 'xspublic' from the ament workspace has been automated in the CMake script. To build it manually, run the following from the ROS2.0 workspace root:
        $ pushd src/bluespace_ai_xsens_ros_mti_driver/lib/xspublic && make && popd

Changes in this release compared to the Xsens ROS 1.0 driver open source:
    - Added ROS 2.0 support: The ROS 1.0 wrapper node was modified to work with ROS 2.0.
    - Migration to declared configuration parameters: ROS 1.0 driver supported undeclared parameters. Since ROS 2.0 guidelines discourage undeclared parameters, there are some minor modifications in the xsens_mti_node.yaml to support all the configuration capabilities from ROS1.0. For more details check the config file.
        - A boolean parameter scan_for_devices was added to enable switching between port scanning and connecting to a specific port for Xsens devices.
        - A boolean parameter enable_logging was added for logging. When enabled, the name of the file needs to be specified in the log_file parameter.
    - Magnetometer topic switched to sensor_msgs/MagneticField : The message type of the magnetometer measurement topic (/imu/mag) was switched to sensor_msgs/MagneticField from previous geometry_msgs/Vector3Stamped. This was a TODO item left in the original source.

Running:
    - Configure your MTi device to output desired data (e.g. for display example - orientation output)

    - Launch the Xsens MTi driver from your ament workspace:
            $ ros2 launch bluespace_ai_xsens_mti_driver xsens_mti_node.launch.py

        After the device has been detected, you can communicate with it from another process / terminal window.
        For example:
            $ ros2 topic echo /filter/quaternion
        This will result in a continuous stream of data output:
            ---
            header: 
              seq: 1386351
              stamp: 
                secs: 1545223809
                nsecs: 197252179
              frame_id: "imu_link"
            quaternion: 
              x: 0.00276306713931
              y: 0.00036825647112
              z: -0.89693570137
              w: -0.442152231932
            ---

    - There is also an example that shows a 3D visualization of the device (orientation data should be enabled in the device):
            $ ros2 launch bluespace_ai_xsens_mti_driver display.launch.py

Compatibility:
    - The driver is compatible with following Xsens IMU product lines:
            MTi 1-series
            MTi 10-series
            MTi 100-series
            MTi 600-series
    - The driver has been tested on amd64 as well as ARM 64-bit (aarch64) architectures. 


Notes:
    - ROS timestamps
        The data messages from devices are time stamped on arrival in the ROS driver.
        When collecting data at higher rates, eg 100 Hz, the times between reads can differ from the configured output rate in the device.
        This is caused by possible buffering in the USB/FTDI driver.

        For instance:
        10 us, 10 us, 10 us, 45 ms, 10 us, 10 us, 10 us, 39 ms, 10 us, etc.
        instead of 
        10 ms, 10 ms, 10 ms, 10 ms, 10 ms, 10 ms, 10 ms, 10 ms, 10 ms, etc.

        Work-around: for accurate and stable time stamp information, users can make use of the sensor reported time stamp (/imu/time_ref) instead.

-[ Troubleshooting ]------------------------------------------------------------

    - The Mti1 (Motion Tracker Development Board) is not recognized.

        Support for the Development Board is present in recent kernels. (Since June 12, 2015).
        If your kernel does not support the Board, you can add this manually

        $ sudo /sbin/modprobe ftdi_sio
        $ echo 2639 0300 | sudo tee /sys/bus/usb-serial/drivers/ftdi_sio/new_id


    - The device is recognized, but I cannot ever access the device -

        Make sure you are in the correct group (often dialout or uucp) in order to
        access the device. You can test this with

            $ ls -l /dev/ttyUSB0
            crw-rw---- 1 root dialout 188, 0 May  6 16:21 /dev/ttyUSB0
            $ groups
            dialout audio video usb users plugdev

        If you aren't in the correct group, you can fix this in two ways.

        1. Add yourself to the correct group
            You can add yourself to it by using your distributions user management
            tool, or call

                $ sudo usermod -G dialout -a $USER

            Be sure to replace dialout with the actual group name if it is
            different. After adding yourself to the group, either relogin to your
            user, or call

                $ newgrp dialout

            to add the current terminal session to the group.

        2. Use udev rules
            Alternatively, put the following rule into /etc/udev/rules.d/99-custom.rules

                SUBSYSTEM=="tty", ATTRS{idVendor}=="2639", ACTION=="add", GROUP="$GROUP", MODE="0660"

            Change $GROUP into your desired group (e.g. adm, plugdev, or usb).


    - The device is inaccessible for a while after plugging it in -

        When having problems with the device being busy the first 20 seconds after
        plugin, purge the modemmanager application.

Acknowledgement:
    Thank you to Steven Gies and his engineering team at Xsens Technologies for testing this driver against their complete MTi IMU product portfolio and reviewing the driver source.
    

bluespace_ai_xsens_ros_mti_driver's People

Contributors

esteve avatar jaspritsgill avatar jollysg avatar jpazhaya avatar pshved avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

bluespace_ai_xsens_ros_mti_driver's Issues

Casting

When using this code on my MTi-G-710, the code kept crashing with the messege
[xsens_mti_node-1] what(): cannot store a negative time point in rclcpp::Time
This seems to be due to a casting issue in timereferencepublisher.h, where
sec is declared to be an uint32_t, but in the rclcpp::Time sample_time() it is
expected to be an int32_t.

ROS2 Humble

Are there any plans to update the package to work with ROS2 Humble?

Error installing in Foxy

My colcon build exits on errors:

`Starting >>> bluespace_ai_xsens_mti_driver
--- stderr: bluespace_ai_xsens_mti_driver
/usr/bin/ld: cannot find -lxscontroller
/usr/bin/ld: cannot find -lxscommon
/usr/bin/ld: cannot find -lxstypes
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/xsens_mti_node.dir/build.make:201: xsens_mti_node] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/xsens_mti_node.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Failed <<< bluespace_ai_xsens_mti_driver [1.33s, exited with code 2]

Summary: 0 packages finished [1.47s]
1 package failed: bluespace_ai_xsens_mti_driver
1 package had stderr output: bluespace_ai_xsens_mti_driver
`
And apparently these libraries don't exist anywhere else on the internet.

Did anybody else face this problem? How do I solve it?

Problems with reading data from the devices MTi-G-710 and MTi-30

According to the manual to this repo, the driver is compatible with the following models of sensor: MTi 1-series, MTi 10-series, MTi 100-series and MTi 600-series.
I have two models: MTi-G-710 and MTi-30. I am able to connect to these devices and read the data. However, some topics are empty for these devices. For model MTi-G-710 inside topic /imu/data there is only orientation data(x, y, z, w), linear_acceleration and angular_velocities are set to 0.0. For model MTi-G-710 inside topic /imu/data there are values of orientation and linear accelerations, but angular velocities are 0.0.
I tested the devices with official Xsens Software and both of them work correctly. Also I tested this driver with different ROS2 distributions but the results are always the same. Have you encountered such kind of problem with different devices?

Problem with buld Ubuntu 22 ROS2 Humble

Hello everyone,

i am having a problem with building the package with Colcon. I am trying to use the foxy branch as there is no humble available at the moment and ROS2 foxy has reached the EoL status.

I tried the packages from
[Guido Sanchez for humble] (https://github.com/gmsanchez/bluespace_ai_xsens_ros_mti_driver/tree/ros2_0_humble ) but unfortentlay i had the same error.

can anyone give me a hint why is the error appearing? I could not find any answer online

Thanks in advance
image

How do I use this driver for MTI-30?

Hi,
I have a MTI-30 model. When I run the driver it crashes with

[ERROR] [1628158672.132779485] [xsens_mti_node]: No MTi device found.

but lsusb does show this ;

Bus 001 Device 007: ID 2639:0003 Xsens MTi-30 AHRS

How can I use this driver for my sensor ?

Reference frame is set to world

The imu is linked to world as reference frame.
It is benificial to have the reference frame as parameter such that it can be changed in the params file

Measuring Frequency

Is there the possibility in order to increase the measuring frequency?
Right now the ros messages are published with 100 hz but the Xsens MTI 680 ist supposed to measure up to 400 hz.
Can I adjust that somehow?

No MTI device found for MTi-3 on Ubuntu 20.04 and ros2 foxy

I tried installing the bluespace_ai_xsens_ros_mti_driver on a Ubuntu 20.04 machine with ros2 foxy. I followed the installlation guidelines and I am also in the correct group (dialout).

When running

ros2 launch bluespace_ai_xsens_mti_driver xsens_mti_node.launch.py

I get the error:

[xsens_mti_node-1] [ERROR] [1636372933.308295039] [xsens_mti_node]: No MTi device found.

The xsens mtmanager can find the MTi-3 device when clicking 'Scan Single Port' ttyUSB0. But the mtmanager cannot find the device when clicking 'Scan All Ports', I don't know if this information might be helpful.

Problem to launch (Ubuntu 22, ROS-2 Humble)

Dear all,

I am facing a problem to launch the package.

As you see in the figure below,

  • the IMU (XSENS MTi-300 AHRS) is connected to the Ubuntu machine via USB,
  • the launch stucks while "Scanning for devices...".

Here are the specifications of my setup:

  • Ubuntu 22,
  • ROS 2 Humble,
  • XSENS MTi-300 AHRS.

When I start the MT Manager, I have access to the IMU data.

This problem might me similar to #13 (comment).

grafik

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.