Skip to content

Commit

Permalink
Merge pull request #1 from ZhuChaozheng/patch-2
Browse files Browse the repository at this point in the history
Update odomPub.hpp
  • Loading branch information
rosrookie authored Jul 6, 2022
2 parents 2807dc9 + a2f48ba commit 736bb20
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/global_vision/include/global_vision/odomPub.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: Chaozheng Zhu && Loren
* @Date: 2022-05-07 09:33:11
* @LastEditTime: 2022-05-17 17:09:58
* @LastEditTime: 2022-06-26 21:01:51
* @FilePath:
* /kk-robot-swarm/src/global_vision/include/global_vision/odomPub.hpp
* @Description:
Expand Down Expand Up @@ -85,6 +85,19 @@ class odomPub {
return tf_base;
}

/**
* \brief: Creates /robot_x/base_link tf frame. x is car's id.
* \param: {int mark: Car's id.}
* \return: {std::string: /robot_x/base_link tf frame}
*/
std::string tagNameGenerate(int mark) {
std::string front_str = "/tag_";
std::stringstream ss_base;
ss_base << front_str << mark;
std::string tf_base = ss_base.str();
return tf_base;
}

/**
* \brief: Creates /robot_x/pose topic. x is car's id.
* \param: {int mark: Car's id.}
Expand All @@ -108,4 +121,4 @@ class odomPub {
if (yaw < 0) yaw = yaw + 2 * 3.1415926;
return 180 * yaw / 3.1415926;
}
};
};

0 comments on commit 736bb20

Please sign in to comment.