Skip to content

Commit

Permalink
wip config
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jun 9, 2021
1 parent efcf05c commit 133262a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 16 additions & 1 deletion libselfdriving/include/selfdriving/algos/WaypointSequencer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include <mrpt/nav/reactive/CAbstractNavigator.h>
#include <selfdriving/data/Waypoints.h>
#include <selfdriving/interfaces/ObstacleSource.h>
#include <selfdriving/interfaces/VehicleMotionInterface.h>

namespace selfdriving
{
Expand Down Expand Up @@ -81,6 +83,17 @@ class WaypointSequencer
{
Configuration() = default;

/** @name Interfaces (fill all these members before initialize() )
* @{ */
VehicleMotionInterface::Ptr vehicleMotionInterface;

ObstacleSource::Ptr obstacleSource;

/** @} */

/** @name Parameters
* @{ */

/** In meters. Not present: unlimited */
std::optional<double> max_distance_to_allow_skip_waypoint;

Expand Down Expand Up @@ -111,6 +124,8 @@ class WaypointSequencer
/** (Default=3) How many steps should the condition for
* dist_check_target_is_blocked be fulfilled to raise an event */
int hysteresis_check_target_is_blocked{3};

/** @} */
};

/** Must be called before any other navigation command, and after filling in
Expand Down Expand Up @@ -285,4 +300,4 @@ class WaypointSequencer
#endif
};

} // namespace selfdriving
} // namespace selfdriving
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ using mrpt::kinematics::CVehicleVelCmd;
class VehicleMotionInterface
{
public:
using Ptr = std::shared_ptr<VehicleMotionInterface>;

VehicleMotionInterface() = default;
virtual ~VehicleMotionInterface() = default;

Expand Down Expand Up @@ -112,7 +114,6 @@ class VehicleMotionInterface
virtual bool motion_execute(
const std::optional<CVehicleVelCmd::Ptr>& immediate,
const std::optional<EnqueuedMotionCmd>& next) = 0;

};

} // namespace selfdriving

0 comments on commit 133262a

Please sign in to comment.