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

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

最终效果:

相关推荐
元让_vincent2 天前
论文Review 点云配准综述 | 西北工业大学 | 3D Registration in 30 Years: A Survey | (一) 帧间粗配准
3d·机器人·slam·点云配准
漫漫求2 天前
ros2常用命令
ros2
FateRing2 天前
ros noetic使用pointcloud_to_laserscan 将2d激光雷达与深度摄像头数据融合
slam·激光雷达·深度摄像头
hello我是小菜鸡4 天前
关于第七章和第八章习题中算法改进的比较
slam
点云SLAM5 天前
四元数 (Quaternion)动力学左乘/右乘约定下之误差态 EKF 的连续线性化与离散化传播示例(11)
机器人·slam·位姿估计·imu·四元数·误差状态ekf
奔跑的花短裤5 天前
ROS2安装
ros·ros2·ros1
敬往事一杯酒哈5 天前
1.3 Ros2快速体验
python·ros2
加油JIAX6 天前
LVI-SAM中激光点云辅助视觉特征点获取深度
slam
sunshine~~~6 天前
ROS 2 Jazzy + Python 3.12 + Web 前端案例
开发语言·前端·python·anaconda·ros2
G果6 天前
Modbus CRC16 算法(举例)
can·modbus·ros2·crc16