Install the fiducials package and perception packages
http://wiki.ros.org/fiducials https://github.com/UbiquityRobotics/fiducials
sudo apt install \
ros-melodic-fiducials \
ros-melodic-perception \
ros-melodic-usb_cam
Calibrate camera by launching usb_cam with demo launch
roslaunch demo.launch
# and
rosrun camera_calibration cameracalibrator.py \
--size 8x6 \
--square 0.108 \
image:=/camera/image_raw \
camera:=/camera
Or just copy this calibration to your local folder, if using the little red web cam:
mkdir ~/.ros/camera_info/
cp head_camera.yaml ~/.ros/camera_info/
Use the demo.launch to start the demo. To clean/reset the map:
rosservice call /fiducial_slam/clear_map
# or
rm -rf ~/.ros/slam