Skip to content

Commit

Permalink
makePointMsg provided
Browse files Browse the repository at this point in the history
  • Loading branch information
KushnirDmytro committed Mar 21, 2019
1 parent 9522322 commit 834a3fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion explore_lite_revised/include/explore/explore_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <costmap_2d/costmap_2d.h>

namespace frontier_exploration{
static geometry_msgs::Point pointMsgBuilder(const double x, const double y, const double z){
static geometry_msgs::Point makePointMsg(const double x, const double y, const double z){
geometry_msgs::Point p;
p.x = x; p.y = y; p.z = z;
return p;
Expand Down
3 changes: 1 addition & 2 deletions explore_lite_revised/include/explore/frontier_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ namespace frontier_exploration
*/

struct Frontier {
//todo make a class of it, make methods static methods of class
// std::uint32_t size{0};
//todo improve this struct functionality
double min_distance{std::numeric_limits<double>::infinity()};
double cost{0.0};
geometry_msgs::Point initial;
Expand Down
8 changes: 4 additions & 4 deletions explore_lite_revised/src/frontier_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ inline geometry_msgs::Point getClosestPointTo(const std::vector<geometry_msgs::P
}

inline geometry_msgs::Point Frontier::toReferenceFrame(const geometry_msgs::Point &pt_in_absolute_frame){
return pointMsgBuilder(
return makePointMsg(
pt_in_absolute_frame.x - reference_robot_pose.x,
pt_in_absolute_frame.y - reference_robot_pose.y,
0);
}
inline geometry_msgs::Point Frontier::fromReferenceFrame(const geometry_msgs::Point &pt_in_reference_frame){
return pointMsgBuilder(pt_in_reference_frame.x + reference_robot_pose.x,
pt_in_reference_frame.y + reference_robot_pose.y,
0);
return makePointMsg(pt_in_reference_frame.x + reference_robot_pose.x,
pt_in_reference_frame.y + reference_robot_pose.y,
0);
}

FrontierSearch::FrontierSearch(costmap_2d::Costmap2D* costmap,
Expand Down

0 comments on commit 834a3fa

Please sign in to comment.