This lab will put together everything you have learned so far into one assignment to be completed on a robot. In summary, you will:
We have limited time this semester to work on the robots, so it is important to get started as soon as possible. Before showing up to class to use the robot, please complete the following:
Once you set up your robot (instructions below), you can then focus on the following steps to complete this assignment IN CLASS:
We have limited time for this modified lab, so please do these steps, in this order, as quickly as possible:
$ ssh -X student@abot-04.local
$ sudo usermod -a -G dialout $USER
Now, make sure you have the most recent class code:
$ cd ~/class_ws/src/alexbot-code $ git pull $ cd ~/class_ws $ source install/setup.bash $ colcon build --symlink-install
cd ~/mbot_firmware_ros/build sudo mbot-upload-firmware flash mbot_calibrate_classic.uf2
Now wait for the robot to stop moving! Then run:
sudo mbot-upload-firmware flash mbot_classic_ros.uf2
cd ~/ros_ws/src
Clone your repo here.
$ cd ~/ros_ws $ source ~/class_ws/install/setup.bash $ colcon build --symlink-install $ source ~/ros_ws/install/setup.bash
$ cd ~/ros_ws $ source ~/mbot_ws/install/setup.bash $ colcon build --symlink-install $ source ~/ros_ws/install/setup.bash
$ ros2 run <package_name> <node_name> --ros-args -r __ns:=/<robot_name>
FOR MBOTS:
MBOTs run in a special environment that prevents this problem, but, as a consequence, limits the ability to run on multiple systems. In more complex settings, you will want to use namespaces. For this lab, run using the topics you can see.
$ ros2 run camera_ros camera_node --ros-args -r __ns:=/<robot_name>
$ ros2 run simple_abot_interface simple_abot_interface -r __ns:=/<robot_name>