Giter Site home page Giter Site logo

erha527 / mpc_tracker_ros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kohonda/mpc_tracker_ros

0.0 0.0 0.0 3.72 MB

Trajectory Tracking Controller for ROS Package Using Nonlinear Model Predictive Control (MPC) with C/GMRES Method

License: BSD 3-Clause "New" or "Revised" License

Shell 0.24% C++ 88.20% Python 10.94% CMake 0.61%

mpc_tracker_ros's Introduction

mpc_tracker_ros

Motion Controller for trajectory tracking Using Nonlinear Model Predictive Control (MPC) with C/GMRES Method.

Control target: two-wheel differential drive mobile robot

Outputted control input: twist.x and twist.yaw

Requirements

  • Ubuntu 18.04 or 20.04
  • gcc 7.50 or higher
  • cmake 3.0.2 or higher
  • ROS Melodic or Noetic

Third Party

Pre-Installation

sudo apt update

sudo apt install libeigen3-dev

sudo apt install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin

sudo apt install -y python3-colcon-common-extensions

sudo apt install python3-matplotlib, python3-numpy

How to Build

mkdir ~catkin_ws/src -p

cd catkin_ws/src

git clone [email protected]:kohonda/mpc_tracker_ros.git

cd ..

rosdep update

rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release 

How to test by offline simulation

cd catkin_ws/src

./mpc_tracker_ros/scripts/offline_simulation.sh

Then, start simulation with real-time plot and get the simulation result at mpc_tracker_ros/simulation/simulation_result/result.csv after termination.

offline_simulation_movie_sinwave

How to launch ROS node

cd catkin_ws

source install/setup.bash

roslaunch mpc_tracker mpc_tracker.launch

I/O

Node [/mpc_tracker]
Publications: 
 * /twist_cmd [geometry_msgs/Twist] : calculated control input (twist.yaw, twist.x)
 * /mpc_tracker/F_norm [std_msgs/Float32] : Deviation from KKT conditions
 * /mpc_tracker/calculation_time [std_msgs/Float32]
 * /mpc_tracker/cmd_twist_x [std_msgs/Float32] : for visualization
 * /mpc_tracker/cmd_twist_yaw [std_msgs/Float32] : : for visualization
 * /mpc_tracker/predictive_pose [visualization_msgs/MarkerArray] : for visualization
 * /mpc_tracker/robot_twist_x [std_msgs/Float32] : for visualization
 * /mpc_tracker/robot_twist_yaw [std_msgs/Float32] : for visualization
 * /rosout [rosgraph_msgs/Log]

Subscriptions: 
 * /odom [nav_msgs/Odometry] : observed Twist of the robot
 * /reference_path [nav_msgs/Path] : reference path in map coordinate
 * /tf [tf2_msgs/TFMessage] : observed Pose of the robot in map coordinate

mpc_tracker_ros's People

Contributors

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