Building a simple coffee delivery robot.
Launch the mapping service, but don't forget to save the map when done. (This creates a map.yaml and map.pgm in current directory)
rosrun map_server map_saver map:=/map
Don't forget to measure the fiducials. We accidentally printed them 13.6cm accross, so all the settings need to be modified.
pifi is great. Add a network to the rpi
pifi add <ssid> <passwd>
SSH on RPi4 takes a long time to boot up. Issue was reported: https://forum.ubiquityrobotics.com/t/rpi4-image-and-slow-starting-ssh/486
The fix is to modify:
/etc/network/interfaces
And change:
auto eth0
to
allow-hotplug eth0
To start in a new environment, we need to align laser map and the fiducials.
- Launch
build_aligned_map.launch
on magni
roslaunch coffee_robot build_aligned_map.launch
DO NOT MOVE THE ROBOT YET!!!!
- Clean any prexisting map using a service call to fiducial slam. (This resets the origin of fiducial slam to the robot current pose, which is what gmapping is using too)
rosservice call /fiducial_slam/clear_map "{}"
- On a remote computer
roslaunch coffee_robot view_mapping.launch
Now tele-operate the robot around slowly. Observe the map being generated.
- When finished, save the map. (in this case with name housev3.yaml)
rosrun map_server map_saver map:=/map -f housev3
Note that the fiducial_map will be saved in .ros/slam/map.txt
If you have done anything previously, then the location of the tf may not initialise where the robot is. In this case the fiducials will be incorrectly located. Try restarting the roscore by typing
systemctl restart magni-base.service
Modify the system-d file on the Magni so that it boots the ros system on launch.
systemd files go in /etc/systemd/system/
folder.
You can use the following to give the nav system a different map
roslaunch coffee_robot navigation.launch map_file:=/home/ubuntu/housev2.map
If you use VS code you can use the remote container extension to get a dev environment and also to run rviz.
- Get the "remote-containers" vscode extension.
- Install docker
- if on windows install VcXsrv, run X Server, check the "disable access controls" and use argument
-nowgl
- run the command
export DISPLAY=<yourHostip>:0
where is a placeholder for your host ip - Done forget to
source /opt/ros/kinetic/setup.bash
so that you can access the ros tools. - Run
rviz
Don't forget to setup ROS_MASTER_URI, ROS_IP it also might be handy to add ubiquityrobot.local to /etc/hosts