(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Launch robot and control it from remote PC

Description: Starting real robot and controlling it

Tutorial Level: BEGINNER

Next Tutorial: Explore surrounding areas and make a map

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.

Note that...

Don't forget to replace <IP_OF_...> sections with real IPs.



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 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:


Wiki: mrp2_bringup/Tutorials/Launch robot and access to control of it from your machine (last edited 2017-03-08 09:37:26 by orhanoz)