Go to the documentation of this file. 1 #ifndef SEGMENT_CONTROLLER_H
2 #define SEGMENT_CONTROLLER_H
6 #include <geometry_msgs/Twist.h>
7 #include <nav_msgs/Odometry.h>
8 #include <nav_msgs/Path.h>
9 #include <tuw_multi_robot_msgs/RobotInfo.h>
49 void setPath(std::shared_ptr<std::vector<PathPoint>> _path);
84 void setPID(
float _Kp,
float _Ki,
float _Kd);
119 std::shared_ptr<std::vector<PathPoint>>
path_;
143 #endif // CONTROLLER_NODE_H
float absolute(float _val)
std::vector< PathPrecondition > precondition
void setPath(std::shared_ptr< std::vector< PathPoint >> _path)
Set the path the contorler has to follow.
std::vector< int > actualPreconditions
struct velocity_controller::PathPrecondition_t PathPrecondition
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.
struct velocity_controller::Point_t PathPoint
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)