This repo contains a custom ROS1 Noetic Workspace for Alex (CG2111A).
Look at this repo for TLS + Arduino Code.
Main functionalities include launching of rplidar-a1 node and hector-slam. Real-time map visualisation can be done using either RVIZ or Foxglove Studio (covered in this readme). Map saving can be done using ROS Map Server.
| Physical | URDF |
|---|---|
![]() |
![]() |
- Clone Repo
git clone https://github.com/ShengBin-101/alex_ws.git
- Init and Update Submodules (rplidar and hector_slam)
git submodule init
git submodule update
- Build Workspace
catkin_make
- Source built binaries
source devel/setup.bash
- Run roscore or Start ROS master
roscore
- Run lidar.launch from alex package to start lidar node
roslaunch alex lidar.launch
- Run slam_laptop.launch file on laptop to run hector_slam node
This allows you to offload SLAM computation from the pi.
roslaunch alex slam_laptop.launch
Follow this guide for first time set up for lidar
sudo apt-get update
Install Dependencies
sudo apt-get install cmake python-catkin-pkg python-empy python-nose python-setuptools libgtest-dev python-rosinstall python-rosinstall-generator python-wstool build-essential git
sudo apt-get install qt4-qmake qt4-dev-tools
Change permissions for lidar's port
sudo chmod 666 /dev/ttyUSB0
Install Map server and create maps directory to hold maps.
sudo apt-get install ros-noetic-map-server
mkdir ~/alex_ws/maps
cd ~/alex_ws/maps
rosrun map_server map_saver -f <map_name>
On one terminal run
roscore
On another terminal
cd ~/alex_ws/maps
rosrun map_server map_server my_map.yaml
Map can be viewed on RVIZ
rviz
Map can also be viewed on foxglove. Look at below section for foxglove.
Foxglove allows you to visualize topics broadcasted by the Pi, provided you are connected to the same network. Make sure foxglove is installed on pi.
sudo apt install ros-noetic-foxglove-bridge
Start foxglove websocket:
roslaunch --screen foxglove_bridge foxglove_bridge.launch port:=8765
Open up foxglove application on your laptop (make sure you are in same network as pi)
Note
Click on "open connection" Under "Foxglove Websocket", enter ws://ip-address-of-pi:8765 for Websocket URL
TLS can be enabled, just need add path to certificates. More info here: https://github.com/foxglove/ros-foxglove-bridge
| Scan of my room | Map of a random Seminar Room in my hostel :) |
|---|---|
![]() |
![]() |
roslaunch alex diff_drive.launch







