Code Monkey home page Code Monkey logo

tractor-control's Introduction

tractor-control

installation

conda activate capac

pip install pyserial
pip install pynmea2
pip install canlib

pip install keyboard==0.13.5
pip install pynput==1.7.6

sudo apt install ros-melodic-can-msgs

run driver

  • run rtk only (with ROS publish)
python driver/rtk.py
  • run imu only (with ROS publish)
python driver/imu.py
  • run can with keyboard (without ROS publish)
python run_keyboard.py
  • run rtk and can (with ROS publish)
python run_driver.py

real control

  1. roscore
roscore
  1. step 1: keyboard backup
python run_keyboard.py
  1. step 2: pid control
  • rtk
python run_argi.py pid
  • visual
# python run_argi.py pid-visual --pseudo
python run_argi.py pid-visual
  1. step 3: record data
rosbag record -a

simulation

pip install osqp==0.6.2.post0

自动驾驶轨迹跟踪(一)-模型预测控制(MPC)代码实现

自动驾驶轨迹跟踪-模型预测控制(MPC)

code mpc linear

python -m carla_utils.config -x /home/ff/github/zdk/tractor-control/envs/drift_map/train.xodr

real

rtk:

sudo chown zdk:zdk /dev/ttyUSB0
python rtk_driver/rtk_driver.py

latitude: 30.258824339333334 longitude: 119.72750057183333

D. front: 1.49 left 0.5 up 2.33

E. -90

F. front: 0.09 left: 0.46 up: 1.3

1.17 wheelbase 1.07

rosrun rviz rviz -d ~/github/zdk/tractor-control/envs/agri.rviz

dead zone: -12.0 19.0

controller


rwfb:
metric:  error path, max: 0.1227, min: 0.0, mean: 0.0043, last: 0.0001, ratio: 94.76 %

rwfb real:
metric:  error path, max: 0.1567, min: 0.0, mean: 0.0066, last: 0.0002, ratio: 92.08 %


pid:
metric:  error path, max: 0.1135, min: 0.0, mean: 0.0055, last: 0.0001, ratio: 91.32000000000001 %
pid real:
metric:  error path, max: 0.1392, min: 0.0, mean: 0.0116, last: 0.0111, ratio: 81.6 %


pid new param, one-order delay 0.95:
metric:  error path, max: 0.1174, min: 0.0, mean: 0.0057, last: 0.0001, ratio: 92.84 %

pid new param, one-order delay 0.95, real:
metric:  error path, max: 0.1659, min: 0.0, mean: 0.0089, last: 0.0002, ratio: 91.47999999999999 %

pid new param, one-order delay 0.95, zero-order delay 10:
metric:  error path, max: 0.3154, min: 0.0, mean: 0.0144, last: 0.0001, ratio: 89.44 %

metric:  error path, max: 0.5259, min: 0.0, mean: 0.0506, last: 0.0476, ratio: 57.04 %

tractor-control's People

Contributors

zhangdongkun98 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.