【ros下激光雷达的简单使用】(1)

雷达简单使用方法:

思蓝科技S2的激光雷达
请添加图片描述

查看硬件是否连接成功:

使用lsusb

wpf@wpfpc:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 048d:c100 Integrated Technology Express, Inc.
Bus 001 Device 007: ID 275d:0ba6
Bus 001 Device 006: ID 2a7a:938f
Bus 001 Device 002: ID 0a05:7211 Unknown Manufacturer hub
Bus 001 Device 005: ID 8087:0026 Intel Corp.
Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

说明连接成功

基本使用步骤:

第一步下载对应的ros包 plidar_ros-master,可以直接取官网下载,对应的ros包即可

第二步骤创建ros下的工作空间,在工作空间下使用catkin_make

第三步骤,输入roslaunch rplidar_ros view_rplidar_s2.launch

显示如图:

wpf@wpfpc:~/catkin_ps/src$ roslaunch rplidar_ros view_rplidar_s2.launch
... logging to /home/wpf/.ros/log/239bc890-e334-11ec-800d-68545a4d92c5/roslaunch-wpfpc-5852.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://wpfpc:45163/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /rplidarNode/angle_compensate: True
 * /rplidarNode/frame_id: laser
 * /rplidarNode/inverted: False
 * /rplidarNode/serial_baudrate: 1000000
 * /rplidarNode/serial_port: /dev/ttyUSB0

NODES
  /
    rplidarNode (rplidar_ros/rplidarNode)
    rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[rplidarNode-1]: started with pid [5882]
[ INFO] [1654257967.303245106]: RPLIDAR running on ROS package rplidar_ros, SDK Version:2.0.0
process[rviz-2]: started with pid [5888]
[ INFO] [1654257967.348479593]: RPLIDAR S/N: C294ED93C5E19FD2C7EB9BF3304C4273
[ INFO] [1654257967.348497836]: Firmware Ver: 1.00
[ INFO] [1654257967.348504421]: Hardware Rev: 18
[ INFO] [1654257967.399650823]: RPLidar health status : OK.
[ INFO] [1654257967.600712650]: current scan mode: DenseBoost, sample rate: 32 Khz, max_distance: 30.0 m, scan frequency:10.0 Hz, 
对应的rviz如下:请添加图片描述

使用rostopic list查看如下

wpf@wpfpc:~$ rostopic list 
/initialpose
/move_base_simple/goal
/rosout
/rosout_agg
/scan
/tf
/tf_static

显示对应的信息直接使rostopic echo /scan

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值