cs 309: autonomous robots fri ijustinhart.net/files/slides/2020_spring_cs309/lec... · do this...

42
CS 309: Autonomous Robots FRI I Starting the Robot Instructor: Justin Hart http://justinhart.net/teaching/2020_spring_cs309/

Upload: others

Post on 12-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

CS 309: Autonomous Robots FRI I

Starting the Robot

Instructor: Justin Hart

http://justinhart.net/teaching/2020_spring_cs309/

Page 2: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

These commands will all start to make sense in the next couple of weeks.

For now, we’re just going throughthe basic how-to

Page 3: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● For now log in as “fri”● Get the password from the peer-mentors

● Open several terminals

● cd catkin_ws; source devel/setup.bash in each.

System Startup

Page 4: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

System Startup – run “roscore”

Page 5: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

System Startup – roslaunch the robot

● Note that this is for the simulated robot● You’ll need v2 or v4.launch for the real robot

Page 6: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● A screen will pop up asking what floor you are on.

● The AI floor is the 3rd floor, and you are almost certainly there at this step of the process.

Pick your floor

Page 7: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

Gazebo

● When running the simulated robot, Gazebo will launch● It will not run when the real robot runs

Page 8: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

rviz – Runs for real or simulated robots

Page 9: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

Next, you want to move the robot

● The next step is to move the robot into the hallway, where you want to start.

● I generally do this before localizing the robot, just to get it out of people’s way.

Page 10: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

System Startup

Page 11: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

System Startup

● Slow down the robot by hitting z, before attempting to drive● The default speed is way too fast

Page 12: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

Next, you want to move the robot

● The robot will move quicker than you expect.

● Press the ‘k’ button to stop its motion.

Page 13: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting
Page 14: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● Localize the robot.

● Hit “2D Pose Estimate”

● Click on where the front of the robot is on the map in rviz (the screen is on the BACK), and drag the cursor FORWARD.

– Note that the robot graphic may not be there, because the real robot does not know where it is yet!!

● A green arrow will appear showing what you believe the robot’s pose to be.

System Startup

Page 15: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting
Page 16: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● The system uses a probabilistic method to find the robot’s pose, so your localization just aids in this process.

● Instruct the robot to move a bit by using “2D Nav Goal”

● The robot’s localization will improve as it moves.

● 2D Nav Goal works the same as “2D Pose Estimate”

System Startup

Page 17: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

bwi_tasks visit_door_list

Page 18: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● The robot will now start driving around visiting the doors in the hallway.

System Startup

Page 19: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

Pick a BWIBot

• V2 • V4

Page 20: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● Find the back of the robot– Yes, the screen faces the BACK

Page 21: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● The switch should be in the “charge” position when you find the robot.

Page 22: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● Set the switch to the neutral position

Page 23: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● Unplug the charging cable

● Set the switch to the “battery” position

Page 24: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● Go to the front of the robot

Page 25: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● Press the green button.– It should light up.

Page 26: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup● Press the yellow button.

– Yellow button and blue indicator light should light.

Page 27: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V2 Startup

● Hit the power button on the laptop

Page 28: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● The V4 is different– This is actually the front of the robot.

Page 29: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● Disconnect the power supply.– First, undo the screws on the connector

Page 30: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● Disconnect the power supply.– Then disconnect the plug.

Page 31: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● Locate the Emergency Stop and Power Button– On the top at the front of the unit on the V4

Page 32: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● The Emergency Stop may be depressed– If it is, gently twist it to the right and it will

lift.

Page 33: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● Press the power button.

Page 34: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● It will illuminate.– This indicates that the robot is now on.

Page 35: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● Reach back to the right inside the chasis.– You can feel the power button to turn it on.

Page 36: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

V4 Startup

● Note that the V4 has a wireless keyboard– If the batteries are dead, obtain assistance

Page 37: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

System Startup

● Select Ubuntu on this screen using the arrow keys and hit “Enter” or wait for boot

Page 38: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

System Startup● Log in as FRI

– Using the FRI password. A mentor can help you.

Page 39: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● From here, both the robots and simulator all work the same● Except for this detail

● roslaunch bwi_launch simulation_v2.launch

● roslaunch bwi_launch segbot_v2.launch

● roslaunch bwi_launch segbot _v4.launch

System Startup

Page 40: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● Do this after the BWIBot demo next week!!

● Let the robot visit 3 doors.

● Stop the robot by hitting ctrl-c in the “visit door list” terminal.

– This involves physically chasing down the robot.

– I wish it didn’t.

● Stop the other processes, segbot_v2.launch and roscore with ctrl-c.

● Shutdown the computer.

● Power down the robot by doing the power-up process in reverse.

– Be sure to plug it back in!

Your first homework

Page 41: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

● For your homework, you will do this on a real robot.

● These screenshots come from doing this in simulation.

● Installing the simulators is easy if you want to try.– Installation instructions for BWI here:

● https://github.com/utexas-bwi/bwi

– Tutorials on running the robot & simulators here:

● https://github.com/utexas-bwi/documentation/wiki/Software

Your first homework

Page 42: CS 309: Autonomous Robots FRI Ijustinhart.net/files/slides/2020_spring_cs309/Lec... · Do this after the BWIBot demo next week!! Let the robot visit 3 doors. Stop the robot by hitting

Developmental Robotics

• Emulate human cognitive processes• Better understanding of the cognitive process

• Robot capabilities based on human capabilities

• Eventual goal• Build robots which learn like people do

• Develop human-like AI