## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Launch robot and control it from remote PC ## multi-line description to be displayed in search ## description = Starting real robot and controlling it ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= [[mrp2_navigation/Tutorials/Navigate with real robot/Explore surrounding areas and make a map|Explore surrounding areas and make a map]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### <<IncludeCSTemplate(TutorialCSHeaderTemplate)>> <<TOC(3)>> ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE == Power up == To power up the robot, all you need to do is press the power button located on user panel. Button indicator led should blink for few seconds until the system boots and robot becomes ready to use. When the indicator led becomes solid, you can start using the robot. == Access the robot == Be sure that robot and your PC are connected to the same network. After that you should set '''`ROS_HOSTNAME`''' to your ip adress and '''`ROS_MASTER_IP`''' to robots ip adress. {{{#!wiki caution '''Note that...''' Don't forget to replace '''`<IP_OF_...>`''' sections with real IPs. }}} {{{ $ export ROS_MASTER_IP=http://<IP_OF_MRP2_ONBOARD_COMPUTER>:11311 }}} {{{ $ export ROS_HOSTNAME=<IP_OF_YOUR_PC> }}} You must run these commands on every new terminal you open or you could easly write them into your '''`.bashrc`''' file: {{{ $ echo "export ROS_MASTER_IP=http://<IP_OF_MRP2_ONBOARD_COMPUTER>:11311" >> ~/.bashrc }}} {{{ $ echo "export ROS_HOSTNAME=<IP_OF_YOUR_PC>" >> ~/.bashrc }}} After writing these lines to your '''`.bashrc`''' file, run: {{{ $ source ~/.bashrc }}} command once. Now, if you'll launch a ros process from that terminal, it communicates with Robot's '''`ros_master`''' process. You can control your robot via running '''`rqt_robot_steering`''' application on that terminal. Or you can simply run '''`gmapping`''' or '''`amcl`''' launch files. It will read the datas from robot's topics. If you don't know how to run '''`gmapping`''' or '''`amcl`''' process on robot side, we'll cover them in next [[mrp2_navigation/Tutorials/Navigate with real robot/Explore surrounding areas and make a map|tutorial]]. You can start moving robot via joystick or what you prefer to control as a described in previous tutorials after it boots up. For example If you want to control it via '''`rqt_robot_steering`''', open up new terminal tab on your remote PC's terminal, and run '''`rqt_robot_steering`''': {{{ $ rosrun rqt_robot_steering rqt_robot_steering }}} Note that, when you added these lines to your '''`.bashrc`''' file, you don't need to source every time. That file is already sourcing when the terminal client starts up. Note that, If these lines are added the your '''`.bashrc`''' file, You won't be able to launch local ROS applications like Gazebo Simulation on your PC. Before launching local applications, you should unset '''`ROS_MASTER_IP`''' and '''`ROS_HOSTNAME`'''. Also you can delete the exports from '''`.bashrc`''': {{{ $ unset ROS_MASTER_IP $ unset ROS_HOSTNAME }}}