0. Find the ousterlidar IP address
The host's IP address need to be in the same range as the ouster lidar, usually within the 169.254.xxx.xxx domain.
I used a previously setup agx(169.254.75.43) to ping the lidar using the sn code
ping -4 -c3 os-122127000842.local
The output contains the ip address of the lidar, which is 169.254.70.194.
The lidar that was previously paired up with the agx is os-122130000067(169.254.102.121).
1. View ouster lidar stream from OusterStudio
Download the software from ouster website, extract the file and double click /bin/OusterStudio to run the software. Under the sensor stream button, the Automatic scan may fail to find the sensor. If that's the case, use Manual and the lidar's IP address, usually within the 169.254.xxx.xxx domain.Ouster Download Center | Ouster | OusterDownload Ouster lidar datasheets, user manuals, firmware, visualizer tools, and other documentshttps://ouster.com/downloads/
2. Change lidar IP address
After connecting to lidar via OusterStudio, the IP address can be changed under the Network Options tab in Sensor Configuration.
Ping the lidar to check
ping -4 -c4 192.168.1.10
3. Things to note
Do note that though the following works on the agx, only pinging the ip address works on the hexapedal robot, which uses a switch to connect the nuc computer with the ouster lidar, as well as a bpearl lidar and some motor drivers.
ping -4 -c3 169.254.70.194 # works
ping -4 -c3 os-122127000842.local # doesn't work
avahi-browse -lr _roger._tcp # doesn't work
4. Set up host ethernet
Set ipv4 to manual, set the ip address to 192.168.1.102 (the same domain as the lidar address) and netmask t0 255.255.255.0, dns to auto, routes to auto.
Set ipv6 to link-local only, or disable it. Can try the other options.
5. Install ros driver
Follow this link to install the dependance.
index · ouster-lidar/ouster-ros Wiki · GitHubOfficial ROS drivers for Ouster sensors. Contribute to ouster-lidar/ouster-ros development by creating an account on GitHub.https://github.com/ouster-lidar/ouster-ros/wiki/indexDownload the driver from github GitHub - ouster-lidar/ouster_example: Ouster, Inc. sample codeOuster, Inc. sample code. Contribute to ouster-lidar/ouster_example development by creating an account on GitHub.
https://github.com/ouster-lidar/ouster_example
git clone https://github.com/ouster-lidar/ouster_example.git
or use the drivers from the backup folder.
Make a build directory and softlink to the driver folder.
mkdir -p ouster_ws/src && cd ouster_ws/src
ln -s <path to ouster_example> ./
cd ..
source /opt/ros/<ROS-VERSION>/setup.bash
catkin_make -DCMAKE_BUILD_TYPE=Release
To start the lidar node
source /home/rover/ouster_ws/devel/setup.bash
roslaunch ouster_ros ouster.launch sensor_hostname:=os-122130000067.local metadata:=/home/six/metadata.json udp_dest:=169.254.75.43 lidar_mode:=2048x10 viz:=true # when using the backup driver, need to change the options accordingly
They have changed the launch file name in the github repository. So need to change that when launching.
At this point, lidar streaming should be showing in the rviz window.