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

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

最终效果:

相关推荐
小屁猪qAq9 小时前
ROS2 节点中使用参数
开发语言·c++·参数·ros2
WWZZ20251 天前
Isaac Sim入门——基础用法
机器人·大模型·机械臂·ros2·具身智能·isaac sim
General_G3 天前
ROS2资源汇总
linux·机器人·ros2
LYS_06185 天前
RM赛事C型板九轴IMU解算(3)(姿态融合算法)
c语言·算法·imu·姿态解算·四元数到欧拉角
点云SLAM6 天前
点云数据分割算法之-聚合层次聚类(AHC)平面识别
聚类·slam·点云数据处理·点云分割·平面识别·聚合层次聚类·有序点云数据
点云SLAM7 天前
MAP(最大后验)估计理论(2)以及相关应用
机器人·slam·卡尔曼滤波算法·map估计理论·lm算法·非线性最小二乘问题线性化
划水的code搬运工小李9 天前
自制py功能包解析IMU航迹推算
python·imu·航迹推算
-点灯-9 天前
【无标题】
ros2
General_G9 天前
irobot_benchmark的编译和使用
linux·中间件·机器人·ros2
deepdata_cn10 天前
惯性测量单元(IMU)在步态康复评估中的误差校准方案
imu