Skip to content

prl-mushr/mushr_pixelart_mpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mushr_pixelart_mpc

This repository hosts the MPC for the MuSHR Pixel Art Project. This MPC is built on mushr_rhc.

Tutorial

The following tutorial goes through installing/running the car.

Installing on the car

Note: if you are using the mushr image you can just clone the repo into ~/catkin_ws/src and it should work out of the box

Get pip:

sudo apt install python-pip

To run this module on the car, you need a few packages. To get them download the wheel file for torch from nvidia:

$ wget https://nvidia.box.com/shared/static/m6vy0c7rs8t1alrt9dqf7yt1z587d1jk.whl -O torch-1.1.0a0+b457266-cp27-cp27mu-linux_aarch64.whl
$ pip install torch-1.1.0a0+b457266-cp27-cp27mu-linux_aarch64.whl

Then get the future package:

pip install future

Then get the python packages necessary:

$ sudo apt install python-scipy
$ sudo apt install python-networkx
$ sudo apt install python-sklearn

librhc Layout

librhc (mushr_rhc_ros/src/librhc) is the core MPC code, with the other source being ROS interfacing code. The main components are:

  • Cost function (librhc/cost): Takes into account the cost-to-go, collisions and other information to produce a cost for a set of trajectories.
  • Model (librhc/model): A model of the car, currenly using the kinematic bicycle model.
  • Trajectory generation (librhc/trajgen): Strategies for generating trajectory libraries for MPC to evaluate.
  • World Representation (librhc/workrep): An occupancy grid based representation for the map.

mushr_rhc_ros ROS API

Publishers

Topic Type Description
/rhcontroller/markers visualization_msgs/Marker Halton points sampled in the map (for debugging purposes).
/rhcontroller/traj_chosen geometry_msgs/PoseArray The lowest cost trajectory (for debuggin purposes).
/car/mux/ackermann_cmd_mux/input/navigation ackermann_msgs/AckermannDriveStamped The lowest cost control to apply on the car.

Subscribers

Topic Type Description
/map_metadata nav_msgs/MapMetaData Uses dimension and resolution to create occupancy grid.
/move_base_simple/goal geometry_msgs/PoseStamped Goal to compute path to.
/car/car_pose geometry_msgs/PoseStamped When using simulated car pose Current pose of the car.
/car/pf/inferred_pose geometry_msgs/PoseStamped When using particle filter for localization Current pose of the car.

Services

Topic Type Description
/rhcontroller/reset/hard std_srvs/Empty Creates a new instance of the MPC object, redoing all initialization computation.
/rhcontroller/reset/soft std_srvs/Empty Resets parameters only, not redoing initialization.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published