Turtlesim c++ package for drawing
This project has 3 Packages:
- turtle_go position control used to send cmd_vel to turtlesim and recive pose of the robot i implement this with oop to avoid working with nasty global variable
- turtle_sub_cmdvel* just used to subscribe for cmd_vel and print it out
I used GeoGebra to determine hardpoints of letters like following
Playing with configuration parameters should be done with caution, as they can cause instability.
/******************************************************************************
* Configuration
*******************************************************************************/
#define VEL 0.5
#define SWITCHING_VEL 2
#define POSE_TOLERANCE 0.1
#define DISTANCE_TOLERANCE 0.0001
#define ANGLE_TOLERANCE 0.0001
/* PID linear velocity output constrain */
#define PID_MIN_LINEAR_VEL -5
#define PID_MAX_LINEAR_VEL 5
/* PID angular velocity output constrain */
#define PID_MIN_ANGULAR_VEL -2
#define PID_MAX_ANGULAR_VEL 2
/* PID param of Distance */
#define PID_LINEAR_KP 10
#define PID_LINEAR_KI 0
#define PID_LINEAR_KD 8
/* PID param of Angle */
#define PID_ANGLE_KP 10
#define PID_ANGLE_KI 0
#define PID_ANGLE_KD 9
There are some problems I took into consideration while implementing PID, like output constraints and integral windup (output saturation).
- Make anther node with python (Matplotlib) to plot data in runtime
- Add derivative filter for PID
- Runtime configuration for PID parameters
- Implement discrete PID