- Install Docker (https://docs.docker.com/engine/install/ubuntu/).
- (Optional) Follow steps to manage docker as non-root user and also enable docker service through systemd (https://docs.docker.com/engine/install/linux-postinstall/) - This is optional, however we will assume from this step onwards that docker can be managed by a non-root user.
- Install docker-compose (https://docs.docker.com/compose/install/).
- Ensure docker daemon is running:
$ docker ps
- Create a docker volume. This will allow us to persist the data collected from Lidar device:
$ docker volume create --name=sharedstorage
- Connect Lidar device to an available ethernet port on the computer.
- Power on Lidar device.
- Download Wireshark (https://www.wireshark.org/).
- Run Wireshark and start listening on the ethernet interface that the Lidar device is connected to.
- Identify the IP address that the Lidar device is sending packets to. (If there is a constant stream of UDP packets then the network interface is set up correctly. If there are ARP packets, then the network interface needs to be changed to the IP that the ARP packet is looking for.)
- Modify ethernet interface settings as required. (e.g.
$ sudo ifconfig eth0 192.168.0.2
, if Lidar is sending packets to 192.168.0.2) - Verify that packets are being received from Lidar device using Wireshark.
- Navigate to a directory where the Linux user has permissions in order to set up the sdk (e.g. user home directory
$ cd ~
). - Download/clone this repository:
$ git clone [email protected]:RedwoodTEQ/lidar-sdk-connection.git
- Go to data collection directory:
$ cd lidar-sdk-connection/data_collection
- Start the data collection. This will automatically build the required docker images and start the required docker containers:
$ docker-compose up
- To stop data collection:
$ docker-compose down
- Ensure docker daemon is running and the 'sharedstorage' docker volume is present.
- Connect and power on Lidar device.
- Check that network is configured correctly and Lidar packets are being received by the ethernet interface.
- Go to the directory where the repository was cloned:
$ cd <parent-directory>/lidar-sdk-connection
. - Go to the data collection directory
$ cd data_collection
. - Run
$ docker-compose up -d
to build container and start data collection. - When finished collecting data, run
$ docker-compose down
to stop data collection.
- The data collection process will collect the raw LiDAR data into .bag files which are then archived and compressed as the final step of collection into a .pcd.gz archive.
- Docker daemon is running and the 'sharedstorage' docker volume is present and has been populated with one or more .bag files with /rslidar_points data.
- If there are no .bag files to process, this process will not do anything.
- Ensure docker daemon is running and the 'output' docker volume is present. This volume can be created if it does not already exist by running:
$ docker volume create --name=output
. - Go to the data decode directory
$ cd data_decode
- Run
$ docker-compose up
to build container and start decoding the data. - When the process exits with message:
docker_rosbag_decode_roscore_master exited with code 0
, then the decoding process is complete. - The decoded data will now be accessible in the /output volume for further processing.