Skip to content

sarahbhaskaran/cosim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cosim

Simulate a platoon of vehicles in SUMO. The lead vehicle's trajectory comes from car_vel.csv and is currently the actual trajectory of one of the testbed vehicles from Vandertest. The following vehicles can be any ordering of "human" and "av" vehicles; humans are simulated by IDM and AVs are controlled by RL controller, follower-stopper, and acceleration dynamics. The RL controller and related components run in ROS.

Setup

  1. Put repositories in catkin workspace, including this one. Most of these are private.
cd ~/catkin_ws/src
git clone git@github.com:sarahbhaskaran/cosim.git
git clone git@github.com:jmscslgroup/hoffmansubsystem
git clone git@github.com:jmscslgroup/followerstoppermax4rl
git clone git@github.com:jmscslgroup/followerstoppermax
git clone git@github.com:jmscslgroup/followerstopperth
git clone git@github.com:jmscslgroup/followerstopperth4rl
git clone git@github.com:jmscslgroup/micromodel
git clone git@github.com:jmscslgroup/trajectory_07_05_2021_real
git clone git@github.com:jmscslgroup/velocity_controller
git clone git@github.com:jmscslgroup/integrator
git clone git@github.com:jmscslgroup/margin
git clone git@github.com:jmscslgroup/can_to_ros
git clone git@github.com:jmscslgroup/transfer_pkg
git clone git@github.com:CIRCLES-consortium/algos-stack.git
git clone git@github.com:sarahbhaskaran/accel.git
cd algos-stack
git checkout setpoint_rahul
cd ..
  1. Build packages
cd ~/catkin_ws
catkin_make
source devel/setup.sh
  1. Start ROS
roscore
  1. Install python packages
conda env create --file=environment.yml

(Or if this breaks, create and activate cosim environment and install the packages found in environment.yml or as necessary based on error messages)

conda activate cosim

Run simulation

Demo at https://drive.google.com/file/d/1G0-OmXikAf056v4T7YDrOE3YGBhjOS3w/view?usp=sharing

  1. rosrun cosim demo_node.py --platoon "av human*5" Notation for declaring the platoon is same as in https://github.com/nathanlct/trajectory-training-icra; vehicles can also be listed one by one, and the current options are "av" and "human"
  2. View .png graphs generated in cosim/scripts: {}_vs_time.png {xpos, ypos, vel, headway, rel_vel, v_acts, v_acts_cmd_vels, v_refs}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published