Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed documentation and function name #37

Merged
merged 3 commits into from
Nov 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions flatland_plugins/include/flatland_plugins/world_modifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ struct WorldModifier {
Pose robot_ini_pose_;

/*
* @brief add wall depend on different orientation of the original wall and the
* robot
* @param[in] double d, calculated to determine which side of the old wall will
* the new be at
* @brief based on the info regard old wall and d, calculate new obstacle's
* vertices
* @param[in] double d, the sign of this value determine which side of the wall
* will the new obstacle be added
* @param[in] b2Vec2 vertex1, old wall's vertex1
* @param[in] b2Vec2 vertex2, old wall's vertex2
* @param[out] b2EdgeShape new_wall, reference passed in to set the vertexs
* @param[out] b2EdgeShape new_wall, reference passed in to set the vertices
*/
void GetWallDirection(double d, b2Vec2 vertex1, b2Vec2 vertex2,
void CalculateNewWall(double d, b2Vec2 vertex1, b2Vec2 vertex2,
b2EdgeShape &new_wall);

/*
Expand Down
6 changes: 3 additions & 3 deletions flatland_plugins/src/world_modifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ WorldModifier::WorldModifier(flatland_server::World *world,
double_wall_(double_wall),
robot_ini_pose_(robot_ini_pose) {}

void WorldModifier::GetWallDirection(double d, b2Vec2 vertex1, b2Vec2 vertex2,
void WorldModifier::CalculateNewWall(double d, b2Vec2 vertex1, b2Vec2 vertex2,
b2EdgeShape &new_wall) {
b2Vec2 new_wall_v1;
b2Vec2 new_wall_v2;
Expand Down Expand Up @@ -182,13 +182,13 @@ void WorldModifier::AddFullWall(b2EdgeShape *wall) {

// add the main wall
b2EdgeShape new_wall;
GetWallDirection(d, vertex1, vertex2, new_wall);
CalculateNewWall(d, vertex1, vertex2, new_wall);
AddWall(new_wall);
// add the sidewall
AddSideWall(*wall, new_wall);

if (double_wall_) { // if add walls on both side
GetWallDirection(-d, vertex1, vertex2, new_wall);
CalculateNewWall(-d, vertex1, vertex2, new_wall);
AddWall(new_wall);
// add the sidewall
AddSideWall(*wall, new_wall);
Expand Down