Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Robot iB1 - Need help for PID & Raise up
05-02-2020, 09:58 AM (This post was last modified: 05-02-2020 10:01 AM by Greengecko.)
Post: #1
Bug Robot iB1 - Need help for PID & Raise up
Hi together, after building and playing around with two standard B-Robots I have printed these robot from thingiverse
https://www.thingiverse.com/thing:1424126/files

   

This robot is also based on the Devia-Board with Nema17 motors and an Arduino Nano for the Nokia 5110 Display, also a DFPlayer mini for playing mp3s when an obstacle is too close.

The robot works relativly good, but I'm sure it can be improved, specially the raise-up moment and the wobbling when it's upright. I hope that somebody with more skills like mine could explain me some values in the code to improve the code.

The best result was with the settings seen in the app screenshot.

   

And some important lines in the code

// NORMAL MODE PARAMETERS (MAXIMUN SETTINGS)
#define MAX_THROTTLE 360
#define MAX_STEERING 140
#define MAX_TARGET_ANGLE 5

// PRO MODE = MORE AGGRESSIVE (MAXIMUN SETTINGS)
#define MAX_THROTTLE_PRO 400 // Max recommended value: 860
#define MAX_STEERING_PRO 180 // Max recommended value: 280
#define MAX_TARGET_ANGLE_PRO 8

// Default control terms for EVO 2
#define KP 0.32 // 0.32
#define KD 0.050 // 0.050
#define KP_THROTTLE 0.080 // 0.080
#define KI_THROTTLE 0.1 // 0.1
#define KP_POSITION 0.06 // 0.06
#define KD_POSITION 0.45 // 0.45


// Control gains for raiseup (the raiseup movement requiere special control parameters)
#define KP_RAISEUP 0.1
#define KD_RAISEUP 0.16
#define KP_THROTTLE_RAISEUP 0
#define KI_THROTTLE_RAISEUP 0.0

#define MAX_CONTROL_OUTPUT 500
#define ITERM_MAX_ERROR 30 // Iterm windup constants for PI control
#define ITERM_MAX 10000

#define ANGLE_OFFSET 2.0

#define ZERO_SPEED 65535
#define MAX_ACCEL 12 //14

I'm sure these values can improve the driving result but don't know which values first and so on. Played around with some other values didn't give a better result. Only the angle value I have changed with success.

Wobbling ...





Raise up



Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)