The answersDownload the PDF
Worksheet

U2.1 Two frames

Kinematics and frames · University · about 20 min

BugBotLab
NameClassDate

What this lesson is about

The robot's forward is not the world's forward. Naming the frame is half the work.

Questions 6 marks in all

  1. [1 mark]Which of these speak in the robot's body frame?

    Tick every answer that is true.

    1. Aflow()
    2. BThe commands to drive(fwd, lat, rot)
    3. CThe acceleration from imu()
    4. Dposition()
    5. EThe location of a zone on the mat
  2. [1 mark]A robot is at heading 90. Which way is it facing?

    1. AAlong the world's +x
    2. BAlong the world's +y
    3. CAlong the world's -x
    4. DAlong the world's -y
  3. [1 mark]Heading 0 means the robot faces along which world axis? Give the axis and its sign.

  4. [1 mark]A robot turns left, anticlockwise seen from above. What sign is the change in its heading?

    1. ANegative, because heading is clockwise positive
    2. BPositive, because angles increase anticlockwise
    3. CPositive, because heading always increases while turning
    4. DIt depends on which way the robot was facing to begin with
  5. [1 mark]A robot at heading 90 drives straight forward at 14 cm/s for 2 s. How far does its world x change, in cm?

  6. [1 mark]A program sets command_lat = dx_world, where dx_world = target_x - x_world. What is wrong with it?

    1. AIt sends a world frame displacement as a body frame command without rotating it by the heading
    2. BNothing, as long as the robot is at heading 90
    3. Clat is the robot's forward axis, so it should be the fwd command
    4. Ddx_world needs dividing by 100 to become a percentage, and that is all

The task: name the frame

The robot starts facing along the world's x axis. Drive it forward at least 25 cm, then print two numbers: body: the average sideways speed in the robot's own frame while it drove, and world x: how far it actually moved along the world's x axis.

from bugbot import *
connect()

forward(60)

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/u2-1-two-frames/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Turn the robot to heading 45 and drive forward. Which world axes change, and in what ratio?
  2. Drive sideways and print both frames. Which numbers change places?
  3. Write down the sign of the heading for a robot turning left. Test it.