software installation and first steps with ydlidar and webcam on a dummy robot

  1. Downloaded
  2. Used Etcher on a Mac to install image on an sd card
  3. Followed instructions at to boot to terminal
  4. Was able to follow the manual for the ydlidar x4 device (make would fail if run in desktop environment)
  5. I reconfigured to have the desktop show up again (see step 3)
  6. then I run the launch commands in the manual from step 4 (i initially forgot to unplug the device and plug it back in - but after a reboot i was ok)
  7. initially I failed to get the lidar to work but then i added a pwoer bank as an additional power supply
  8. Then I could see the lidar operating with the rviz application

My next goal was to do a test recording from the lidar sensor combined with a camera image. I thought initially doing a screen recording of both rviz with the lidar and a webcam view would be a good idea. But of 4 screen recording tools for unix none of them really worked well.

So i looked at rosbag which allows to record all of what is capture.

First hurdle was to be able to play it back in rviz. After finding out how to start rviz relative to the ydlidar sensor i got this to work (see command list below).

Next hurdle was to install the usb cam driver. This was easy (see commands below).

Now I was able to generate a rosbag with the image and the lidar with timestamps that i could replay into rviz later. Data rate was 1MB per second which at 9GB free meant if i record 5GV its about 80 minutes of recording - that would be good enough for the first session.

Splitting up the recordign into multiple files might be a good idea to not have one bige but cirrupted file in the end.


downloaded image of raspbian stretch with ros kinect from and installed in on a 16gb sd card to go into a raspberry 3b.

followed the instructions in the ros manual to try out the ydlidar in ros viewer.