GithubHelp home page GithubHelp logo

mpc's Introduction

基于线性模型预测控制的差速小车轨迹跟踪控制器

本仓库来源于浙江大学Fast-lab实验室的3D2M_planner项目的mpc轨迹跟踪器,笔者根据项目需求将其提取和修改作为独立的功能包,并提供使用说明。 (https://github.com/ZJU-FAST-Lab/3D2M-planner)

1. 依赖安装

(1)OSQP安装

git clone --recursive https://github.com/osqp/osqp
cd osqp
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON
make
sudo make install

(2)OSQP-Eigen安装

git clone https://github.com/robotology/osqp-eigen.git
cd osqp-eigen
mkdir build 
cd build
cmake ..
make
sudo make install

2. 编译使用

(1)下载编译

cd catkin_ws/src
git clone https://github.com/WX-James/mpc
cd .. && cakin_make

(2)文件结构

├── CMakeLists.txt
├── config
│   ├── param copy.yaml
│   └── param.yaml
├── include
│   ├── cubic_spline_planner.h
│   ├── mpc.h
│   └── mpc_utils
│       ├── minco.hpp
│       ├── poly_traj_utils.hpp
│       ├── root_finder.hpp
│       └── traj_anal.hpp
├── launch
│   └── test_mpc.launch
├── msg
│   └── Polynome.msg
├── package.xml
└── src
    ├── cubic_spline_planner.cpp
    ├── mpc.cpp
    └── mpc_node.cpp

(3)启动文件参数配置

​ launch文件:/mpc/launch/test_mpc.launch

参数 说明
arg name="odom_topic" 机器人里程Topic,用于MPC获取机器人当前位置
arg name="traj_topic" 参考轨迹Topic,消息类型是自定义类型,msg文件在/mpc/msg/Polynome.msg
arg name="cmd_topic" 差速小车的控制指令,cmd_vel:线速度和角速度

(4)MPC算法参数配置

​ 在yaml文件:/mpc/config/param.yaml中对MPC轨迹跟踪器进行具体参数配置

(5)发布参考轨迹的说明

​ 请按照自定义消息/mpc/msg/Polynome.msg来发布参考轨迹

(6)启动MPC轨迹跟踪控制器

source devel/setup.bash
roslaunch mpc test_mpc.launch

mpc's People

Contributors

wx-james avatar

Stargazers

 avatar 目的港处 avatar  avatar  avatar  avatar  avatar  avatar Li Yuanxiao avatar Wen Li avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

qiminggggg

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.