Inertial#

Introduction#

The GO Brain includes a built-in inertial sensor, which allows the robot to track its orientation, heading, and acceleration.

Below is a list of all methods:

Orientation

  • get_heading – Returns the current heading.

  • get_yaw – Returns the current yaw.

  • get_roll – Returns the current roll.

  • get_pitch – Returns the current pitch.

  • calibrate – Calibrates the Inertial Sensor for stable heading tracking.

  • reset_heading – Sets the heading of the Inertial Sensor to 0.

  • set_heading – Sets the Inertial Sensor’s heading to a specified value.

Motion

  • get_acceleration – Returns the linear acceleration along the x, y, or z axis.

Orientation#

get_heading#

get_heading returns the current heading of the Inertial Sensor in degrees.

Note: If a Drivetrain is configured, this command becomes drivetrain.get_heading().

Usage:
inertial.get_heading()

Parameters

Description

This method has no parameters.

# Example coming soon

get_yaw#

get_yaw returns the current yaw of the Inertial Sensor in degrees.

Note: If a Drivetrain is configured, this command becomes drivetrain.get_yaw().

Usage:
inertial.get_yaw()

Parameters

Description

This method has no parameters.

# Example coming soon

get_roll#

get_roll returns the current roll of the Inertial Sensor in degrees.

Note: If a Drivetrain is configured, this command becomes drivetrain.get_roll().

Usage:
inertial.get_roll()

Parameters

Description

This method has no parameters.

# Example coming soon

get_pitch#

get_pitch returns the current pitch of the Inertial Sensor in degrees.

Note: If a Drivetrain is configured, this command becomes drivetrain.get_pitch().

Usage:
inertial.get_pitch()

Parameters

Description

This method has no parameters.

# Example coming soon

calibrate#

calibrate calibrates the Inertial Sensor. All subsequent lines will wait for the calibration to complete before executing. Calibration is an internal procedure that measures and compensates for sensor noise and drift over a specified period. During this time, the Brain must remain completely still (i.e., on a stable surface without any external movement). Movement during calibration will produce inaccurate results.

Note: If a Drivetrain is configured, this method becomes unavailable.

Usage:
inertial.calibrate()

Parameters

Description

This method has no parameters.

# Example coming soon

reset_heading#

reset_heading resets the heading of the Inertial Sensor to 0 degrees.

Note: If a Drivetrain is configured, this method becomes unavailable.

Usage:
inertial.reset_heading()

Parameters

Description

This method has no parameters.

# Example coming soon

set_heading#

set_heading sets the heading of the Inertial Sensor to a specified value.

Note: If a Drivetrain is configured, this command becomes drivetrain.set_heading()..

Usage:
inertial.set_heading(heading)

Parameters

Description

heading

The heading value to set in degrees.

# Example coming soon

Motion#

get_acceleration#

get_acceleration returns the acceleration of the Inertial Sensor.

Usage:
inertial.get_acceleration(axis)

Parameters

Description

axis

The axis to return the acceleration from:

  • X
  • Y
  • Z
# Example coming soon