This class represents u-blox ROS node for all firmware and product versions. More...
#include <node.h>
Public Member Functions | |
bool | configureUblox () |
Configure the device based on ROS parameters. More... | |
void | getRosParams () |
Get the node parameters from the ROS Parameter Server. More... | |
void | initializeRosDiagnostics () |
Initialize the diagnostic updater and add the fix diagnostic. More... | |
void | printInf (const ublox_msgs::Inf &m, uint8_t id) |
Print an INF message to the ROS console. More... | |
void | subscribe () |
Subscribe to all requested u-blox messages. More... | |
UbloxNode () | |
Initialize and run the u-blox node. More... | |
Static Public Attributes | |
static constexpr float | kDiagnosticPeriod = 0.2 |
[s] 5Hz diagnostic period More... | |
static constexpr double | kFixFreqTol = 0.15 |
Tolerance for Fix topic frequency as percentage of target frequency. More... | |
static constexpr double | kFixFreqWindow = 10 |
Window [num messages] for Fix Frequency Diagnostic. More... | |
static constexpr double | kPollDuration = 1.0 |
how often (in seconds) to call poll messages More... | |
static constexpr double | kTimeStampStatusMin = 0 |
Minimum Time Stamp Status for fix frequency diagnostic. More... | |
Private Member Functions | |
void | addFirmwareInterface () |
Add the interface for firmware specific configuration, subscribers, & diagnostics. This assumes the protocol_version_ has been set. More... | |
void | addProductInterface (std::string product_category, std::string ref_rov="") |
Add the interface which is used for product category configuration, subscribers, & diagnostics. More... | |
void | configureInf () |
Configure INF messages, call after subscribe. More... | |
void | initialize () |
Initialize the U-Blox node. Configure the U-Blox and subscribe to messages. More... | |
void | initializeIo () |
Initialize the I/O handling. More... | |
void | pollMessages (const ros::TimerEvent &event) |
Poll messages from the U-Blox device. More... | |
void | processMonVer () |
Process the MonVer message and add firmware and product components. More... | |
bool | resetDevice () |
Send a reset message the u-blox device & re-initialize the I/O. More... | |
void | shutdown () |
Shutdown the node. Closes the serial port. More... | |
Private Attributes | |
uint32_t | baudrate_ |
UART1 baudrate. More... | |
ublox_msgs::CfgDAT | cfg_dat_ |
User-defined Datum. More... | |
std::vector< boost::shared_ptr< ComponentInterface > > | components_ |
The u-blox node components. More... | |
std::string | device_ |
Device port. More... | |
uint8_t | dmodel_ |
Set from dynamic model string. More... | |
uint8_t | dr_limit_ |
Dead reckoning limit parameter. More... | |
std::string | dynamic_model_ |
dynamic model type More... | |
bool | enable_ppp_ |
Whether or not to enable PPP (advanced setting) More... | |
bool | enable_sbas_ |
Whether or not to enable SBAS. More... | |
std::string | fix_mode_ |
Fix mode type. More... | |
uint8_t | fmode_ |
Set from fix mode string. More... | |
ublox_msgs::CfgCFG | load_ |
Parameters to load from non-volatile memory during configuration. More... | |
uint8_t | max_sbas_ |
Max SBAS parameter (see CfgSBAS message) More... | |
float | protocol_version_ = 0 |
Determined From Mon VER. More... | |
double | rate_ |
The measurement rate in Hz. More... | |
RawDataStreamPa | rawDataStreamPa_ |
raw data stream logging More... | |
ublox_msgs::CfgCFG | save_ |
Parameters to save to non-volatile memory after configuration. More... | |
uint8_t | sbas_usage_ |
SBAS Usage parameter (see CfgSBAS message) More... | |
bool | set_dat_ |
If true, set configure the User-Defined Datum. More... | |
bool | set_usb_ |
Whether to configure the USB port. More... | |
uint8_t | tim_rate_ |
rate for TIM-TM2 More... | |
uint16_t | uart_in_ |
UART in protocol (see CfgPRT message for constants) More... | |
uint16_t | uart_out_ |
UART out protocol (see CfgPRT message for constants) More... | |
uint16_t | usb_in_ |
USB in protocol (see CfgPRT message for constants) More... | |
uint16_t | usb_out_ |
USB out protocol (see CfgPRT message for constants) More... | |
uint16_t | usb_tx_ |
USB TX Ready Pin configuration (see CfgPRT message for constants) More... | |
This class represents u-blox ROS node for all firmware and product versions.
It loads the user parameters, configures the u-blox device, subscribes to u-blox messages, and configures the device hardware. Functionality specific to a given product or firmware version, etc. should NOT be implemented in this class. Instead, the user should add the functionality to the appropriate implementation of ComponentInterface. If necessary, the user should create a class which implements u-blox interface, then add a pointer to an instance of the class to the components vector. The UbloxNode calls the public methods of ComponentInterface for each element in the components vector.
UbloxNode::UbloxNode | ( | ) |
|
private |
|
private |
Add the interface which is used for product category configuration, subscribers, & diagnostics.
the | product category, i.e. SPG, HPG, ADR, UDR, TIM, or FTS. |
for | HPG/TIM products, this value is either REF or ROV, for other products this string is empty |
|
private |
|
virtual |
Configure the device based on ROS parameters.
Implements ublox_node::ComponentInterface.
|
virtual |
Get the node parameters from the ROS Parameter Server.
Implements ublox_node::ComponentInterface.
|
private |
|
private |
|
virtual |
Initialize the diagnostic updater and add the fix diagnostic.
Implements ublox_node::ComponentInterface.
|
private |
void UbloxNode::printInf | ( | const ublox_msgs::Inf & | m, |
uint8_t | id | ||
) |
|
private |
|
private |
Send a reset message the u-blox device & re-initialize the I/O.
|
private |
|
virtual |
Subscribe to all requested u-blox messages.
Implements ublox_node::ComponentInterface.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |