Gaits

Gaits are continuous locomotion patterns: the robot keeps moving in the requested manner until you send a different command (for example a posture such as PetoiBittle.balance to stop and stand). Each gait comes in forward / left / right variants where the firmware supports them.

Use case: walk around, then stop

using PetoiBittle

connection = PetoiBittle.connect(PetoiBittle.find_bittle_port())

PetoiBittle.walk_forward(connection)   # start walking forward
sleep(3)                               # let it walk for a few seconds
PetoiBittle.walk_left(connection)      # curve to the left
sleep(3)
PetoiBittle.balance(connection)        # stop and stand still

PetoiBittle.disconnect(connection)
Tip

Trotting is faster than walking; crawling keeps the body lower and more stable. Pick the gait that matches your surface and speed needs.

Reference

PetoiBittle.walk_forward — Function
walk_forward(connection)

Make the robot walk forward (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, WalkForward()).

source
PetoiBittle.walk_left — Function
walk_left(connection)

Make the robot walk forward and to the left (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, WalkLeft()).

source
PetoiBittle.walk_right — Function
walk_right(connection)

Make the robot walk forward and to the right (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, WalkRight()).

source
PetoiBittle.trot_forward — Function
trot_forward(connection)

Make the robot trot forward (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, TrotForward()).

source
PetoiBittle.trot_left — Function
trot_left(connection)

Make the robot trot forward and to the left (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, TrotLeft()).

source
PetoiBittle.trot_right — Function
trot_right(connection)

Make the robot trot forward and to the right (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, TrotRight()).

source
PetoiBittle.crawl_forward — Function
crawl_forward(connection)

Make the robot crawl forward (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, CrawlForward()).

source
PetoiBittle.crawl_left — Function
crawl_left(connection)

Make the robot crawl forward and to the left (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, CrawlLeft()).

source
PetoiBittle.crawl_right — Function
crawl_right(connection)

Make the robot crawl forward and to the right (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, CrawlRight()).

source
PetoiBittle.walk_backward — Function
walk_backward(connection)

Make the robot walk backward (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, Backward()).

source
PetoiBittle.walk_backward_left — Function
walk_backward_left(connection)

Make the robot walk backward and to the left (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, BackwardLeft()).

source
PetoiBittle.walk_backward_right — Function
walk_backward_right(connection)

Make the robot walk backward and to the right (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, BackwardRight()).

source
PetoiBittle.step_in_place — Function
step_in_place(connection)

Make the robot march in place without moving forward (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, Stepping()).

source
PetoiBittle.bound_forward — Function
bound_forward(connection)

Make the robot bound forward (category: Gaits).

Convenience wrapper, equivalent to send_command(connection, Bound()).

source