12 #include <mrpt/kinematics/CVehicleVelCmd.h> 13 #include <mrpt/rtti/CObject.h> 14 #include <mrpt/system/COutputLogger.h> 18 using mrpt::kinematics::CVehicleVelCmd;
53 public mrpt::rtti::CObject
59 :
mrpt::system::COutputLogger(
"VehicleMotionInterface")
126 virtual bool motion_execute(
127 const std::optional<CVehicleVelCmd::Ptr>& immediate,
128 const std::optional<EnqueuedMotionCmd>& next) = 0;
152 virtual std::optional<VehicleOdometryState>
161 virtual void stop(
const STOP_TYPE stopType) = 0;
165 MRPT_LOG_INFO(
"Default stop_watchdog() called.");
168 [[maybe_unused]]
const size_t periodMilliseconds)
170 MRPT_LOG_INFO(
"Default start_watchdog() called.");
175 virtual double robot_time()
const {
return mrpt::Clock::nowDouble(); }
185 MRPT_LOG_WARN(
"Default on_nav_end_due_to_error() called.");
193 MRPT_LOG_WARN(
"Default on_nav_start() event handler called.");
202 MRPT_LOG_WARN(
"Default on_nav_end() event handler called.");
217 MRPT_LOG_WARN(
"Default on_path_seems_blocked() event handler called.");
226 MRPT_LOG_WARN(
"Default on_apparent_collision() event handler called.");
235 const size_t waypoint_index,
bool reached_skipped)
238 "Default on_waypoint_reached() index = %zu event " 239 "handler called (event='%s').",
240 waypoint_index, reached_skipped ?
"reached" :
"skipped");
249 MRPT_LOG_WARN(
"Default on_apparent_collision() event handler called.");
Definition: VehicleOdometryState.h:18
virtual void on_nav_start()
Callback upon starting a new waypointsequence navigation.
Definition: VehicleMotionInterface.h:191
virtual bool enqeued_motion_timed_out() const
Definition: VehicleMotionInterface.h:145
virtual void stop_watchdog()
Definition: VehicleMotionInterface.h:163
Definition: VehicleMotionInterface.h:52
virtual void on_nav_end()
Callback if navigation ended by an accepted trigger or reached the last specified waypoint...
Definition: VehicleMotionInterface.h:200
Definition: bestTrajectory.h:15
virtual void on_path_seems_blocked()
Callback for when NavEngine cannot make progress to get increasingly closer to the final target durin...
Definition: VehicleMotionInterface.h:215
virtual void on_cannot_get_closer_to_blocked_target()
Callback when NavEngine cannot reach a specified target location because there are obstacles at the s...
Definition: VehicleMotionInterface.h:247
virtual bool supports_enqeued_motions() const
Definition: VehicleMotionInterface.h:133
virtual void on_apparent_collision()
Callback when the NavEngine predicts a collision with an obstacle and needed to issue a stop command...
Definition: VehicleMotionInterface.h:224
VehicleMotionInterface()
Definition: VehicleMotionInterface.h:58
virtual std::optional< VehicleOdometryState > enqued_motion_last_odom_when_triggered() const
Definition: VehicleMotionInterface.h:153
virtual void start_watchdog([[maybe_unused]] const size_t periodMilliseconds)
Definition: VehicleMotionInterface.h:167
virtual void on_waypoint_reached(const size_t waypoint_index, bool reached_skipped)
Callback upon reaching a waypoint in a waypoint sequeunce. Mostly used for logging.
Definition: VehicleMotionInterface.h:234
virtual bool enqeued_motion_pending() const
Definition: VehicleMotionInterface.h:139
virtual void on_nav_end_due_to_error()
Callback if current navigation ended due to some error.
Definition: VehicleMotionInterface.h:183
STOP_TYPE
Definition: VehicleMotionInterface.h:20
virtual double robot_time() const
Definition: VehicleMotionInterface.h:175
Definition: VehicleLocalizationState.h:20