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)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.WalkForward — Type
WalkForward()A PetoiBittle.Command (category: Gaits) that makes the robot walk forward.
Serializes to the firmware token "kwkF". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.walk_forward.
PetoiBittle.walk_forward — Function
walk_forward(connection)Make the robot walk forward (category: Gaits).
Convenience wrapper, equivalent to send_command(connection, WalkForward()).
PetoiBittle.WalkLeft — Type
WalkLeft()A PetoiBittle.Command (category: Gaits) that makes the robot walk forward and to the left.
Serializes to the firmware token "kwkL". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.walk_left.
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()).
PetoiBittle.WalkRight — Type
WalkRight()A PetoiBittle.Command (category: Gaits) that makes the robot walk forward and to the right.
Serializes to the firmware token "kwkR". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.walk_right.
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()).
PetoiBittle.TrotForward — Type
TrotForward()A PetoiBittle.Command (category: Gaits) that makes the robot trot forward.
Serializes to the firmware token "ktrF". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.trot_forward.
PetoiBittle.trot_forward — Function
trot_forward(connection)Make the robot trot forward (category: Gaits).
Convenience wrapper, equivalent to send_command(connection, TrotForward()).
PetoiBittle.TrotLeft — Type
TrotLeft()A PetoiBittle.Command (category: Gaits) that makes the robot trot forward and to the left.
Serializes to the firmware token "ktrL". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.trot_left.
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()).
PetoiBittle.TrotRight — Type
TrotRight()A PetoiBittle.Command (category: Gaits) that makes the robot trot forward and to the right.
Serializes to the firmware token "ktrR". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.trot_right.
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()).
PetoiBittle.CrawlForward — Type
CrawlForward()A PetoiBittle.Command (category: Gaits) that makes the robot crawl forward.
Serializes to the firmware token "kcrF". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.crawl_forward.
PetoiBittle.crawl_forward — Function
crawl_forward(connection)Make the robot crawl forward (category: Gaits).
Convenience wrapper, equivalent to send_command(connection, CrawlForward()).
PetoiBittle.CrawlLeft — Type
CrawlLeft()A PetoiBittle.Command (category: Gaits) that makes the robot crawl forward and to the left.
Serializes to the firmware token "kcrL". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.crawl_left.
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()).
PetoiBittle.CrawlRight — Type
CrawlRight()A PetoiBittle.Command (category: Gaits) that makes the robot crawl forward and to the right.
Serializes to the firmware token "kcrR". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.crawl_right.
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()).
PetoiBittle.Backward — Type
Backward()A PetoiBittle.Command (category: Gaits) that makes the robot walk backward.
Serializes to the firmware token "kbk". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.walk_backward.
PetoiBittle.walk_backward — Function
walk_backward(connection)Make the robot walk backward (category: Gaits).
Convenience wrapper, equivalent to send_command(connection, Backward()).
PetoiBittle.BackwardLeft — Type
BackwardLeft()A PetoiBittle.Command (category: Gaits) that makes the robot walk backward and to the left.
Serializes to the firmware token "kbkL". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.walk_backward_left.
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()).
PetoiBittle.BackwardRight — Type
BackwardRight()A PetoiBittle.Command (category: Gaits) that makes the robot walk backward and to the right.
Serializes to the firmware token "kbkR". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.walk_backward_right.
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()).
PetoiBittle.Stepping — Type
Stepping()A PetoiBittle.Command (category: Gaits) that makes the robot march in place without moving forward.
Serializes to the firmware token "kvt". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.step_in_place.
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()).
PetoiBittle.Bound — Type
Bound()A PetoiBittle.Command (category: Gaits) that makes the robot bound forward.
Serializes to the firmware token "kbdF". Send it explicitly with PetoiBittle.send_command, or use the convenience verb PetoiBittle.bound_forward.
PetoiBittle.bound_forward — Function
bound_forward(connection)Make the robot bound forward (category: Gaits).
Convenience wrapper, equivalent to send_command(connection, Bound()).