Skip to content

Commit

Permalink
add convenience function for motion compensated frame
Browse files Browse the repository at this point in the history
  • Loading branch information
togaen committed Jun 4, 2020
1 parent c69ee11 commit b744a50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/a2d2_to_ros/name_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@

namespace a2d2_to_ros {

/**
* @brief Convenience method to generate a standard TF frame name.
* @note This function has no test coverage.
*/
std::string tf_motion_compensated_sensor_frame_name(
const std::string& sensor_type, const std::string& sensor_frame);

/**
* @brief Convenience method to generate a standard TF frame name.
* @note This function has no test coverage.
Expand Down
7 changes: 7 additions & 0 deletions src/a2d2_to_ros/name_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ namespace a2d2_to_ros {

//------------------------------------------------------------------------------

std::string tf_motion_compensated_sensor_frame_name(
const std::string& sensor_type, const std::string& sensor_frame) {
return tf_frame_name(sensor_type, sensor_frame + "_motion_compensated");
}

//------------------------------------------------------------------------------

std::string tf_frame_name(const std::string& sensor_type,
const std::string& sensor_frame) {
return (sensor_type + "_" + sensor_frame);
Expand Down

0 comments on commit b744a50

Please sign in to comment.