35 #include "dwb_critics/twirling.hpp"
36 #include "pluginlib/class_list_macros.hpp"
40 void TwirlingCritic::onInit()
42 auto node = node_.lock();
44 throw std::runtime_error{
"Failed to lock node"};
47 node->get_parameter(dwb_plugin_name_ +
"." + name_ +
".scale", scale_);
52 return fabs(traj.velocity.theta);
Evaluates a Trajectory2D to produce a score.
Penalize trajectories with rotational velocities.
double scoreTrajectory(const dwb_msgs::msg::Trajectory2D &traj) override
Return a raw score for the given trajectory.