使用ust-10lx激光雷达通过hector

xiaoxiao2021-02-28  106

转载说明,特别鸣谢:

<1>Hokuyo URG-04LXhector_slam创建地图(无IMU)          http://blog.csdn.net/z15f34/article/details/53237845

<2>妹子教你在ROS中使用Hokuyo激光雷达UST-10LXUST-30LX          http://rosclub.cn/post-515.html

实现功能:在ubuntun14上,利用Hokuyo公司的ust-10lx通过hector_slam创建实验室地图。

运行环境:ubuntu14.04+indigo

硬件:ust-10lx(网口)

一、首先下载相关节点包

sudo apt-get install ros-indigo-urg-node

二、看看和激光雷达通信是不是成功

    因为Hokuyo激光雷达的出厂IP地址是:192.168.0.10,我的工作环境是win10虚拟机下的ubuntu14,硬件是激光雷达接出来的USB网口。我把USB网口接入windows环境下,单独修改USB网口的IP地址,就是IP地址的最后一位不同。虚拟机网络设置的是NAT(用于共享主机的IP地址)连接。

    ubuntu的控制台窗口输入:

ping 192.168.0.10

三、安装hector_slam

sudo apt-get install ros-indigo-hector-slam

四、编写接收数据的launch文件tutorial.launch

<launch> <include file="$(find hector_mapping)/launch/mapping_default.launch"> <arg name="base_frame" value="base_frame"/> <arg name="odom_frame" value="base_frame"/> //要把odom值换成base_frame,这样就不需要odemetry,不然会报错 </include> <include file="$(find hector_geotiff)/launch/geotiff_mapper.launch"> <arg name="trajectory_source_frame_name" value="base_frame"/> </include> <node pkg="tf" type="static_transform_publisher" name="base_frame_to_laser_broadcaster" args="0 0 0 0 0 0 base_frame laser 100"/> <node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_slam_launch)/rviz_cfg/mapping_demo.rviz"/> </launch>

五、下面开始运行命令:

roscore rosrun urg_node urg_node _ip_address:=192.168.0.10 source ~/catkin_ws/devel/setup.bash roslaunch smartcar tutorial.launch

六、上图

   
转载请注明原文地址: https://www.6miu.com/read-71596.html

最新回复(0)