ScottBot is an automated food delivery solution for UCR, allowing students and faculty to order food without needing to interrupt their work or walk across campus.
/api: Contains all of our api endpoints and cloudflare configuration files. For more details see the readme in this folder.
/frontend: Contains the source files for our frontend. For more details see the readme in this folder
/pi: Contains testing files to ensure the Raspberry Pi can connect and use the other parts of the robot properly. This includes connecting to the websocket, using data from the LiDAR, and using the motors to avoid obstacles.
/ros2ws: Contains our Ros2 workspace, which we use to map and navigate the environment. Commands for running the pathfinding and other scripts are at the top of relevant files.
/rplidar_docker: Contains the main docker file for running commands and scripts on the robot.
/maps: Contains lidar generated maps of our testing environment
Build Docker image
docker build -t my_rplidar_env ./rplidar_dockerRun Docker container
docker run -it --rm --name rplidar_container --privileged --net=host --device=/dev/ttyUSB1 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v /home/colemiller/ScottBot:/ScottBot my_rplidar_envYou should be inside the container now. (root@raspberrypi:~/ros2_ws#)
This terminal will be for running SLAM. The SLAM launch file (slam_real_launch.py) starts the official RPLidar ROS2 driver (sllidar_node), which publishes LaserScan data to /scan for SLAM.
Link package and build:
ln -s /ScottBot/ros2_ws/src/scottbot ~/ros2_ws/src/scottbot
cd ~/ros2_ws
colcon build --symlink-install
source install/setup.bashLaunch SLAM (THE USB PORT NUMBER MAY BE DIFFERENT):
ros2 launch scottbot slam_real_launch.py serial_port:=/dev/ttyUSB1IN ANOTHER TERMINAL:
This terminal will be for activating the motor controller.
docker exec -it rplidar_container bash
source ~/ros2_ws/install/setup.bash
ros2 run scottbot motor_controller_nodeIN ANOTHER TERMINAL:
This terminal will be for moving the robot.
docker exec -it rplidar_container bash
source ~/ros2_ws/install/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboardThis terminal will be used to save the map.
docker exec -it rplidar_container bash
source ~/ros2_ws/install/setup.bash
ros2 run nav2_map_server map_saver_cli -f /ScottBot/maps/scottbot_map