#include <state_sensor.h>
◆ State_Sensor() [1/3]
◆ State_Sensor() [2/3]
◆ ~State_Sensor()
| State_Sensor::~State_Sensor |
( |
| ) |
|
|
inline |
◆ State_Sensor() [3/3]
| State_Sensor::State_Sensor |
( |
| ) |
|
|
inlineprivate |
◆ add_PSensor()
| void State_Sensor::add_PSensor |
( |
Sensor< float > * |
sen | ) |
|
|
inline |
◆ change_Sensors()
| void State_Sensor::change_Sensors |
( |
Field |
field_id | ) |
|
◆ compensate_Bounds()
| Vec3< float > State_Sensor::compensate_Bounds |
( |
Vec3< float > |
pos, |
|
|
Vec3< float > |
ori, |
|
|
const State_Vars * |
curr_sv |
|
) |
| |
|
private |
Compensates the position values based on the readings from limit switches
◆ get_Bounds()
| uint8_t State_Sensor::get_Bounds |
( |
| ) |
|
◆ get_Instance()
◆ init()
| int State_Sensor::init |
( |
uint32_t |
dt_millis | ) |
|
Function that initializes all the required components for the robot's State Sensor(x, y and yaw)
- Return values
-
| 0 | if inititialized properly |
Tasks performed by this function
1) Call the devices initializations in correct order
2) Call the software initializations for utilities like smoothies and filters
Not yet implemented
Error Condition
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ read_Orientation()
| Vec3< float > State_Sensor::read_Orientation |
( |
Vec3< float > |
base_state, |
|
|
uint32_t |
dt_millis |
|
) |
| |
|
private |
Function that provides the orientation of the robot.
- Parameters
-
| base_state | This parameter is considered as one of the possible state of robot. |
| dt_millis | : The time period at which this function is called periodically |
- Return values
-
| orientation | of the robot in degrees |
Tasks performed by this function
1) Read the values from Accelerometer and the Gyroscope
◆ read_State()
| Vec3< float > State_Sensor::read_State |
( |
Vec3< float > |
base_state, |
|
|
const State_Vars * |
curr_sv, |
|
|
uint32_t |
dt_millis |
|
) |
| |
Function that provides the state of the robot.
- Parameters
-
| base_state | This parameter is considered as one of the possible state of robot. This will be passed to both Orientation_Sensor and the Position_Sensor for further use. |
| dt_millis | : The time period at which this function is called periodically |
- Return values
-
- Note
- The state of our robot is defined by x,y distance from fences and the Robot's heading
Tasks performed by this function
1) Read Orientation of the robot with Orientation_Sensor
2) Read Position of the robot with Position_Sensor
◆ remove_PSensor()
| void State_Sensor::remove_PSensor |
( |
Sensor< float > * |
sen | ) |
|
|
inline |
◆ update_IMUOffsets()
| void State_Sensor::update_IMUOffsets |
( |
Vec3< float > |
offsets | ) |
|
◆ update_Position()
| void State_Sensor::update_Position |
( |
Vec3< float > |
pos | ) |
|
|
inline |
◆ bound_box_
◆ bounds_
| uint8_t State_Sensor::bounds_ |
|
private |
◆ first_ori_
| Vec3<float> State_Sensor::first_ori_ |
|
private |
◆ is_first_ori_
| bool State_Sensor::is_first_ori_ |
|
private |
◆ p_sensor_
The documentation for this class was generated from the following files:
- C:/Users/073be/OneDrive/Documents/Robotics/Codes/beta/Khangai-Robot/Khangai-Robot-Full/KhangaiRobot-Play/Core/Inc/parts/state_sensor.h
- C:/Users/073be/OneDrive/Documents/Robotics/Codes/beta/Khangai-Robot/Khangai-Robot-Full/KhangaiRobot-Play/Core/Src/parts/state_sensor.cpp