Class ImuBufRos2
Defined in File imu_buf_ros2.hpp
Class Documentation
-
class ImuBufRos2
Class for ADRD2121.
Public Functions
ImuBufRos2 Constructor.
- Parameters:
node – [in] Pointer to ROS2 node(adrd2121_imu_node)
p_device – [in] Pointer to adi_imu_device_t
-
~ImuBufRos2()
ImuBufRos2 Destructor.
-
void loadParams(void)
Loads Parameters for ADRD2121.
-
bool init(void)
Initializes the ADRD2121.
- Returns:
Boolean if successful (true) or not (false)
-
bool config(msg_type_e msg_type)
Configures the ADRD2121 based on parameters.
- Parameters:
msg_type – [in] Determine the msg_type the topic will be published on
- Returns:
Boolean if successful (true) or not (false)
-
bool dataReadAndPub(std::string frame_name, msg_type_e msg_type)
An all-in-one function for reading the burst_data from the IMU, handle the data, and publish it to a topic.
- Parameters:
frame_name – [in] ROS Frame of data to be published
msg_type – [in] Determine the msg_type the topic will be published on
- Returns:
Boolean if successful (true) or not (false)
-
bool validateData(void)
Validate data.
- Returns:
Boolean if successful (true) or not (false)
-
bool startBufferRead(void)
Starts capture of ADRD2121 Data Performs an initial read and discards it.
- Returns:
Boolean if successful (true) or not (false)
-
bool stopBufferRead(void)
Stops capture of ADRD2121 Data.
- Returns:
Boolean if successful (true) or not (false)
-
int getBufferStatus(uint16_t *status)
Checks status of ADRD2121.
- Parameters:
status – [in] Pointer to holder of status
- Returns:
Return if function call is successful
-
bool factoryReset(void)
Reverts the ADRD2121 to its factory settings.
- Returns:
Return if function call is successful
-
bool clearFault(void)
Clears FAULT status in Buffer Board.
- Returns:
Return if function call is successful
-
bool flashUpdate(void)
Saves current board configuration in flash memory, to be loaded in next bootup.
- Returns:
Return if function call is successful
-
bool recoverBoard(void)
Executes recovery operation to clear status back to 0000.
Will only be called if enable_init_recovery is TRUE
- Returns:
Return if function call is successful
-
void initServiceServers(uint8_t mode_of_operation)
Initializes service servers based on operation mode.
- Parameters:
mode_of_operation – [in] Determine if operation is STREAM or RECOVERY
- Returns:
Return if function call is successful
-
std::string getStatusDescription(uint16_t status)
Callback when /bias_estimate is called.
- Parameters:
status – [in] Status to be evaluated
res – [in] Result
- Returns:
String of current status of Buffer Board.
Callback when /factory_reset is called.
- Parameters:
req – [in] Request
res – [in] Result
- Returns:
Boolean if successful (true) or not (false)
Callback when /clear_fault is called.
- Parameters:
req – [in] Request
res – [in] Result
- Returns:
Boolean if successful (true) or not (false)
Callback when /flash_update is called.
- Parameters:
req – [in] Request
res – [in] Result
- Returns:
Boolean if successful (true) or not (false)
Callback when /check_status is called.
- Parameters:
req – [in] Request
res – [in] Result
- Returns:
Boolean if successful (true) or not (false)
-
void setModeofOperation(uint8_t mode_of_operation)
Initializes service servers based on operation mode.
- Parameters:
mode_of_operation – [in] Acquire value from param in AdiImuBufRos2
- Returns:
Return if function call is successful
-
bool detect(void)
Checks if ADRD2121 device can be detected.
- Returns:
Return bool if device is found