Go to the documentation of this file.
12 goodId = tuw_multi_robot_msgs::RobotInfo::GOOD_EMPTY;
21 robot_status = tuw_multi_robot_msgs::RobotInfo::STATUS_DRIVING;
46 for (
const auto & pc : p.precondition )
54 if(count <= pc.stepCondition)
72 if ( pathCounter_ < path_->size() )
83 ROS_INFO(
"Multi Robot Controller: goal reached" );
84 robot_status = tuw_multi_robot_msgs::RobotInfo::STATUS_DONE;
115 float d_theta_comp = M_PI / 2 + d_theta;
117 float turn_radius_to_goal =
absolute( distance_to_goal / 2 / cos( d_theta_comp ) );
134 if (
absolute( d_theta ) > M_PI / 4 )
138 else if ( turn_radius_to_goal < 10 * distance_to_goal )
140 float v_h = turn_radius_to_goal *
absolute(
w_ );
168 while ( _angle > M_PI )
173 while ( _angle < -M_PI )
float absolute(float _val)
void setPath(std::shared_ptr< std::vector< PathPoint >> _path)
Set the path the contorler has to follow.
std::vector< int > actualPreconditions
void getSpeed(float *_v, float *_w)
Returns the current speed values.
int getCount()
Returns the checkpoint number the robot is in.
void setSpeedParams(float _max_v, float _max_w)
Set the Speed Params of the controller.
void setState(state s)
Set the State (run stop step wait_step)
void setPID(float _Kp, float _Ki, float _Kd)
sets the control parameters
enum velocity_controller::state_t state
std::shared_ptr< std::vector< PathPoint > > path_
void update(PathPoint _odom, float _delta_t)
updates the controller with the current robot position
void setGoalRadius(float _r)
Set the Goal Radius.
SegmentController()
Construct a new Segment Controller object.
bool checkGoal(PathPoint _odom)
bool checkPrecondition(PathPoint p)
void updatePrecondition(PathPrecondition pc)
updates the sync step of other robots
float normalizeAngle(float _angle)