Comments (6)
Hi everyone, @zhangcaocao have you tried to calibrate your PID? normally PWM value work beetween 1ms and 2ms as a servo
maybe, you need to give the correct values in your PID instance.
#include "PID.h"
PID pid( -255, 255, 0.05, 0.9, 0.1);
/*PID(float min_val, float max_val, float kp, float ki, float kd)
* min_val = min output PID value
* max_val = max output PID value
* kp = PID - P constant
* ki = PID - I constant
* di = PID - D constant
*/
float setpoint = 30;
float measured_value = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(pid.compfoute(setpoint, measured_value));
delay(1000);
measured_value++;
}
from linorobot.
你需要自己标定pid
from linorobot.
@AllofLife ,不是标定问题好吧,而是PID的error太大了,输入到电调中电机无法正常动作。
from linorobot.
我觉得跟pid没关系啊。
源码直接把rpm写入pwm了。
问题是pwm是8位,最大也就255,rpm不一定,有可能600。
虽然PID::compute有限制范围,但我觉得应该按比例转换成pwm,而不是把rpm当做pwm。
搞不清楚作者为什么这么做。
from linorobot.
@zhangcaocao @AllofLife 大佬,能不能加个联系方式。PID整定不会,能不能指导一下。
from linorobot.
wechat r15297833965
from linorobot.
Related Issues (20)
- Platformio requires python 3.6 or newer HOT 2
- firmware not finding lino_msgs/Velocities.h HOT 2
- Big wheel low RPM speed calculation problem
- laser inflation during angular moment HOT 2
- How do I change mapping of SDA and SCL pins for IMU?
- ROS Noetic (Ubuntu 20) HOT 1
- ModuleNotFoundError: No module named 'glib' HOT 2
- Install script doesn't complete and gives "Python 3.6 or greater required" error HOT 2
- Using IMU BNO055 Sensor
- gazebo model for linorobot
- Is it possible to use 1 pwm and 1 dir driven driver in linorobot
- Changing Frequency of PWM Signal
- rplidar a3
- motor driver Model X motor drive module HOT 1
- Rebuild Inst.h from Inst.msg so that platformio sees it HOT 1
- linorobot comparability with teensy LC
- Robot h/w-related questions...
- rosserial error
- scan data infilation
- Need Two Encoders on The Wheels for ACKERMANN1?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linorobot.