在ROS中使用UST-10雷达

  • Post author:
  • Post category:其他




1.安装urg_node包

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



2.修改ubuntu的ip地址

sudo gedit /etc/network/interfaces
auto lo
iface lo inet loopback
 
下面添加以下语句: 
auto enp8s0(自己网卡号用ifconfig查看)(我使用的双系统,这里是enp开头)
allow-hotplug enp8s0
iface enp8s0 inet static
 
      address 192.168.3.199              //这里是ubuntu的ip
 
      netmask 255.255.255.0



3.确定激光雷达以连接

ping 192.168.3.211

由于使用的ust修改了ip,ust出厂设置ip为192.168.0.10



4.启动UST

roscore
rosrun urg_node urg_node _ip_address:=192.168.3.211 //这里的ip是使用UST的ip



5.在rviz中查看

rviz

把Global options 的Fixed Frame 改为laser



6.查看雷达数据

rostopic echo /scan
//查看激光雷达数据类型和结构
rostopic type /scan

rosmsg show sensor_msgs/LaserScan



版权声明:本文为qq_44623066原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。