This is a ros2 driver for WT901C485.
I check this program only in ROS2 humble with ubuntu22.04.
git clone -b v1.2 https://github.com/k-trash/serial_connect
cd serial_connect
mkdir build
cd build
cmake ..
make
sudo make install
sudo gpasswd -a $USERNAME dialout
then reboot
cd <Your-ROS2-WS>/src
git clone https://github.com/k-trash/witmotion_wt901
cd ..
colcon build --symlink-install --packages-select witmotion_wt901
Make sure your WT901C485 communicate at 115200 baudrate.
You can modify the baudrate with windows application which Witmotion provides.
cd <Your-ROS2-WS>
source install/setup.bash
ros2 run witmotion_wt901 witmotion_wt901_node
you can also use launch file.
ros2 launch witmotion_wt901 witmotion_wt901.launch.xml
topic name | topic type |
---|---|
/imu/data_raw | sensor_msgs::msg::Imu |
/mag/data_raw | sensor_msgs::msg::MagneticField |