Giter Club home page Giter Club logo

witmotion_imu_ros's Introduction

Witmotion IMU sensor driver for ROS

ROS1 CI

focal-source focal-amd64 focal-armhf focal-arm64 dev doc
focal-source focal-amd64 focal-armhf focal-arm64 dev doc

witmotion_ros module implements a ROS 1 wrapper for Witmotion IMU driver library. It reads the data from the family of TTL-compatible inertial pose estimation units (IMUs) manufactured by WitMotion Shenzhen Co.,Ltd publishing the information in ROS-native way using sensor_msgs and std_msgs message definition packages. The module is focused on read-only access, so calibration and bias regulation functions are implemented in the underlying library. Port access model is implemented in monopolistic way acccording to UNIX specification, so only one instance of the module can be executed for the dedicated virtual device.

Datasheets and official documentation

The module is developed according to the specifications released by Witmotion, the presented snapshot has download date is 23.02.2022. The official website https://wiki.wit-motion.com is not always accessible, so the PDF snapshots are placed under IPFS web directory.

ROS2 branch

The ROS2 compatible implementation of the driver is WIP under ros2 branch. The initial migration made by @fllay (pull request #12).

Marking ROS2-related issues and pull requests

The contributors are strongly encouraged to mark the names of their ROS2-related issues and pull requests with [ROS2] prefix.

Installation

Prerequisites

The package requires QtSerialPort development package from Qt 5.2+

sudo apt-get install libqt5serialport5-dev

Building

cd catkin_ws
git clone --recursive https://github.com/ElettraSciComp/witmotion_IMU_ros.git src/witmotion_ros
catkin_make

If compilation fails, first check the directory src/witmotion_ros/witmotion-uart-qt. If it is empty, the recursive clone failed, and you should manually clone the underlying library from the repository https://github.com/ElettraSciComp/witmotion_IMU_QT into this directory. IMPORTANT! Please beware of the directory name, the CMakeLists file refers exactly to the name witmotion-uart-qt specified in the target import section.

Usage

roslaunch witmotion_ros witmotion.launch

Configuration

Configuration of the node is done by default via the configuration YAML file config.yml. But it also can be done using roslaunch XML syntax under the node's internal namespace. The single value measurements, like pressure and temperature, are enabled for the linear calibration because there can be differences in decoding coefficients between the sensors (proven for WT31N and JY901B sensors).

Parameters

  • port - the virtual kernel device name for a port, ttyUSB0 by default
  • baud_rate - port rate value to be used by the library for opening the port, 9600 baud by default
  • polling_interval - the sensor polling interval in milliseconds. If this parameter is omitted, the default value is set up by the library (50 ms).
  • timeout_ms - the sensor timeout period in milliseconds. If no data is received from the sensor after this period, then an error is raised and the node terminates. If this parameter is omitted, a default value of 3 times the polling interval is used. If this parameter is zero, the timeout check is disabled.
  • restart_service_name - the service name used to restart the sensor connection after an error.
  • imu_publisher:
    • topic_name - the topic name for IMU data publisher, imu in the node's namespace by default
    • frame_id - IMU message header frame ID
    • use_native_orientation - instructs the node to use the native quaternion orientation measurement from the sensor instead of synthesized from Euler angles. NOTE: if this setting is enabled bu the sensor does not produce orientation in the quaternion format, the IMU message will never be published!
    • measurements - every measurement in IMU message data pack can be enabled or disabled. If the measurement is disabled, the corresponding covariance matrix is set to begin from -1 as it is described in the message definition.
      • acceleration
        • enabled
        • covariance - row-major matrix 3x3, all zeros for unknown covariation
      • angular_velocity
        • enabled
        • covariance - row-major matrix 3x3, all zeros for unknown covariation
      • orientation
        • enabled
        • covariance - row-major matrix 3x3, all zeros for unknown covariation
  • temperature_publisher
    • enabled - enable or disable temperature measurement extraction
    • topic_name - the topic name for publishing temperature data
    • frame_id - message header frame ID
    • from_message - the message type string to determine from which type of Witmotion measurement message the temperature data should be extracted (please refer to the original documentation for detailed description). The possible values are: acceleration, angular_vel, orientation or magnetometer.
    • variance - the constant variance, if applicable, otherwise 0
    • coefficient - linear calibration multiplier, 1.0 by default
    • addition - linear calibration addendum, 0 by default
  • magnetometer_publisher
    • enabled - enable or disable magnetometer measurement extraction
    • topic_name - the topic name for publishing the data
    • frame_id - message header frame ID
    • coefficient - linear calibration multiplier, 1.0 by default
    • addition - linear calibration addendum, 0 by default
    • covariance - row-major matrix 3x3, all zeros for unknown covariation
  • barometer_publisher
    • enabled - enable or disable barometer measurement extraction
    • topic_name - the topic name for publishing the data
    • frame_id - message header frame ID
    • coefficient - linear calibration multiplier, 1.0 by default
    • addition - linear calibration addendum, 0 by default
    • variance - the constant variance, if applicable, otherwise 0
  • altimeter_publisher
    • enabled - enable or disable altitude measurement extraction
    • topic_name - the topic name for publishing the data
    • coefficient - linear calibration multiplier, 1.0 by default
    • addition - linear calibration addendum, 0 by default
  • orientation_publisher
    • enabled - enable or disable orientation measurement extraction
    • topic_name - the topic name for publishing the data
  • gps_publisher
    • enabled - enables/disables all GPS receiver measurements extraction
    • navsat_fix_frame_id - frame ID for GPS fixed position publisher
    • navsat_fix_topic_name - topic name for GPS fixed position publisher
    • navsat_altitude_topic_name - topic name for GPS altitude publisher
    • navsat_satellites_topic_name - topic name for GPS active satellites number publisher
    • navsat_variance_topic_name - topic name for GPS diagonal variance publisher
    • ground_speed_topic_name - topic name for GPS ground speed publisher
  • rtc_publisher
    • enabled - enables/disables realtime clock information decoder
    • topic_name - topic name for realtime clock publisher
    • presync - instructs the node to perform an attempt to pre-synchronize sensor's internal realtime clock

witmotion_imu_ros's People

Contributors

agtbaskara avatar fllay avatar gsokoll avatar knorth55 avatar twdragon avatar zacharykratochvil avatar

Stargazers

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

Watchers

 avatar  avatar

witmotion_imu_ros's Issues

For warnings is a rate limit is needed to prevent console spamming?

[ WARN] [1656190867.362036424]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.362581770]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.412202911]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.412616425]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.463088724]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.463421405]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.512931899]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.562740760]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.563155441]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.612732544]: Unknown packet ID 0x50 acquired
[ WARN] [1656190867.613172799]: Unknown packet ID 0x50 acquired

Validation of standalone sensor control applications

Opened over comments made by @rlabs-oss.

Started development of the standalone controller CLI applications. Now the library and application are presented for the WT31N sensor. The application supports the following configuration tasks:

  • Gyroscope calibration;
  • Baud rate setup
  • Polling frequency setup

Please feel free to validate the application and create your own controllers for the sensors you own and use.

HWT9053-485 is not working.

I have bought a HWT9053-485 IMU and I trying to use it with Jetson AGX orin.

Is it possible to use it?
I'm able to calibrate it with the WITMotion software new ,
but It seems like it doesn't read anything with the serial port in ubuntu.

It seems like the WitMotion software sending to the serial port with P00HP?
It that mean I need to do so in ubuntu ?
Screenshot 2023-10-30 at 13 18 25

Trouble interfacing with Raspberry Pi

I am running ROS Noetic on a Raspberry Pi and am trying to interface WT901 with this node. I have the IMU connected to the serial ports on the Raspberry Pi (tx, rx -> rx, tx) but the node cannot communicate with the IMU on the correct serial port and baud rate. I communicated with the IMU over I2C on the Raspberry Pi using a custom driver and UART on Arduino using sample code on the witmotion website. Is there something I am missing with respect to getting this ROS driver to work on a Raspberry Pi?

BWT901CL imu not showing any data

I was able to run the wit-motion imu roslaunch file and it seems to connect as shown below, but I do not see the /imu data in the ros topic.

$ roslaunch witmotion_ros wt901.launch
... logging to /home/aro/.ros/log/5d613466-638a-11ee-b39d-efb92b729d2e/roslaunch-aro-15176.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://aro:42723/

SUMMARY

PARAMETERS

  • /rosdistro: noetic
  • /rosversion: 1.15.15
  • /witmotion_imu/altimeter_publisher/addition: 0.0
  • /witmotion_imu/altimeter_publisher/coefficient: 1.0
  • /witmotion_imu/altimeter_publisher/enabled: False
  • /witmotion_imu/altimeter_publisher/topic_name: /altitude
  • /witmotion_imu/barometer_publisher/addition: 0.0
  • /witmotion_imu/barometer_publisher/coefficient: 1.0
  • /witmotion_imu/barometer_publisher/enabled: False
  • /witmotion_imu/barometer_publisher/frame_id: base_link
  • /witmotion_imu/barometer_publisher/topic_name: /barometer
  • /witmotion_imu/barometer_publisher/variance: 0.001
  • /witmotion_imu/baud_rate: 115200
  • /witmotion_imu/gps_publisher/enabled: False
  • /witmotion_imu/gps_publisher/ground_speed_topic_name: /gps_ground_speed
  • /witmotion_imu/gps_publisher/navsat_altitude_topic_name: /gps_altitude
  • /witmotion_imu/gps_publisher/navsat_fix_frame_id: world
  • /witmotion_imu/gps_publisher/navsat_fix_topic_name: /gps
  • /witmotion_imu/gps_publisher/navsat_satellites_topic_name: /gps_satellites
  • /witmotion_imu/gps_publisher/navsat_variance_topic_name: /gps_variance
  • /witmotion_imu/imu_publisher/frame_id: imu
  • /witmotion_imu/imu_publisher/measurements/acceleration/covariance: [0.0364, 0, 0, 0,...
  • /witmotion_imu/imu_publisher/measurements/acceleration/enabled: True
  • /witmotion_imu/imu_publisher/measurements/angular_velocity/covariance: [0.0663, 0, 0, 0,...
  • /witmotion_imu/imu_publisher/measurements/angular_velocity/enabled: True
  • /witmotion_imu/imu_publisher/measurements/orientation/covariance: [0.0479, 0, 0, 0,...
  • /witmotion_imu/imu_publisher/measurements/orientation/enabled: True
  • /witmotion_imu/imu_publisher/topic_name: /imu
  • /witmotion_imu/imu_publisher/use_native_orientation: True
  • /witmotion_imu/magnetometer_publisher/addition: 0.0
  • /witmotion_imu/magnetometer_publisher/coefficient: 1e-08
  • /witmotion_imu/magnetometer_publisher/covariance: [1.87123e-07, 0, ...
  • /witmotion_imu/magnetometer_publisher/enabled: True
  • /witmotion_imu/magnetometer_publisher/frame_id: compass
  • /witmotion_imu/magnetometer_publisher/topic_name: /magnetometer
  • /witmotion_imu/orientation_publisher/enabled: True
  • /witmotion_imu/orientation_publisher/topic_name: /orientation
  • /witmotion_imu/polling_interval: 10
  • /witmotion_imu/port: ttyUSB0
  • /witmotion_imu/restart_service_name: /restart_imu
  • /witmotion_imu/rtc_publisher/enabled: False
  • /witmotion_imu/rtc_publisher/topic_name: /witmotion_clock
  • /witmotion_imu/temperature_publisher/addition: 0.0
  • /witmotion_imu/temperature_publisher/coefficient: 1.0
  • /witmotion_imu/temperature_publisher/enabled: True
  • /witmotion_imu/temperature_publisher/frame_id: base_link
  • /witmotion_imu/temperature_publisher/from_message: magnetometer
  • /witmotion_imu/temperature_publisher/topic_name: /temperature
  • /witmotion_imu/temperature_publisher/variance: 0.01829
  • /witmotion_imu/timeout_ms: 150

NODES
/
witmotion_imu (witmotion_ros/witmotion_ros_node)

ROS_MASTER_URI=http://localhost:11311

process[witmotion_imu-1]: started with pid [15225]
Opening device "ttyUSB0" at 115200 baud
Instantiating timer at 10 ms

** when I am trying to see the /imu topic it does not give any data.

NEED HELP on this

Massive latency in HWT905

I have a similar problem to the one described in problem #24, but for the HWT905 sensor with the following parameters:
witmotion:
ros__parameters:
port: ttyUSB0
baud_rate: 115200 # baud
polling_interval: 12 # ms
timeout_ms: 10 # ms
the sensor data, from the moment a movement is performed to when I see it plotted, arrives with a very large delay of the order of 10 seconds.

I'm using the ros2 branch.

its not working for WT901BLECL5.0

The sensor is connecting but its not outputting the data,
This is the error msg, i got
setting /run_id to ecf24ac8-090a-11ee-a325-0242c6588c83
process[rosout-1]: started with pid [8024]
started core service [/rosout]
process[witmotion_imu-2]: started with pid [8052]
Opening device "ttyUSB2" at 115200 baud
[ INFO] [1686565304.837663888]: Initiating RTC pre-synchonization: current timestamp 2023-06-12T15:51:44.837
Instantiating timer at 50 ms
[ INFO] [1686565304.842992995]: Configuration ROM: lock removal started
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x69
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x33
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x32
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x31
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x30
Configuration packet sent, flushing buffers...
Configuration completed
[ INFO] [1686565309.844640790]: RTC pre-synchonization completed, saving configuration
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x0
Configuration packet sent, flushing buffers...
Configuration completed
[ INFO] [1686565310.845034193]: RTC synchronized
[ERROR] [1686565310.845576275]: Sensor error: No data acquired during last 3 iterations, please check the baudrate!
[ INFO] [1686565310.845784884]: Entering SUSPENDED state
QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
Suspending TTL connection, please emit RunPoll() again to proceed!
[ERROR] [1686565310.847763963]: Sensor error: No data acquired during last 3 iterations, please check the baudrate!
[ INFO] [1686565310.847867035]: Entering SUSPENDED state
Suspending TTL connection, please emit RunPoll() again to proceed!
[ERROR] [1686565310.848724190]: Sensor error: No data acquired during last 3 iterations, please check the baudrate!
[ INFO] [1686565310.848851647]: Entering SUSPENDED state
Suspending TTL connection, please emit RunPoll() again to proceed!
[ERROR] [1686565310.849020799]: Sensor error: No data acquired during last 3 iterations, please check the baudrate!
[ INFO] [1686565310.849107072]: Entering SUSPENDED state
Suspending TTL connection, please emit RunPoll() again to proceed!

wt901 sensor covariance

Hi, how is the accelerometer, gyroscope ... covariance matrix obtained for the wt901 sensor? As shown in the wt901.yml config file. Thank you.

Setting frequency

How and where do you set the frequency? I am using ros noetic

update: Regardless of what polling interval I set, I cannot seem to go over 10 hz (according to rqt)

WT901C-485 is not working in ros2 humble

Hi i have a problem about WT901C-485.

Environment:
Ubuntu 20.04
ROS2 Humble with docker
IMU WT901C-485

When i run ros2 launch witmotion_ros wt901_launch.py, i get under the error.
root@ubuntu-950XDA:~/home/colcon_ws# ros2 launch witmotion_ros wt901_launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2023-11-13-04-39-00-217161-ubuntu-950XDA-28525
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [witmotion_ros_node-1]: process started with pid [28526]
[witmotion_ros_node-1] [INFO] [1699850340.261470118] [ROSWitmotionSensorController]: Controller started
[witmotion_ros_node-1] [INFO] [1699850340.261552591] [MinimalPublisher]: QT spin !!!!!
[witmotion_ros_node-1] [ERROR] [1699850340.420747476] [ROSWitmotionSensorController]: Sensor error: Timed out waiting for data, please check device connection and baudrate!
[witmotion_ros_node-1] [INFO] [1699850340.420804741] [ROSWitmotionSensorController]: Entering SUSPENDED state
[witmotion_ros_node-1] QObject::killTimer: Timers cannot be stopped from another thread
[witmotion_ros_node-1] QObject::~QObject: Timers cannot be stopped from another thread
[witmotion_ros_node-1] QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
[ERROR] [witmotion_ros_node-1]: process has died [pid 28526, exit code -11, cmd '/root/home/colcon_ws/install/witmotion_ros/lib/witmotion_ros/witmotion_ros_node --ros-args --params-file /root/home/colcon_ws/install/witmotion_ros/share/witmotion_ros/config/wt901.yml'].

wt901.yml show under the contents.
witmotion:
ros__parameters:
port: ttyUSB0
baud_rate: 115200 # baud
polling_interval: 50 # ms
timeout_ms: 150 # ms
restart_service_name: /restart_imu
imu_publisher:
topic_name: /imu
frame_id: imu
use_native_orientation: true
measurements:
acceleration:
enabled: true
covariance: [0.0364, 0.0, 0.0, 0.0, 0.0048, 0.0, 0.0, 0.0, 0.0796]
angular_velocity:
enabled: true
covariance: [0.0663, 0.0, 0.0, 0.0, 0.1453, 0.0, 0.0, 0.0, 0.0378]
orientation:
enabled: true
covariance: [0.0479, 0.0, 0.0, 0.0, 0.0207, 0.0, 0.0, 0.0, 0.0041]
temperature_publisher:
enabled: true
topic_name: /temperature
frame_id: base_link
from_message: magnetometer # acceleration, angular_vel, orientation, magnetometer
variance: 0.01829
coefficient: 1.0 # Linear calibration parameters: coefficient
addition: 0.0 # and addendum
magnetometer_publisher:
enabled: true
topic_name: /magnetometer
frame_id: compass
coefficient: 0.00000001 # Linear calibration parameters: coefficient
addition: 0.0 # and addendum
covariance:
[0.000000187123, 0.0, 0.0, 0.0, 0.000000105373, 0.0, 0.0, 0.0, 0.000000165816]
barometer_publisher:
enabled: false
topic_name: /barometer
frame_id: base_link
variance: 0.001
coefficient: 1.0 # Linear calibration parameters: coefficient
addition: 0.0 # and addendum
altimeter_publisher:
enabled: false
topic_name: /altitude
coefficient: 1.0 # Linear calibration parameters: coefficient
addition: 0.0 # and addendum
orientation_publisher:
enabled: true
topic_name: /orientation
gps_publisher:
enabled: false
navsat_fix_frame_id: world
navsat_fix_topic_name: /gps
navsat_altitude_topic_name: /gps_altitude
navsat_satellites_topic_name: /gps_satellites
navsat_variance_topic_name: /gps_variance
ground_speed_topic_name: /gps_ground_speed
rtc_publisher:
enabled: false
topic_name: /witmotion_clock

How can i solve it? Thank you.

[ROS2] Test reports for ROS2 version on different sensors

This issue is dedicated to place the test reports of ROS2 version of this driver. All contributors are encouraged to place the test reports they have for this driver on the different Witmotion sensors here. Please link here also the other issues containing test results and experience feedback under the following template:

Tested sensor

<sensor model, case type, connection type>

List of tested modes

  • list or table of tested baudrates,
  • frequencies,
  • polling rates,

Maximal duration of stable working (approx.)

Encountered issues and crashes

ROS1 issue: #16

Provide installation guidance in Readme.md

Please provide some installation guidance within the readme.

Had to figure out the hard way which required packages where missing. Could look like:

Installation

  1. clone the repositiory into your catkin_ws/src folder using --recursive to also clone the linked witmotion-uart-qt module:
cd catkin_ws/src
git clone --recursive https://github.com/ElettraSciComp/witmotion_IMU_ros.git

if the recursive clone fails clone the uart-qt repository manually into the witmotion-uart-qt folder

  1. install qt5serialPort with
sudo apt-get install libqt5serialport5-dev

Rviz. No messages received after 0.7.15-alpha.

wt901c. Все версии до 0.7.15-alpha включительно работают. На следующих версиях Rviz говорит, что сообщения не получены.

I can see topics, but no values on hwt905-ttl ?!

Hello, I bought your hwt905, ttl version.
Calibration on win10 ok.
restarted under ubuntu 20, under ros noetic
When i roslaunch : roslaunch witmotion_ros witmotion.launch,
imu seems to work :

roslaunch witmotion_ros witmotion.launch
... logging to /home/ylo2/.ros/log/3bbc653e-8a1d-11ed-9ad3-253eccaef672/roslaunch-ylo2-UP-WHL01-10499.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
WARNING: disk usage in log directory [/home/ylo2/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.

started roslaunch server http://ylo2-UP-WHL01:36477/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.14
 * /witmotion_imu/altimeter_publisher/addition: 0.0
 * /witmotion_imu/altimeter_publisher/coefficient: 1.0
 * /witmotion_imu/altimeter_publisher/enabled: True
 * /witmotion_imu/altimeter_publisher/topic_name: /altitude
 * /witmotion_imu/barometer_publisher/addition: 0.0
 * /witmotion_imu/barometer_publisher/coefficient: 1.0
 * /witmotion_imu/barometer_publisher/enabled: True
 * /witmotion_imu/barometer_publisher/frame_id: base_link
 * /witmotion_imu/barometer_publisher/topic_name: /barometer
 * /witmotion_imu/barometer_publisher/variance: 0.001
 * /witmotion_imu/baud_rate: 115200
 * /witmotion_imu/gps_publisher/enabled: False
 * /witmotion_imu/gps_publisher/ground_speed_topic_name: /gps_ground_speed
 * /witmotion_imu/gps_publisher/navsat_altitude_topic_name: /gps_altitude
 * /witmotion_imu/gps_publisher/navsat_fix_frame_id: world
 * /witmotion_imu/gps_publisher/navsat_fix_topic_name: /gps
 * /witmotion_imu/gps_publisher/navsat_satellites_topic_name: /gps_satellites
 * /witmotion_imu/gps_publisher/navsat_variance_topic_name: /gps_variance
 * /witmotion_imu/imu_publisher/frame_id: imu
 * /witmotion_imu/imu_publisher/measurements/acceleration/covariance: [0.0088, 0, 0, 0,...
 * /witmotion_imu/imu_publisher/measurements/acceleration/enabled: True
 * /witmotion_imu/imu_publisher/measurements/angular_velocity/covariance: [0.1199, 0, 0, 0,...
 * /witmotion_imu/imu_publisher/measurements/angular_velocity/enabled: True
 * /witmotion_imu/imu_publisher/measurements/orientation/covariance: [0.019, 0, 0, 0, ...
 * /witmotion_imu/imu_publisher/measurements/orientation/enabled: True
 * /witmotion_imu/imu_publisher/topic_name: /imu
 * /witmotion_imu/imu_publisher/use_native_orientation: False
 * /witmotion_imu/magnetometer_publisher/addition: 0.0
 * /witmotion_imu/magnetometer_publisher/coefficient: 1e-08
 * /witmotion_imu/magnetometer_publisher/covariance: [1.87123e-07, 0, ...
 * /witmotion_imu/magnetometer_publisher/enabled: True
 * /witmotion_imu/magnetometer_publisher/frame_id: imu
 * /witmotion_imu/magnetometer_publisher/topic_name: /magnetometer
 * /witmotion_imu/orientation_publisher/enabled: True
 * /witmotion_imu/orientation_publisher/topic_name: /orientation
 * /witmotion_imu/polling_interval: 150
 * /witmotion_imu/port: ttyUSB0
 * /witmotion_imu/restart_service_name: /restart_imu
 * /witmotion_imu/rtc_publisher/enabled: True
 * /witmotion_imu/rtc_publisher/presync: True
 * /witmotion_imu/rtc_publisher/topic_name: /witmotion_clock
 * /witmotion_imu/temperature_publisher/addition: 0.0
 * /witmotion_imu/temperature_publisher/coefficient: 1.0
 * /witmotion_imu/temperature_publisher/enabled: True
 * /witmotion_imu/temperature_publisher/frame_id: base_link
 * /witmotion_imu/temperature_publisher/from_message: magnetometer
 * /witmotion_imu/temperature_publisher/topic_name: /temperature
 * /witmotion_imu/temperature_publisher/variance: 0.02683

NODES
  /
    witmotion_imu (witmotion_ros/witmotion_ros_node)

auto-starting new master
process[master]: started with pid [10514]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 3bbc653e-8a1d-11ed-9ad3-253eccaef672
process[rosout-1]: started with pid [10531]
started core service [/rosout]
process[witmotion_imu-2]: started with pid [10538]
Opening device "ttyUSB0" at 115200 baud
[ INFO] [1672609368.553916924]: Initiating RTC pre-synchonization: current timestamp 2023-01-01T22:42:48.553
[ INFO] [1672609368.554407922]: Configuration ROM: lock removal started
Instantiating timer at 150 ms
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x69
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x33
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x32
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x31
Configuration packet sent, flushing buffers...
Configuration completed
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x30
Configuration packet sent, flushing buffers...
Configuration completed
[ INFO] [1672609373.555362664]: RTC pre-synchonization completed, saving configuration
Configuration task detected, 1 commands in list, configuring sensor...
Sending configuration packet 0x0
Configuration packet sent, flushing buffers...
Configuration completed
[ INFO] [1672609374.555630283]: RTC synchronized

Howerver, when I run : rostopic echo /altitude or rostopic echo /imu, I don't see any values ?!!

Any idea ?

std_srvs dependency missing from package.xml

It seems that the std_srvs dependency is missing from the package.xml

This causes an error during build using catkin here is the message of the error:

Errors << witmotion_ros:check /root/catkin_ws/logs/witmotion_ros/build.check.001.log                
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkin_package.cmake:196 (message):
  catkin_package() the catkin package 'std_srvs' has been find_package()-ed
  but is not listed as a build dependency in the package.xml
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:20 (catkin_package)


make: *** [Makefile:1366: cmake_check_build_system] Error 1
cd /root/catkin_ws/build/witmotion_ros; catkin build --get-env witmotion_ros | catkin env -si  /usr/bin/make cmake_check_build_system; cd -

The solution is simply to add std_srvs to the package.xml:

...
<depend>std_srvs</depend>
...

IMU ros driver compatible with i2c protocol

Thank you for releasing this nice driver.
I was wondering if there is a way to make this driver compatible with i2c communication protocol or do you have a driver version working with i2c? Any insights on this are appreciated.
Thanks

Configuration quesiton: Scale IMU Z ?

Is there any configuration parameter available to scale the IMU z linear_acceleration?

Lidar IMU:
angular_velocity:
x: 0.7692424058914185
y: -0.06967184692621231
z: -0.1747824251651764

Wit_Motion IMU:
linear_acceleration:
x: -0.8622070550918579
y: 0.2490820288658142
z: 9.920170783996582

In the example above it should match the Lidar, and thus multiplied by 0.1x

[ROS2] WT901C issues

environment:

Ubuntu 22.04
ROS2 Humble
pulled repo today

I'm getting good data off the sensor with the message enumerator utility and witmotionctl-wt901 util, but only the /temperature topic is getting published in ROS2 (the /imu and /orientation topics are not publishing). See below.

My output looks correct at 9600 on ttyUSB0:

~/ros2_ws/build/witmotion_ros/witmotion-uart-qt$ ./witmotionctl-wt901
	Creating multithreaded interface for Witmotion WT901 IMU sensor connected to ttyUSB0 at 9600 baud
	Running reader thread
	Opening device "ttyUSB0" at 9600 baud
	Instantiating timer at 50 ms
	1	Accelerations [X|Y|Z]:	[ 0.36883 | 0.11017 | 9.93454 ], temp 32.03000 degrees, in 0.00000 s
	2	Angular velocities [X|Y|Z]:	[ 0.00000 | 0.00000 | 0.00000 ], temp 32.03000 degrees, in 0.00006 s
	3	Euler angles [R|P|Y]:	[ 0.62073 | -2.10388 | 174.33105 ], temp 181.24001 degrees,  in 0.00003 s
	4	Magnetic field [X|Y|Z]:	[ 560.00000 | -6488.00000 | -4700.00000 ], temp 0.00000 degrees,  in 0.00001 s
	5	Accelerations [X|Y|Z]:	[ 0.36883 | 0.09580 | 9.88664 ], temp 32.00000 degrees, in 0.00000 s
	6	Angular velocities [X|Y|Z]:	[ 0.00000 | 0.00000 | 0.00000 ], temp 32.00000 degrees, in 0.00000 s
	7	Euler angles [R|P|Y]:	[ 0.62073 | -2.10388 | 174.33105 ], temp 181.24001 degrees,  in 0.00000 s
	8	Magnetic field [X|Y|Z]:	[ 555.00000 | -6466.00000 | -4693.00000 ], temp 0.00000 degrees,  in 0.00000 s
	9	Accelerations [X|Y|Z]:	[ 0.36404 | 0.11017 | 9.96328 ], temp 32.01000 degrees, in 0.00000 s
	10	Angular velocities [X|Y|Z]:	[ 0.00000 | 0.00000 | 0.00000 ], temp 32.01000 degrees, in 0.00000 s
	11	Euler angles [R|P|Y]:	[ 0.62073 | -2.10388 | 174.33105 ], temp 181.24001 degrees,  in 0.00000 s
	12	Magnetic field [X|Y|Z]:	[ 558.00000 | -6473.00000 | -4679.00000 ], temp 0.00000 degrees,  in 0.00000 s
	13	Accelerations [X|Y|Z]:	[ 0.36404 | 0.11017 | 9.95370 ], temp 32.01000 degrees, in 0.00000 s



./message-enumerator
	Press Ctrl+C to stop enumeration and see the report
	Opening device "ttyUSB0" at 9600 baud
	Instantiating timer at 50 ms
	^C
	Closing TTL connection

	WITMOTION UART MESSAGE ENUMERATOR BY TWDRAGON

	Acquired at Wednesday, June 14, 2023 5:47:02 PM CDT

	ID	Qty	Description

	0x51	780	Accelerations
	0x52	781	Angular velocities
	0x53	781	Spatial orientation (Euler angles)
	0x54	781	Magnetometer/Magnetic orientation

		Unknown IDs: 0 [  ] 
	Total messages: 3123

This is what the node outputs (i set the wt901 config file to 9600 baud and sourced it). Should the output continue after the QT Spin line?

$ ros2 launch witmotion_ros wt901.launch.py 
[INFO] [launch]: All log files can be found below /home/alluvial/.ros/log/2023-06-14-18-16-01-248129-dampers-8129
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [witmotion_ros_node-1]: process started with pid [8130]
[witmotion_ros_node-1] [INFO] [1686784561.373864647] [ROSWitmotionSensorController]: Controller started
[witmotion_ros_node-1] [INFO] [1686784561.373946602] [MinimalPublisher]: QT spin !!!!!

clone method still fails

$ git clone --recursive https://github.com/ElettraSciComp/witmotion_IMU_ros.git src/witmotion_ros
Cloning into 'src/witmotion_ros'...
remote: Enumerating objects: 98, done.
remote: Counting objects: 100% (98/98), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 98 (delta 46), reused 82 (delta 33), pack-reused 0
Unpacking objects: 100% (98/98), 22.91 KiB | 350.00 KiB/s, done.
Submodule 'witmotion-uart-qt' ([email protected]:ElettraSciComp/witmotion_IMU_QT.git) registered for path 'witmotion-uart-qt'
Cloning into '/home/lab/external-source/src/witmotion_ros/witmotion-uart-qt'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:ElettraSciComp/witmotion_IMU_QT.git' into submodule path '/home/lab/external-source/src/witmotion_ros/witmotion-uart-qt' failed
Failed to clone 'witmotion-uart-qt'. Retry scheduled
Cloning into '/home/lab/external-source/src/witmotion_ros/witmotion-uart-qt'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:ElettraSciComp/witmotion_IMU_QT.git' into submodule path '/home/lab/external-source/src/witmotion_ros/witmotion-uart-qt' failed
Failed to clone 'witmotion-uart-qt' a second time, aborting

Test reports for ROS1 version on different sensors

This issue is dedicated to placing the test reports of the ROS1 version of this driver. All contributors are encouraged to place the test reports they have for this driver on the different Witmotion sensors here. Please link here also the other issues containing test results and experience feedback under the following template:

Tested sensor

<sensor model, case type, connection type>
<machine, architecture, CPU, kernel>

List of tested modes

  • list or table of tested baudrates,
  • frequencies,
  • polling rates,

Maximal duration of stable working (approx.)

Encountered issues and crashes

ROS2 issue: #15

[ROS2] clean build failing on ROS2 Foxy

When I follow the installation instruction within a ROS2 Foxy environment on Ubuntu 20.04, the colcon build command fails with hundreds of these errors:

CMake Error at /opt/ros/foxy/share/ament_cmake_export_libraries/cmake/ament_export_libraries.cmake:83 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_LOCATION" is not allowed.
Call Stack (most recent call first):
  CMakeLists.txt:98 (ament_export_libraries)

build fail log.txt

I've attached a full log showing my exact steps, which following the installation instructions.

Issue with HWT 905-485 Sensor - Timed Out Waiting for Data

I am currently in the process of setting it up using the ROS driver provided on your GitHub repository.
I followed the installation instructions meticulously, including the prerequisites, and successfully built the package using the following commands:

cd catkin_ws
git clone --recursive https://github.com/ElettraSciComp/witmotion_IMU_ros.git src/witmotion_ros
catkin_make

Everything seemed to work well until I attempted to launch the sensor using the command:
roslaunch witmotion_ros witmotion.launch
However, I encountered an issue with the attached error message.

406503414_895426495325657_5975897381191548365_n

I have verified the device connection and baudrate settings, but the issue persists.
I would greatly appreciate any guidance or troubleshooting steps you can provide to help me overcome this challenge.

Не запускается

[witmotion_imu-2] process has died [pid 16036, exit code -11, cmd /home/tohax/ws_core/devel/lib/witmotion_ros/witmotion_ros_node __name:=witmotion_imu __log:=/home/tohax/.ros/log/7c5c6e64-0c13-11ed-b4bf-00155d39e248/witmotion_imu-2.log].
log file: /home/tohax/.ros/log/7c5c6e64-0c13-11ed-b4bf-00155d39e248/witmotion_imu-2*.log

В чем может быть причина? Ros noetic, модуль WT901C.

Massive latency in HWT906 with dev board and USBC connection.

Tested sensor

<sensor model, case type, connection type>
HWT906 with dev board
<machine, architecture, CPU, kernel>
Jetson Orin NX , ARM64,
List of tested modes
ROS driver,

list or table of tested baudrates,

921600 is the only that works by default
frequencies,
polling rates,
any, 5 to 50ms

Always massive latency of 40sec or more.
Tested native orientatation true or false, rc clock true or false, always that massive latency when work.

IMU static TF is not published , please add a TF publisher in the node.

https://github.com/yowlings/wit_node after change the bauds in the code it works at 1000hz. Maybe you could check why is working and not yours.

Thanks.

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.