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

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

最终效果:

相关推荐
风合星语1 天前
2026 ROS 2 Lyrical C++ 入门(五):Action 实战——任务反馈、取消与超时处理
c++·机器人·ros2·异步编程·lyrical
音视频牛哥1 天前
从 LLM、VLA、LLA、SLIM 到实时音视频感知底座:具身智能真正需要的不只是大模型
人工智能·llm·机器人视觉·slam·vla·多模态感知·机器人音视频
浅梦语113 天前
32-1 nav2_map_server实际作用与用法图解
ros2·nav2
米糕闯编程4 天前
鱼香ros2(七)功能包组织C++节点
c++·ros2·cmakelists
米糕闯编程5 天前
鱼香ros2(五)用C++编写节点
c++·ros2·cmakelists·鱼香
blueSatchel7 天前
c++action 编写(ros-humble)
c++·ros2
blueSatchel7 天前
ros-humble仿真-建图-导航
linux·ros2
米糕闯编程9 天前
鱼香ros2(三)Linux操作总结
linux·机器人·ros2
2601_962293539 天前
第3.7章 机器人第三方库实战总结(七):OpenCV视觉SLAM核心库详解:API速查+源码实例+避坑指南
图像处理·opencv·计算机视觉·slam·第三方库
蝙蝠侠的小蝙蝠10 天前
【ROS2 工具】Launch
ros2·launch·多节点启动