Skip to content

Commit 24f8b26

Browse files
noah7104ndr3w
authored andcommitted
make it go (#27)
1 parent 3eb3ed9 commit 24f8b26

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/magellan_motion/src/path_planner/planner.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int PathPlanner::getKey(double x, double y) {
4343

4444
Path PathPlanner::getPlan(std::shared_ptr<Successor> goalNode) {
4545
Path p;
46-
p.header.frame_id = "base_link";
46+
p.header.frame_id = "odom";
4747
p.header.stamp = ros::Time::now();
4848
double totalCost = 0;
4949

@@ -60,7 +60,7 @@ Path PathPlanner::getPlan(std::shared_ptr<Successor> goalNode) {
6060
PoseStamped pt;
6161
pt.pose.position.x = parent->xPose;
6262
pt.pose.position.y = parent->yPose;
63-
pt.header.frame_id = "base_link";
63+
pt.header.frame_id = "odom";
6464
totalCost = totalCost + parent->gCost;
6565

6666
planVector.push_back(pt);
@@ -86,8 +86,8 @@ Path PathPlanner::plan(Point goal) {
8686
std::chrono::time_point<std::chrono::high_resolution_clock> startTime =
8787
std::chrono::high_resolution_clock::now();
8888

89-
goalX = std::roundf(goal.x * 100) / 100;
90-
goalY = std::roundf(goal.y * 100) / 100;
89+
goalX = std::roundf(goal.x);
90+
goalY = std::roundf(goal.y);
9191

9292
if (!isFree(goalX, goalY)) {
9393
ROS_ERROR("PathPlanner: Goal is not free!!!!");

0 commit comments

Comments
 (0)