Running two ethernet Hokuyo UST-10LX laser scanners simultaneously on ROS using urg_node
The trick to run two ethernet hokuyo laser scanners simultaneously is discussed here.
While we were working with Hokuyo UST-10lx for a project, we have encountered problems in interfacing two ethernet laser scanners simultaneously. Thus, I am writing this tutorial for future viewers. One of my colleague, debugged the problems and wrote a good solution here.
Brief explanation of the steps is as follows :
Connect the two laser scanners to a hub, and change their ethernet properties as described in the link above.
Open the terminal and type :
After that make a launch file in ROS workspace and save the following content in it.
<node ns=”lidar1″ pkg=”urg_node” type=”urg_node” name=”lidar1″>
<param name=”ip_address” value=”192.168.0.10″/>
<node ns=”lidar2″ pkg=”urg_node” type=”urg_node” name=”lidar1″ >
<param name=”ip_address” value=”192.168.0.12″/>
Save the file with ‘.launch’ extension, say “twolidar.launch” and save it in the ROS->workspace->package. Substitute, “192.168.0.xx” with the ip address of your device.
Open terminal, and move to the ROS workspace directory, and type the following after that :
roslaunch pkg_name twolidar.launch
This will run the laser scanning operation of both the laser scanners with the namespace “lidar1” and “lidar2” respectively. In order to visualize the data, run rviz as follows :
rosrun rviz rviz
Open both the laser scan in rviz and visualize them
Hope you do good with Hokuyo URG-10lx and ROS.