Skip to content
forked from ecward/car_demo

modified version of the simulator car_demo for research concept vehicle (RCV) at KTH

Notifications You must be signed in to change notification settings

txzhao/car_demo

 
 

Repository files navigation

Demo of RCV in ROS/GAZEBO

This is a simulation of a KTH Research Concept Vehicle (RCV) in gazebo 8 with sensor data being published using ROS kinetic. The RCV's four-wheel torques, curvature and crabbing angle are controlled by publishing a ROS message. A ROS node allows controlling the RCV to follow a predefined path.

This repo also serves as the RCV simulator for the project course EL2425 Automatic Control, Project Course at KTH. To get more information about the project and how to control the real RCV, please go to this repo.

Detailed origins

Graph of ROS nodes

Rosgraph

Why this repo?

Integrated Transport Research Lab (ITRL) aims to perform automatic control algorithms to the RCV and conduct experiments to test its performance. Since testing on the real RCV takes quite a lot of time and efforts, a RCV simulator is highly needed for pre-testing purpose.

Given the demands, this repo modifies a similar open-source work car_demo and partially changes the Toyota car's inner dynamics to match with that of RCV, and then performs several automatic controllers to control the car. Centralized configuration and evaluation tools are also developed to improve user experience.

Changes from previous work

  • Inner dynamics (weight, dimension etc.): Toyota car -> RCV;
  • Interface: throttle, brake, shift_gear, steer -> four-wheel torques, curvature and crabbing angle.
  • Joystick control (manual) -> PI control (velocity) + pure pursuit / MPC (path follow).
  • State visualization in real time.

Video + Pictures

The video of simulaton and real RCV control test could be found here.

Screenshot of RCV model

Requirements

  • Ubuntu Xenial (16.04)
  • ROS Kinetic Kame
  • Gazebo 8.0.0
  • Dependencies: ros-kinetic-desktop-full, ros-kinetic-fake-localization, ros-kinetic-joy
  • QP solver: CVXOPT

For detailed instructions of installation, please turn to this file for help (ubuntu system).

How to run

First clone this repo into the src folder of your catkin workspace. Then in the toplevel catkin workspace folder, run the following command in the terminal

$ catkin_make
$ source devel/setup.sh
$ roslaunch car_demo rcv_sim.launch visual:=true

Now, the simulator along with a simple live plot which records RCV's current position and predefined path should show up. If you want to disable the live plot, simply replace the last command line with roslaunch car_demo rcv_sim.launch.

To run the controller, open another terminal window and run rosrun car_demo move.py.

Configurations

When started, both of the simulator and live plot will first read the centralized configurations in config.ini. This file contains all the related parameters of the simulator, live plot and controllers. You can try tuning these parameters to see how they may influence the performances in simulation.

Logs

The states of RCV are stored in a .csv file in /logs. You can retrieve and use them to further verify your controller.

Results

Straight Line + Pure Pursuit

Zigzag + Pure Pursuit

Circle + Pure Pursuit

About

modified version of the simulator car_demo for research concept vehicle (RCV) at KTH

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 66.8%
  • Python 27.5%
  • CMake 5.1%
  • Shell 0.6%