Skip to content

Commit

Permalink
Merge pull request #47 from thomasemter/dev/refactor
Browse files Browse the repository at this point in the history
Dev/refactor
  • Loading branch information
tibordome committed Jan 15, 2022
2 parents af77568 + da30905 commit b3eb3eb
Show file tree
Hide file tree
Showing 32 changed files with 2,344 additions and 3,268 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ find_package(catkin REQUIRED COMPONENTS
)

## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system thread regex)
find_package(Boost REQUIRED) # bug with 1.71: spirit is not found ... COMPONENTS system thread regex spirit)
LIST(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib")
find_package(GeographicLib REQUIRED)

Expand Down Expand Up @@ -72,19 +72,21 @@ endif ()
add_message_files(
FILES
BlockHeader.msg
MeasEpoch.msg
MeasEpochChannelType1.msg
MeasEpochChannelType2.msg
PVTCartesian.msg
PVTGeodetic.msg
PosCovCartesian.msg
PosCovGeodetic.msg
VelCovCartesian.msg
VelCovGeodetic.msg
AttEuler.msg
AttCovEuler.msg
INSNavCart.msg
INSNavGeod.msg
IMUSetup.msg
VelSensorSetup.msg
ExtEventINSNavGeod.msg
ExtEventINSNavCart.msg
ExtSensorMeas.msg
)

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ Conversions from LLA to UTM are incorporated through [GeographicLib](https://geo
<summary>Notes Before Usage</summary>

+ In your bash sessions, navigating to the ROSaic package can be achieved from anywhere with no more effort than `roscd septentrio_gnss_driver`.
+ The driver assumes that our anonymous access to the Rx grants us full control rights. This should be the case by default, and can otherwise be changed with the `setDefaultAccessLevel` command.
+ Currently, the driver only works on systems that are little-endian. Most modern computers, including PCs, are little-endian.
+ The driver assumes that our anonymous access to the Rx grants us full control rights. This should be the case by default, and can otherwise be changed with the `setDefaultAccessLevel` command.
+ The development process of this driver has been performed with mosaic-x5, firmware (FW) revision number 2, and AsteRx-SBi3 Pro, FW revision number 1. If a more up-to-date FW (higher revision number) is uploaded to the mosaic, the driver will not be able to take account of new or updated SBF fields.
+ ROSaic only works from C++11 onwards due to std::to_string() etc.
+ Once the catkin build or binary installation is finished, adapt the `config/rover.yaml` file according to your needs. The `launch/rover.launch` need not be modified. Specify the communication parameters, the ROS messages to be published, the frequency at which the latter should happen etc.:<br>
Expand Down Expand Up @@ -140,6 +139,7 @@ Conversions from LLA to UTM are incorporated through [GeographicLib](https://geo
gpgga: false
gprmc: false
gpst : false
measepoch: false
pvtcartesian: false
pvtgeodetic: true
poscovcartesian: false
Expand Down Expand Up @@ -406,6 +406,7 @@ The following is a list of ROSaic parameters found in the `config/rover.yaml` fi
+ `publish/gprmc`: `true` to publish `nmea_msgs/GPRMC.msg` messages into the topic `/gprmc`
+ `publish/gpgsa`: `true` to publish `nmea_msgs/GPGSA.msg` messages into the topic `/gpgsa`
+ `publish/gpgsv`: `true` to publish `nmea_msgs/GPGSV.msg` messages into the topic `/gpgsv`
+ `publish/measepoch`: `true` to publish `septentrio_gnss_driver/MeasEpoch.msg` messages into the topic `/measepoch`
+ `publish/pvtcartesian`: `true` to publish `septentrio_gnss_driver/PVTCartesian.msg` messages into the topic `/pvtcartesian`
+ `publish/pvtgeodetic`: `true` to publish `septentrio_gnss_driver/PVTGeodetic.msg` messages into the topic `/pvtgeodetic`
+ `publish/poscovcartesian`: `true` to publish `septentrio_gnss_driver/PosCovCartesian.msg` messages into the topic `/poscovcartesian`
Expand Down Expand Up @@ -458,8 +459,8 @@ A selection of NMEA sentences, the majority being standardized sentences, and pr
+ `/extsensormeas`: publishes custom ROS message `septentrio_gnss_driver/ExtSensorMeas.msg`, corresponding to SBF block `ExtSensorMeas`
+ `/imusetup`: publishes custom ROS message `septentrio_gnss_driver/IMUSetup.msg`, corresponding to SBF block `IMUSetup`
+ `/velsensorsetup`: publishes custom ROS message `septentrio_gnss_driver/VelSensorSetup.msg` corresponding to SBF block `VelSensorSetup`
+ `/exteventinsnavcart`: publishes custom ROS message `septentrio_gnss_driver/ExtEventINSNavCart.msg`, corresponding to SBF block `ExtEventINSNavCart`
+ `/exteventinsnavgeod`: publishes custom ROS message `septentrio_gnss_driver/ExtEventINSNavGeod.msg`, corresponding to SBF block `ExtEventINSNavGeod`
+ `/exteventinsnavcart`: publishes custom ROS message `septentrio_gnss_driver/INSNavCart.msg`, corresponding to SBF block `ExtEventINSNavCart`
+ `/exteventinsnavgeod`: publishes custom ROS message `septentrio_gnss_driver/INSNavGeod.msg`, corresponding to SBF block `ExtEventINSNavGeod`
+ `/diagnostics`: accepts generic ROS message [`diagnostic_msgs/DiagnosticArray.msg`](https://docs.ros.org/api/diagnostic_msgs/html/msg/DiagnosticArray.html), converted from the SBF blocks `QualityInd`, `ReceiverStatus` and `ReceiverSetup`
+ `/imu`: accepts generic ROS message [`sensor_msgs/Imu.msg`](https://docs.ros.org/en/api/sensor_msgs/html/msg/Imu.html), converted from the SBF blocks `ExtSensorMeas` and `INSNavGeod`
+ `/localization`: accepts generic ROS message [`nav_msgs/Odometry.msg`](https://docs.ros.org/en/api/nav_msgs/html/msg/Odometry.html), converted from the SBF block `INSNavGeod`
Expand All @@ -470,10 +471,8 @@ A selection of NMEA sentences, the majority being standardized sentences, and pr
<summary>Some Ideas</summary>

+ Automatic Search: If the host address of the receiver is omitted in the `host:port` specification, the driver could automatically search and establish a connection on the specified port.
+ Publishing the topic `/measepoch`: It could accept the custom ROS message `septentrio_gnss_driver/MeasEpoch.msg`, corresponding to the SBF block `MeasEpoch` (raw GNSS data).
+ Publishing the topic `/twist`: It could accept the generic ROS message [`geometry_msgs/TwistWithCovarianceStamped.msg`](https://docs.ros.org/melodic/api/geometry_msgs/html/msg/TwistWithCovarianceStamped.html), converted from the SBF blocks `PVTGeodetic`, `PosCovGeodetic` and others or via standardized NMEA sentences (cf. the [NMEA driver](https://wiki.ros.org/nmea_navsat_driver)).
+ The ROS message [`geometry_msgs/TwistWithCovarianceStamped.msg`](https://docs.ros.org/melodic/api/geometry_msgs/html/msg/TwistWithCovarianceStamped.html) could be fed directly into the [`robot_localization`](https://docs.ros.org/melodic/api/robot_localization/html/index.html) nodes of the ROS navigation stack.
+ Additional ROSaic parameter: endianness of the system.
+ Equip ROSaic with an NTRIP client such that it can forward corrections to the receiver independently of `Data Link`.
</details>

Expand Down
1 change: 1 addition & 0 deletions config/rover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ publish:
gpgga: false
gprmc: false
gpst : false
measepoch: false
pvtcartesian: false
pvtgeodetic: true
poscovcartesian: false
Expand Down
54 changes: 17 additions & 37 deletions include/septentrio_gnss_driver/abstraction/typedefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@
#include <sensor_msgs/Imu.h>
#include <nav_msgs/Odometry.h>
// GNSS msg includes
#include <septentrio_gnss_driver/BlockHeader.h>
#include <septentrio_gnss_driver/MeasEpoch.h>
#include <septentrio_gnss_driver/MeasEpochChannelType1.h>
#include <septentrio_gnss_driver/MeasEpochChannelType2.h>
#include <septentrio_gnss_driver/AttCovEuler.h>
#include <septentrio_gnss_driver/AttEuler.h>
#include <septentrio_gnss_driver/PVTCartesian.h>
#include <septentrio_gnss_driver/PVTGeodetic.h>
#include <septentrio_gnss_driver/PosCovCartesian.h>
#include <septentrio_gnss_driver/PosCovGeodetic.h>
#include <septentrio_gnss_driver/VelCovCartesian.h>
#include <septentrio_gnss_driver/VelCovGeodetic.h>
// NMEA msg includes
#include <nmea_msgs/Gpgga.h>
Expand All @@ -66,8 +71,6 @@
#include <septentrio_gnss_driver/INSNavGeod.h>
#include <septentrio_gnss_driver/IMUSetup.h>
#include <septentrio_gnss_driver/VelSensorSetup.h>
#include <septentrio_gnss_driver/ExtEventINSNavGeod.h>
#include <septentrio_gnss_driver/ExtEventINSNavCart.h>
#include <septentrio_gnss_driver/ExtSensorMeas.h>

// Timestamp in nanoseconds (Unix epoch)
Expand All @@ -77,67 +80,44 @@ typedef ros::Time TimestampRos;

// ROS messages
typedef diagnostic_msgs::DiagnosticArray DiagnosticArrayMsg;
typedef diagnostic_msgs::DiagnosticArrayPtr DiagnosticArrayMsgPtr;
typedef diagnostic_msgs::DiagnosticStatus DiagnosticStatusMsg;
typedef diagnostic_msgs::DiagnosticStatusPtr DiagnosticStatusMsgPtr;
typedef geometry_msgs::Quaternion QuaternionMsg;
typedef geometry_msgs::PoseWithCovarianceStamped PoseWithCovarianceStampedMsg;
typedef geometry_msgs::PoseWithCovarianceStampedPtr PoseWithCovarianceStampedMsgPtr;
typedef geometry_msgs::TransformStamped TransformStampedMsg;
typedef gps_common::GPSFix GPSFixMsg;
typedef gps_common::GPSFixPtr GPSFixMsgPtr;
typedef gps_common::GPSStatus GPSStatusMsg;
typedef sensor_msgs::NavSatFix NavSatFixMsg;
typedef sensor_msgs::NavSatFixPtr NavSatFixMsgPtr;
typedef sensor_msgs::NavSatStatus NavSatStatusMsg;
typedef sensor_msgs::TimeReference TimeReferenceMsg;
typedef sensor_msgs::TimeReferencePtr TimeReferenceMsgPtr;
typedef sensor_msgs::Imu ImuMsg;
typedef sensor_msgs::ImuPtr ImuMsgPtr;
typedef nav_msgs::Odometry LocalizationUtmMsg;
typedef nav_msgs::OdometryPtr LocalizationUtmMsgPtr;

// Septentrio GNSS SBF messages
typedef septentrio_gnss_driver::AttCovEuler AttCovEulerMsg;
typedef septentrio_gnss_driver::AttCovEulerPtr AttCovEulerMsgPtr;
typedef septentrio_gnss_driver::AttEuler AttEulerMsg;
typedef septentrio_gnss_driver::AttEulerPtr AttEulerMsgPtr;
typedef septentrio_gnss_driver::PVTCartesian PVTCartesianMsg;
typedef septentrio_gnss_driver::PVTCartesianPtr PVTCartesianMsgPtr;
typedef septentrio_gnss_driver::PVTGeodetic PVTGeodeticMsg;
typedef septentrio_gnss_driver::PVTGeodeticPtr PVTGeodeticMsgPtr;
typedef septentrio_gnss_driver::PosCovCartesian PosCovCartesianMsg;
typedef septentrio_gnss_driver::PosCovCartesianPtr PosCovCartesianMsgPtr;
typedef septentrio_gnss_driver::PosCovGeodetic PosCovGeodeticMsg;
typedef septentrio_gnss_driver::PosCovGeodeticPtr PosCovGeodeticMsgPtr;
typedef septentrio_gnss_driver::VelCovGeodetic VelCovGeodeticMsg;
typedef septentrio_gnss_driver::VelCovGeodeticPtr VelCovGeodeticMsgPtr;
typedef septentrio_gnss_driver::BlockHeader BlockHeaderMsg;
typedef septentrio_gnss_driver::MeasEpoch MeasEpochMsg;
typedef septentrio_gnss_driver::MeasEpochChannelType1 MeasEpochChannelType1Msg;
typedef septentrio_gnss_driver::MeasEpochChannelType2 MeasEpochChannelType2Msg;
typedef septentrio_gnss_driver::AttCovEuler AttCovEulerMsg;
typedef septentrio_gnss_driver::AttEuler AttEulerMsg;
typedef septentrio_gnss_driver::PVTCartesian PVTCartesianMsg;
typedef septentrio_gnss_driver::PVTGeodetic PVTGeodeticMsg;
typedef septentrio_gnss_driver::PosCovCartesian PosCovCartesianMsg;
typedef septentrio_gnss_driver::PosCovGeodetic PosCovGeodeticMsg;
typedef septentrio_gnss_driver::VelCovCartesian VelCovCartesianMsg;
typedef septentrio_gnss_driver::VelCovGeodetic VelCovGeodeticMsg;

// NMEA messages
typedef nmea_msgs::Gpgga GpggaMsg;
typedef nmea_msgs::GpggaPtr GpggaMsgPtr;
typedef nmea_msgs::Gpgsa GpgsaMsg;
typedef nmea_msgs::GpgsaPtr GpgsaMsgPtr;
typedef nmea_msgs::Gpgsv GpgsvMsg;
typedef nmea_msgs::GpgsvPtr GpgsvMsgPtr;
typedef nmea_msgs::Gprmc GprmcMsg;
typedef nmea_msgs::GprmcPtr GprmcMsgPtr;

// Septentrio INS+GNSS SBF messages
typedef septentrio_gnss_driver::INSNavCart INSNavCartMsg;
typedef septentrio_gnss_driver::INSNavCartPtr INSNavCartMsgPtr;
typedef septentrio_gnss_driver::INSNavGeod INSNavGeodMsg;
typedef septentrio_gnss_driver::INSNavGeodPtr INSNavGeodMsgPtr;
typedef septentrio_gnss_driver::IMUSetup IMUSetupMsg;
typedef septentrio_gnss_driver::IMUSetupPtr IMUSetupMsgPtr;
typedef septentrio_gnss_driver::VelSensorSetup VelSensorSetupMsg;
typedef septentrio_gnss_driver::VelSensorSetupPtr VelSensorSetupMsgPtr;
typedef septentrio_gnss_driver::ExtEventINSNavGeod ExtEventINSNavGeodMsg;
typedef septentrio_gnss_driver::ExtEventINSNavGeodPtr ExtEventINSNavGeodMsgPtr;
typedef septentrio_gnss_driver::ExtEventINSNavCart ExtEventINSNavCartMsg;
typedef septentrio_gnss_driver::ExtEventINSNavCartPtr ExtEventINSNavCartMsgPtr;
typedef septentrio_gnss_driver::ExtSensorMeas ExtSensorMeasMsg;
typedef septentrio_gnss_driver::ExtSensorMeasPtr ExtSensorMeasMsgPtr;

/**
* @brief Convert nsec timestamp to ROS timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define PCAP_READER_H

#include <pcap/pcap.h>
#include <stdint.h>
#include <cstdint>
#include <vector>
#include <septentrio_gnss_driver/abstraction/typedefs.hpp>

Expand Down
Loading

0 comments on commit b3eb3eb

Please sign in to comment.