MRC/Tutorials/Real robot: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
==== starting Hero ====
==== starting Hero ====
To start the robot long press the power button, after about three seconds you will hear the
To start the robot long press the power button, after about three seconds you will hear the
fans starting up. Once you can see the battery level on the screen of the robot (NOT a
fans starting up. Once you can see the battery level on the screen of the robot (NOT a touchscreen!) the robot is properly started. You can now start the hardware by releasing the
touchscreen!) the robot is properly started. You can now start the hardware by releasing the
emergency stop button. The robot will assume its default pose.
emergency stop button. The robot will assume its default pose.
To stop the robot simply press the emergency stop button. This will stop the hardware (but
To stop the robot simply press the emergency stop button. This will stop the hardware (but
Line 22: Line 21:
hardware will not start running yet. To start the hardware open a terminal, type sshbobo or
hardware will not start running yet. To start the hardware open a terminal, type sshbobo or
sshcoco depending on your robot (More on the ssh<robot> commands later in this
sshcoco depending on your robot (More on the ssh<robot> commands later in this
document). Then type bobo-start or coco-start . You should notice the lrf start spinning.
document). Then type <code>bobo-start</code> or <code>coco-start</code>. You should notice the lrf start spinning.
The hardware is now starting up.
The hardware is now starting up.
The rosbots do not have an emergency stop. But they are light enough to not be a danger.
The rosbots do not have an emergency stop. But they are light enough to not be a danger.
You can pick them up if you need to stop them quickly. To stop the hardware you can press
You can pick them up if you need to stop them quickly. To stop the hardware you can press
ctrl+C in the terminal running bobo/coco-start.
<code>ctrl+C<\code> in the terminal running bobo/coco-start.
 
==== Charging Bobo and Coco====


==== Charging Bobo and Coco ====
To charge the rosbots connect the chargers. Press the green button to set the charging
To charge the rosbots connect the chargers. Press the green button to set the charging
amperage and voltage. Set these to 1.5A and 11.1V. Then long press the green button, the
amperage and voltage. Set these to 1.5A and 11.1V. Then long press the green button, the
Line 35: Line 35:
To stop charging press the red button before removing the charger from the robot.
To stop charging press the red button before removing the charger from the robot.


=== robot core ===
===robot core===
 
Normally all your tools, like Rviz, teleop, etc will try to communicate with the simulator
Normally all your tools, like Rviz, teleop, etc will try to communicate with the simulator
running on your laptop. We should specify that we want to listen to the signals passed on the
running on your laptop. We should specify that we want to listen to the signals passed on the
robot. To do this you can input
robot. To do this you can input
<code><robot>-core</code>
in a terminal. From that point on any command you do afterward will try to communicate with
in a terminal. From that point on any command you do afterward will try to communicate with
that robot.
that robot.


==== rviz ====
====rviz====
To visualize the LRF measurements open a terminal on your laptop and input hero-rviz ,
 
bobo-rviz or coco-rviz depending on your robot.
To visualize the LRF measurements open a terminal on your laptop and input <code>hero-rviz</code>,
<code>bobo-rviz</code>, or <code>coco-rviz</code>, depending on your robot.
 
==== Teleop====


==== Teleop ====
Instead of pushing the robot by hand you can control the robot remotely using your
Instead of pushing the robot by hand you can control the robot remotely using your
keyboard. On the robot-laptop open a terminal and input.
keyboard. On the robot-laptop open a terminal and input.


mrc-teleop
<code>mrc-teleop</code>


and you will be able to move the robot forward and backward with 'w' and 's', you can rotate
and you will be able to move the robot forward and backward with 'w' and 's', you can rotate
the robot using 'a' and 'd' and you can stop movement with any other key.
the robot using 'a' and 'd' and you can stop movement with any other key.


=== ssh ===
===ssh===
 
Controlling the robot remotely is all well and good. But we want to make changes to the
Controlling the robot remotely is all well and good. But we want to make changes to the
software on the robot itself.
software on the robot itself.
To connect to the robot open a terminal on the robot-laptop and input
To connect to the robot open a terminal on the robot-laptop and input
sshhero / sshbobo / sshcoco . You will notice the green text changing to mrc@hero1 (or
<code>sshhero</code> / <code>sshbobo</code> / <code>sshcoco</code>. You will notice the green text changing to mrc@hero1 (or
something else on the rosbots). This indicates that you are now operating a terminal on the
something else on the rosbots). This indicates that you are now operating a terminal on the
computer inside the robot. You will find a folder called group_repos here where you can use
computer inside the robot. You will find a folder called group_repos here where you can use
git pull to get your code. Remember to build your code as only source files will be on git. In
<code>git pull</code> to get your code. Remember to build your code as only source files will be on git. In
order to ssh into the rosbots you might have to provide the password of the rosbot. The
order to ssh into the rosbots you might have to provide the password of the rosbot. The
password is provided by the student assistents.
password is provided by the student assistents.
<robot>-core


===== Warning =====
===== Warning=====
Note that since you are working on the computer in the robot, commands like <ROBOT>-
Note that since you are working on the computer in the robot, commands like <ROBOT>-
rviz and gedit will try and fail to open a window. The only operations you can
rviz and gedit will try and fail to open a window. The only operations you can
perform here are ones you can do from the terminal, including the git commands!
perform here are ones you can do from the terminal, including the git commands!

Revision as of 16:56, 1 April 2025

Now you know how to write robot software, lets discuss how to work with the hardware. We are using two types of robots, Jackal and the rosbots Bobo and Coco. Their operation will be slightly different.

Hero

starting Hero

To start the robot long press the power button, after about three seconds you will hear the fans starting up. Once you can see the battery level on the screen of the robot (NOT a touchscreen!) the robot is properly started. You can now start the hardware by releasing the emergency stop button. The robot will assume its default pose. To stop the robot simply press the emergency stop button. This will stop the hardware (but not your software!). When the emergency button is pressed you can push the robot around. Pushing the robot requires some force but please do be careful. Releasing the emergency stop will cause the hardware to start up again. Do not attempt to move the robot by hand when the emergency button is released.

Bobo and Coco

starting Bobo and Coco

When you turn on the power switch on the rosbots the computer will start up but the hardware will not start running yet. To start the hardware open a terminal, type sshbobo or sshcoco depending on your robot (More on the ssh<robot> commands later in this document). Then type bobo-start or coco-start. You should notice the lrf start spinning. The hardware is now starting up. The rosbots do not have an emergency stop. But they are light enough to not be a danger. You can pick them up if you need to stop them quickly. To stop the hardware you can press ctrl+C<\code> in the terminal running bobo/coco-start.

Charging Bobo and Coco

To charge the rosbots connect the chargers. Press the green button to set the charging amperage and voltage. Set these to 1.5A and 11.1V. Then long press the green button, the charger will perform a battery check and ask for confirmation one more time. Confirm by pressing the green button. To stop charging press the red button before removing the charger from the robot.

robot core

Normally all your tools, like Rviz, teleop, etc will try to communicate with the simulator running on your laptop. We should specify that we want to listen to the signals passed on the robot. To do this you can input

<robot>-core

in a terminal. From that point on any command you do afterward will try to communicate with that robot.

rviz

To visualize the LRF measurements open a terminal on your laptop and input hero-rviz, bobo-rviz, or coco-rviz, depending on your robot.

Teleop

Instead of pushing the robot by hand you can control the robot remotely using your keyboard. On the robot-laptop open a terminal and input.

mrc-teleop

and you will be able to move the robot forward and backward with 'w' and 's', you can rotate the robot using 'a' and 'd' and you can stop movement with any other key.

ssh

Controlling the robot remotely is all well and good. But we want to make changes to the software on the robot itself. To connect to the robot open a terminal on the robot-laptop and input sshhero / sshbobo / sshcoco. You will notice the green text changing to mrc@hero1 (or something else on the rosbots). This indicates that you are now operating a terminal on the computer inside the robot. You will find a folder called group_repos here where you can use git pull to get your code. Remember to build your code as only source files will be on git. In order to ssh into the rosbots you might have to provide the password of the rosbot. The password is provided by the student assistents.

Warning

Note that since you are working on the computer in the robot, commands like <ROBOT>- rviz and gedit will try and fail to open a window. The only operations you can perform here are ones you can do from the terminal, including the git commands!