JY901-ROS2驱动代码

JY901-ROS2驱动代码

驱动包

该驱动代码修改自:

复制代码
https://github.com/ioio2995/witmotion_ros2

git clone https://github.com/ana52070/jy901_for_ros2.git

下载后放入到自己的ubuntu中

复制代码
sudo apt-get install libasio-dev

cd jy901_for_ros2

colcon build

source install/setup.bash

ros2 launch witmotion_ros2 witmotion_launch.py

这样,雷达驱动就已经运行起来了。

如果报错,可以查看是否为配置不对:

复制代码
 sudo vim src/witmotion_ros2/config/witmotion.yaml 

witmotion_node:
  ros__parameters:
    port: /dev/ttyUSB1
    baud_rate: 115200 # baud
    update_rate: 50.0 # Hz
    topic_name: /witmotion
    frame_id: base_link
    imu_linear_acceleration_covariance: [0.0364, 0.0, 0.0, 0.0, 0.0048, 0.0, 0.0, 0.0, 0.0796]
    imu_angular_velocity_covariance: [0.0663, 0.0, 0.0, 0.0, 0.1453, 0.0, 0.0, 0.0, 0.0378]
    imu_orientation_covariance: [0.0479, 0.0, 0.0, 0.0, 0.0207, 0.0, 0.0, 0.0, 0.0041]
    imu_temperature_variance: 0.01829
    magnetometer_covariance: [0.000000187123, 0.0, 0.0, 0.0, 0.000000105373, 0.0, 0.0, 0.0, 0.000000165816]
    magnetometer_temperature_variance: 0.01829
    barometer_variance: 0.001

如果USB不对,请检查设备树中USB的名称,如果CH340未安装可参考:

https://blog.csdn.net/chui_yu666/article/details/148385694?fromshare=blogdetail\&sharetype=blogdetail\&sharerId=148385694\&sharerefer=PC\&sharesource=chui_yu666\&sharefrom=from_link

RVIZ2查看

首先安装imu插件

复制代码
sudo apt install ros-ROS_DISTRO-rviz-imu-plugin

然后启动rviz

复制代码
rviz2

点击add

找到下面的imu

然后选择好对应的话题就可以了

最终效果:

相关推荐
特立独行的猫a10 小时前
ROS 2 主流DDS中间件入门:Cyclone DDS 与 Fast DDS 完全指南
中间件·ros2·dds·fast dds·cyclone dds
轻口味4 天前
启元无真机二开实战1:54 个接口能做什么、不能做什么——启元 Q1/T1 SDK 能力全景与版本矩阵
线性代数·矩阵·ros2·具身智能·启元机器人
Felaim4 天前
【SLAM】SLAM-Former论文与代码导读
transformer·slam·dense slam·代码导读
Felaim5 天前
【SLAM】SLAM数据集相机规格说明
数据集·vslam·slam·相机标定
Felaim5 天前
【SLAM】SLAM-Former
transformer·slam·dense slam·几何基础模型
记帖5 天前
STM32C5开发ISM330DHCX(6)--倾斜度检测
imu·mems·stm32cubemx2·stm32c542cct6·ism330dhcx
Felaim6 天前
【SLAM】人形机器人 VLN 相机与传感器配置调研
slam·传感器·人形机器人·vln·相机选型
热金鼠7 天前
2.ROS2 核心机制与命令行实操
ros2
记帖7 天前
STM32C5开发ISM330DHCX(9)--活动/静止检测
imu·mems·stm32cubemx2·stm32c542cct6·ism330dhcx
记帖7 天前
STM32C5开发ISM6HG256X(5)--运动唤醒检测
imu·mems·stm32cubemx2·stm32c542cct6·ism6hg256x