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

robot footprint model access specifiers loosened #295

Open
wants to merge 1 commit into
base: kinetic-devel
Choose a base branch
from
Open
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
18 changes: 9 additions & 9 deletions include/teb_local_planner/robot_footprint_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class BaseRobotFootprintModel
* @brief Compute the inscribed radius of the footprint model
* @return inscribed radius
*/
virtual double getInscribedRadius() = 0;
virtual double getInscribedRadius() const = 0;



Expand Down Expand Up @@ -172,7 +172,7 @@ class PointRobotFootprint : public BaseRobotFootprintModel
* @brief Compute the inscribed radius of the footprint model
* @return inscribed radius
*/
virtual double getInscribedRadius() {return 0.0;}
virtual double getInscribedRadius() const {return 0.0;}

};

Expand Down Expand Up @@ -249,7 +249,7 @@ class CircularRobotFootprint : public BaseRobotFootprintModel
* @brief Compute the inscribed radius of the footprint model
* @return inscribed radius
*/
virtual double getInscribedRadius() {return radius_;}
virtual double getInscribedRadius() const {return radius_;}

private:

Expand Down Expand Up @@ -362,14 +362,14 @@ class TwoCirclesRobotFootprint : public BaseRobotFootprintModel
* @brief Compute the inscribed radius of the footprint model
* @return inscribed radius
*/
virtual double getInscribedRadius()
virtual double getInscribedRadius() const
{
double min_longitudinal = std::min(rear_offset_ + rear_radius_, front_offset_ + front_radius_);
double min_lateral = std::min(rear_radius_, front_radius_);
return std::min(min_longitudinal, min_lateral);
}

private:
protected:

double front_offset_;
double front_radius_;
Expand Down Expand Up @@ -501,12 +501,12 @@ class LineRobotFootprint : public BaseRobotFootprintModel
* @brief Compute the inscribed radius of the footprint model
* @return inscribed radius
*/
virtual double getInscribedRadius()
virtual double getInscribedRadius() const
{
return 0.0; // lateral distance = 0.0
}

private:
protected:

/**
* @brief Transforms a line to the world frame manually
Expand Down Expand Up @@ -631,7 +631,7 @@ class PolygonRobotFootprint : public BaseRobotFootprintModel
* @brief Compute the inscribed radius of the footprint model
* @return inscribed radius
*/
virtual double getInscribedRadius()
virtual double getInscribedRadius() const
{
double min_dist = std::numeric_limits<double>::max();
Eigen::Vector2d center(0.0, 0.0);
Expand All @@ -653,7 +653,7 @@ class PolygonRobotFootprint : public BaseRobotFootprintModel
return std::min(min_dist, std::min(vertex_dist, edge_dist));
}

private:
protected:

/**
* @brief Transforms a polygon to the world frame manually
Expand Down