===== B3M33MKR: Mobile and and Collective Robotics (winter term 2021/22) ===== ==== Seminars organization ==== * Students are expected to work in teams by two (exceptions allowed after consultation with the teacher). * Each group is expected to work with a real robot. * Majority of the work is planned as an **individual work** of the group (you can work anytime the room is available). * Students are expected to **ask** - ask early, ask often. * Teachers will be personally available during the regularly scheduled hours, otherwise over the e-mail (but don't expect answers in order of minutes) * **Charge the robot** every time you stop working with it. * Keep your source code on a version-control system (e.g. git). This way, you can remove commented-out parts of your source code that you'd like to keep "just in case", the version control system will keep a trace of it. ---- ===Introduction=== * {{:courses:b3m33mkr:turtlebot.pdf|slides}} ---- ===Assignments=== * Each team is asked to implement selected algorithms presented on lectures: * Multi-robot motion coordination * {{:courses:b3m33mkr:mkr2018_mrc-slides.pdf|slides}} * {{ :courses:b3m33mkr:whcastar-en.pdf | Presentation of WHCA*}} * {{ :courses:b3m33mkr:aiide05-020.pdf | D. Silver, Cooperative Pathfinding}} (alternatively {{ :courses:b3m33mkr:coop-path-aiwisdom.pdf | this other version of the article}}) * [[https://gitlab.ciirc.cvut.cz/imr/mkr/ros_skeletons|Skeleton]] * Particle filter for global localization * {{:courses:b3m33mkr:pf-slides.pdf|Slides}} * {{:courses:b3m33mkr:videos.zip|Video with motion model demonstration}} * {{:courses:b3m33mkr:2020-09-16-maze_b315.tar.gz | Dataset and map}} * {{:courses:b3m33mkr:2020-09-16-maze_b315-with_perturbances.tar.gz | More challenging datasets with dynamic obstacles or odometry perturbances}} * [[https://gitlab.ciirc.cvut.cz/imr/mkr/ros_skeletons|Skeleton for the motion model and the entire particle filter]] * Implementation on real robots The tasks will be assessed at the end of the semester but can be assessed sooner if the team wishes so. ---- ===Getting the seminar credit=== To get the seminar credit, student must: * Participate and actively work at all seminars (up to 2 absences without excuse will be tolerated), * Create working algorithms solving *all* the tasks, * Present a well-written and documented source code, * Understand the presented solution and source code (each team member). /* {{:courses:a3m33mkr:mkr2014_icp.tar.gz|Code}} z * {{:courses:ae3m33mkr:output.avi|video example}} * Kalman filter and Extended Kalman filter for localization * {{:courses:a3m33mkr:mkr2014_kf-slides.pdf|Slides}} * {{:courses:a3m33mkr:mkr2014_kf.tar.gz|Code}} * Partical filter for global localization * {{mkr2015_pf.tar.gz|Code}} * A SVN repository will be created for each group. It is expected that students will use it regularly. */ ==== How-To Setup your ROS Environment in Singularity ==== * Log into a PC with the disk-less operating system, either physically on one of the lab's PC or remotely with ''%%ssh {username}@turtle.felk.cvut.cz%%''. On these systems, your personal NFS folder will be mounted as ''$HOME''. Before you can log remotely, you need to set a password through [[https://cw.felk.cvut.cz/password/|this page]]. * ''%%singularity shell /opt/singularity/robolab/noetic%%''. * In the singularity shell that opens, create a directory that will be your ROS workspace and go to it (e.g. ''%%mkdir $HOME/mkr_ws && cd $HOME/mkr_ws%%''), then ''%%export ROS_WORKSPACE="$(pwd)" && mkdir src && source /opt/ros/mkr/setup.bash && catkin init && catkin build%%''. * ''%%cd "$ROS_WORKSPACE/src" && git clone https://gitlab.ciirc.cvut.cz/imr/mkr/ros_skeletons.git && catkin build%%'' ==== How-To Use The Real Robots ==== To use the turtlebots: * Switch on the base and the onboard PC. * Connect your PC to the wifi ''e210bot''. * Connect to the robot with ''%%ssh {usermap_username}@192.168.210.{20+turtlebot_number}%%''. * ''%%export ROS_IP=$(echo -n $(hostname))%%'' * ''singularity shell /opt/singularity/robolab/noetic''. * ''tmux''. * In the each new tmux window ''source $ROS_WORKSPACE/devel/setup.bash''. * In the first tmux window ''roscore''. ''roslaunch'' itself would run ''roscore'' if no ROS master is detected but this master will be killed when the ''roslaunch'' command finishes (usually with ''Ctrl+C'') and nodes such as rqt or rviz would have to be closed as well. It is then better to run ''roscore'' separately. * In the second tmux window ''export HOSTNAME && roslaunch robolab_bringup turtlebot2.launch camera:=false''. * See ''multi_robot_planner/launch/two_turtlebots_in_flatland.launch'' for an example of launch file for the ''multi_robot_planner/planner'' node. You can then send goal from RViz (''%%rosrun rviz rviz -d "$(rospack find simulator_e130)/rviz/two_turtlebots_in_flatland.rviz"%%'') by clicking on "2D Nav Goal" then clicking in the map as many times as the robot count within 30 seconds. ==== How-To Use the Simulated Robots ==== The simulator used is [[https://flatland-simulator.readthedocs.io/en/latest/|Flatland]]. The graphical interface to Flatland is RViz. * ''%%singularity shell /opt/singularity/robolab/noetic%%'' then ''%%source $ROS_WORKSPACE/devel/setup.bash%%''. * ''%%roslaunch simulator_e130 two_turtlebots_in_flatland.launch%%''. For the multi-robot planning task, you can also launch ''%%roslaunch multi_robot_planner two_turtlebots_in_flatland.launch%%'', which also launches the planning node (''multi_robot_planner'') and the nodes that execute the trajectories (''/turtle0/coordinator'' and ''/turtle1/coordinator''). * You can then send goal from RViz by clicking on "2D Nav Goal" then clicking in the map as many times as the robot count within 30 seconds. ==== How-To Work Remotely ==== - ''ssh {usermap_username}@turtle.felk.cvut.cz''. On this system, your personal NFS folder will be mounted as ''$HOME''. Before you can log remotely, you need to set a password through [[https://cw.felk.cvut.cz/password/|this page]]. - alternatively, you can remotely start one of the lab's computer and log to it. - Start the computer with ''ssh student@turtle.felk.cvut.cz'' (ask for password if you forgot it) and follow the instructions - ''ssh {usermap_username}@turtle.felk.cvut.cz'' - ''ssh {usermap_username}@desktop01'' if you started ''desktop01''. - Please then turn off the computer with the shell command ''poweroff'' when you are done. You can also load a remote desktop to use graphical applications. Only physical computers can be used for this. More information on [[https://www.thewoodcraft.org/pub/hornilouka/videa/|this page]]: - ''ssh student@turtle.felk.cvut.cz'' and follow the instructions. - ''tmux'' if you want to be able to open further text shells - ''remote-desktop start xpra'', note the actual used display (e.g. ':1') - On your PC, start Xpra. Choose the method ''SSH->SSH'' (not available on Xpra version 2), username: usermap's username, proxy: ''turtle.felk.cvut.cz'', hostname: ''desktop-01'' or the one where you called ''remote-desktop''. [[start|Back]] to the course page.