A brief documentation on how to install the drivers for using Hokuyo URG-04LX-UG01 sensor with ROS Kinetic.
- Installing the urg_node:
sudo apt-get install ros-kinetic-urg-node
-
Configuring the Hokuyo sensor:
-
Check the permissions of the Hokuyo:
ls -l /dev/ttyACM0
. The output would be of form:crw-[XX]---- 1 root dialout 166, 0 Oct 28 22:12 /dev/ttyACM0
-
If
[XX] = rw
, then the laser is configured properly, else runsudo chmod a+rw /dev/ttyACM0
to change the permissions. -
Checking if device has been setup properly with ROS:
rosrun urg_node getID /dev/ttyACM0
NOTE: The output:
Device at /dev/ttyACM0 has ID H0807228
means that the sensor is configured correctly.
-
-
Running Hokuyo on ROS:
roscore & rosrun urg_node urg_node
- Setup tf tree to visualize the laser scan on rviz:
rosrun tf static_transform_publisher 0 0 0 0 0 0 1 chassis laser 10
- Open rviz to visualize the laser scan
rosrun rviz rviz
Run the following command to visualize the hokuyo data using rviz:
roslaunch hardware_hokuyo urg04lx_rviz.launch