-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Corrected ODOMSH frame id * Update repository to be compatible with the new VRTK2 software * Updated README * Removed test * Corrected resolution of ROS messages --------- Co-authored-by: Facundo Garcia <[email protected]>
- Loading branch information
1 parent
e896f13
commit 21b772e
Showing
54 changed files
with
1,703 additions
and
101,311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* @file | ||
* @brief Implementation of FP_A-EOE parser | ||
* | ||
* \verbatim | ||
* ___ ___ | ||
* \ \ / / | ||
* \ \/ / Fixposition AG | ||
* / /\ \ All right reserved. | ||
* /__/ \__\ | ||
* \endverbatim | ||
* | ||
*/ | ||
|
||
/* PACKAGE */ | ||
#include <fixposition_driver_lib/messages/fpa_type.hpp> | ||
#include <fixposition_driver_lib/messages/base_converter.hpp> | ||
|
||
namespace fixposition { | ||
|
||
/// msg field indices | ||
static constexpr int msg_type_idx = 1; | ||
static constexpr int msg_version_idx = 2; | ||
static constexpr int gps_week_idx = 3; | ||
static constexpr int gps_tow_idx = 4; | ||
static constexpr int epoch_idx = 5; | ||
|
||
void FP_EOE::ConvertFromTokens(const std::vector<std::string>& tokens) { | ||
bool ok = tokens.size() == kSize_; | ||
if (!ok) { | ||
// Size is wrong | ||
std::cout << "Error in parsing FP_A-EOE string with " << tokens.size() << " fields!\n"; | ||
} else { | ||
// If size is ok, check version | ||
const int _version = std::stoi(tokens.at(msg_version_idx)); | ||
|
||
ok = _version == kVersion_; | ||
if (!ok) { | ||
// Version is wrong | ||
std::cout << "Error in parsing FP_A-EOE string with version " << _version << "!\n"; | ||
} | ||
} | ||
|
||
if (!ok) { | ||
// Reset message and return | ||
ResetData(); | ||
return; | ||
} | ||
|
||
// Parse time | ||
stamp = ConvertGpsTime(tokens.at(gps_week_idx), tokens.at(gps_tow_idx)); | ||
|
||
// Populate fields | ||
epoch = tokens.at(epoch_idx); | ||
} | ||
|
||
} // namespace fixposition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.