Skip to content

GlitchBountyHunter/turtle-draw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Turtle_go

Turtlesim c++ package for drawing

Coding

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

Hardpoint coordinates

I used GeoGebra to determine hardpoints of letters like following

Coding



Record the slope from vector and length from segment for each line.

Coding

Terminal output

Coding

RQT Graph

Coding

PID configuration

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).

Coding

Coding

Future work

  • Make anther node with python (Matplotlib) to plot data in runtime
  • Add derivative filter for PID
  • Runtime configuration for PID parameters
  • Implement discrete PID

Referance

turtle-draw

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published