Skip to content

Commit 49ca096

Browse files
committed
Fix default initializations
1 parent 08a44a7 commit 49ca096

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ rosdep install --from-paths src --ignore-src
9494

9595
Build the package
9696
```bash
97-
colcon build --packages-up-to terrain_navigation_ros
97+
colcon build --packages-up-to terrain_navigation_ros --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
9898
```
9999

100100
## Running with PX4 SITL(Software-In-The-Loop), Gazebo and QGroundControl (QGC)

terrain_planner/include/terrain_planner/terrain_ompl_rrt.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
class TerrainOmplRrt {
5252
public:
53-
TerrainOmplRrt();
53+
TerrainOmplRrt(const double minTurnRadius = 66.7, const double maxPitchAngle = 0.3 * M_PI);
5454
TerrainOmplRrt(const ompl::base::StateSpacePtr& space);
5555
virtual ~TerrainOmplRrt();
5656

@@ -70,7 +70,8 @@ class TerrainOmplRrt {
7070
* - Negative: Clockwise
7171
*/
7272
void setupProblem(const Eigen::Vector3d& start_pos, const Eigen::Vector3d& goal) {
73-
this->setupProblem(start_pos, goal, problem_setup_->getStateSpace()->as<ompl::base::OwenStateSpace>()->getMinTurnRadius());
73+
this->setupProblem(start_pos, goal,
74+
problem_setup_->getStateSpace()->as<ompl::base::OwenStateSpace>()->getMinTurnRadius());
7475
};
7576

7677
/**

terrain_planner/src/terrain_ompl_rrt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
#include "terrain_planner/terrain_ompl_rrt.h"
3636

3737
// Constructor
38-
TerrainOmplRrt::TerrainOmplRrt() {
39-
problem_setup_ =
40-
std::make_shared<ompl::OmplSetup>(ompl::base::StateSpacePtr(new ompl::base::OwenStateSpace(66.7, 0.3 * M_PI)));
38+
TerrainOmplRrt::TerrainOmplRrt(const double minTurnRadius, const double maxPitchAngle) {
39+
problem_setup_ = std::make_shared<ompl::OmplSetup>(
40+
ompl::base::StateSpacePtr(new ompl::base::OwenStateSpace(minTurnRadius, maxPitchAngle)));
4141
}
4242
TerrainOmplRrt::TerrainOmplRrt(const ompl::base::StateSpacePtr& space) {
4343
problem_setup_ = std::make_shared<ompl::OmplSetup>(space);

0 commit comments

Comments
 (0)