One of my personal projects this year is to understand and build a SLAM (Simultaneous localization and mapping) robot. To get started I bought the Xaxxon OpenLidar and after a few struggles getting it to work correctly in a VM I finally did and decided to throw together my build notes for future reference.
While I would have liked to use (and tested) Virtualbox there is a known issue with RVIZ that isn’t present in VMWare Fusion, so while I hate not keeping this open-source I could not get it to work.
You want to start with a new Ubuntu18.04 Install (ROS isn’t Ubuntu 19.0 compatible yet with the VM tools installed.
Run these commands to update and install the need utilities:
sudo apt update -y sudo apt upgrade -y sudo apt install git curl screen
ROS is the Robot Operating System (ROS) is a set of software libraries and tools that helps you build robot applications. You need it installed to run the OpenLidar hardware.
Here are the commands to install it:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 sudo apt-get update sudo apt install ros-melodic-desktop-full -y sudo rosdep init rosdep update echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential mesa-utils
The last step is to install the software for the OpenLidar system and configure all of the variables and reboot.
Here are those commands:
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone https://github.com/xaxxontech/xaxxon_openlidar.git . cd ~/catkin_ws/src catkin_init_workspace cd ~/catkin_ws/ catkin_make echo "source $HOME/catkin_ws/devel/setup.bash" >> ~/.bashrc source ~/.bashrc sudo adduser $USER dialout sudo reboot now
Once your VM reboots and you connect the
Uart Bridge to the VM and you are now ready to fire up the software. That can be done with these commands:
roslaunch xaxxon_openlidar xaxxon_openlidar.launch & roscd xaxxon_openlidar ./rvizlidar &
You should then see the RVIZ window load and data start populating the screen like this:
If you run into any problem you can always serial into the Lidar and check it with some of the commands on this page.
screen /dev/ttyusb0 115200