Skip to content

Instructions for using this repository

Shubh Agrawal edited this page Jun 27, 2020 · 1 revision

Running Instructions For The Controller Code (Ubuntu 16.04)

  • Clone the path tracking simulation in your workspace src and catkin make

  • Run the demo.launch file for launching the gazebo sim and rviz

  • Run the Path Publisher and change the offset of the path if required after running the code.

  • Run any one of the three codes for Controller:

    1. PID_velocity_controller
    2. PID_MIT_velocity_controller
    3. AdpPID_velocity_controller
  • Run any one of the Path tracking routine:

    1. Pure Pursuit
    2. Stanley Controller
    3. PID_steering

Running Instructions For The Controller Code (Ubuntu 14.04)

The repository uses gazebo 8.0 dependent simulator, hence it would be not possible to build/run the simulator as a catkin package in ros-indigo system (limitation for ubuntu 14.04)

Please use the following instructions:

Demo of Prius in ROS/GAZEBO from a docker file

This is a simulation of a Prius in gazebo 8 with sensor data being published using ROS kinetic The car's throttle, brake, steering, and gear shifting are controlled by publishing a ROS message. A ROS node allows driving with a gamepad or joystick.

Requirements

Building (If using DockerFile)

Run the script build_demo.bash. It builds a docker image with the local source code inside.

$ cd car_demo
$ ./build_demo.bash

Pulling Image (If you are lazy to build one)

Pull the image either from author's dockerhub repo or original repo. Original repo will contain only the vanilla layers. Author might add some layers to the image as required

$ sudo docker pull system32/car_demo

OR

$ sudo docker pull osrf/car_demo

Running

Use the script run_demo.bash to run the demo.

$ ./run_demo.bash

If you want to run RVIZ on your own PC, then accordingly modify the the container or image, whichever seems easy.

An RVIZ window will open showing the car and sensor output. A gazebo window will appear showing the simulation. Either use the controller to drive the prius around the world, or click on the gazebo window and use the WASD keys to drive the car.

After a successfull launch, you should be able to see rostopics upon listing on the host terminal. Also, check echo for /clock. If no messages are received, then there's a problem with your launch commands. If the simulator runs without any issue, you can go ahead with subscribing/publishing to topics.

** Once the simulator successfully runs using the run_demo.bash script, go ahead with the Ubuntu 16.04 steps for running the controller. **