4.5 Footprint and bumpers
Set the robot’s outline for obstacle clearance with withFrame(...) and
withBumpers(...), or give the whole outline with withFootprint(...).
Frame and bumpers
import com.tempo.config.*;
public static final TempoConfig CONFIG = new TempoConfig()
// ... the rest of the config
.withFrame(0.60, 0.70) // width (Y), length (X), meters
.withBumpers(new BumperConfigs()
.thickness(0.075)
.frontThickness(0.08)
.chamferCorners(0.10)
.roundCorner(Corner.BACK_LEFT, 0.05));from tempo import BumperConfigs, Corner, TempoConfig
CONFIG = (TempoConfig()
# ... the rest of the config
.with_frame(0.60, 0.70) # width (Y), length (X), meters
.with_bumpers(BumperConfigs()
.thickness(0.075)
.front_thickness(0.08)
.chamfer_corners(0.10)
.round_corner(Corner.BACK_LEFT, 0.05)))inline const tempo::TempoConfig kConfig = tempo::TempoConfig{}
// ... the rest of the config
.with_frame(0.60, 0.70) // width (Y), length (X), meters
.with_bumpers(tempo::BumperConfigs{}
.thickness(0.075)
.front_thickness(0.08)
.chamfer_corners(0.10)
.round_corner(tempo::Corner::BackLeft, 0.05));| Java | Python / C++ | Effect |
|---|---|---|
withFrame(width, length) | with_frame(width, length) | Frame without bumpers, finite and positive |
withBumpers(BumperConfigs) | with_bumpers(bumpers) | The bumpers. Needs withFrame, and leaving it out means none |
withFootprint(RobotFootprint) | with_footprint(outline) | The whole outline, bumpers included, in place of frame and bumpers |
Mecanum and tank drives need an outline. Swerve without one uses a circle of radius
max(module offset length) + 0.08 m.
BumperConfigs
| Java | Python / C++ | Effect |
|---|---|---|
thickness(m) | thickness(m) | All four sides |
frontThickness, backThickness, leftThickness, rightThickness | front_thickness, back_thickness, left_thickness, right_thickness | One side: +X, -X, +Y, -Y |
roundCorners(radius) | round_corners(radius) | All four corners, by radius |
chamferCorners(size) | chamfer_corners(size) | All four corners, by how much is cut off each edge |
roundCorner(corner, radius) | round_corner(corner, radius) | One corner, by radius |
chamferCorner(corner, size) | chamfer_corner(corner, size) | One corner, by how much is cut off each edge |
squareCorner(corner) | square_corner(corner) | One corner stays sharp |
Sizes are meters, or a Distance in Java and any length unit in C++. Thickness is
nonnegative and measured out from its frame side. The defaults are zero thickness and square
corners. The corners are Corner.FRONT_LEFT, FRONT_RIGHT, BACK_LEFT and BACK_RIGHT
(Corner::FrontLeft and so on in C++).
A side’s own thickness beats thickness(...) and a corner’s own shape beats
roundCorners(...) and chamferCorners(...), whichever was written first. Between
roundCorners and chamferCorners the later call wins.
RobotFootprint
import com.tempo.config.RobotFootprint;
public static final TempoConfig CONFIG = new TempoConfig()
// ... the rest of the config
.withFootprint(RobotFootprint.hexagon(0.40));from tempo import RobotFootprint, TempoConfig
CONFIG = (TempoConfig()
# ... the rest of the config
.with_footprint(RobotFootprint.hexagon(0.40)))inline const tempo::TempoConfig kConfig = tempo::TempoConfig{}
// ... the rest of the config
.with_footprint(tempo::RobotFootprint::hexagon(0.40));| Factory | Outline |
|---|---|
rectangle(width, length) | A rectangle |
square(side) | A square |
circle(radius) | A circle |
hexagon(inradius) | A hexagon, by its center-to-flat distance |
polygon(vertices) | Any shape, with robot-frame vertices |
withFootprint with withFrame or withBumpers throws when the config is resolved.