Skip to content

mit-pev/pev_simulator

Repository files navigation

PEV Simulator

Simulate PEV in virtual environment, based on Gazebo and ROS.

With the simulation, it would be more friendly and accessible for those who want to take part in our PEV project that doesn’t have physical device. Also, ideas could be tested and be played around with before actually deploying on real PEV device.

Getting Started

Prerequisites

PEV Simulator works good with ROS-Kinetic and Gazebo7 on Ubuntu 16.04, other distribution may work.

Install ROS if you don’t have one. See here.

We’ll gonna need a catkin workspace. Let’s assume it is at ~/ros/kinetic_ws, you could change it to whatever you want, though.

If you don’t have one, using following command to make a catkin workspace.

mkdir -p ~/ros/kinetic_ws/src
cd ~/ros/kinetic_ws/src
catkin_init_workspace

Dependencies

  • ros-kinetic
  • gazebo7
  • move_base
  • teb_local_planner
  • joy
  • teleop_twist_joy
  • velodyne_simulator
  • timed_roslaunch
  • steer_drive_ros

Gazebo

reference: here

sudo apt-get install ros-kinetic-gazebo-dev
sudo apt-get install ros-kinetic-gazebo-plugins
sudo apt-get install ros-kinetic-gazebo-ros-control
sudo apt-get install ros-kinetic-gazebo-msgs
sudo apt-get install ros-kinetic-gazebo-ros
sudo apt-get install ros-kinetic-gazebo-ros-pkgs
sudo apt-get install gazebo7
sudo apt-get install gazebo7-common
sudo apt-get install gazebo7-plugin-base

move_base

reference: here

sudo apt-get install ros-kinetic-move-base

teb_local_planner

reference: here

sudo apt-get install ros-kinetic-teb-local-planner

joy

reference: here

sudo apt-get install ros-kinetic-joy

teleop_twist_joy

reference: here

sudo apt-get install ros-kinetic-teleop-twist-joy

Velodyne Simulator

reference: here

cd ~/ros/kinetic_ws/src
git clone https://bitbucket.org/DataspeedInc/velodyne_simulator.git
cd ..
catkin_make

Timed roslaunch

reference: here

cd ~/ros/kinetic_ws/src
git clone https://github.com/MoriKen254/timed_roslaunch
cd ..
catkin_make

Steer Drive Ros

reference: here

cd ~/ros/kinetic_ws/src
git clone https://github.com/CIR-KIT/steer_drive_ros
cd steer_drive_ros
git checkout kinetic-devel
cd ../..
catkin_make

Optional Dependencies

City simulation models

City simulation world file is modified from osrf/citysim project.

Install only if you want to play with city simulation. It is currently not stable because citysim is developed to work under gazebo9. Port it partially back to gazebo7, integrate with our PEV gazebo model.

# copy the models to gazebo model directory
cd /path/to/pev_simulator/pev_gazebo
cp -a models/. ~/.gazebo/models/

Install PEV Simulator

After install all dependencies, git clone this repo, put it into catkin workspace and then catkin_make.

cd ~/ros/kinetic_ws/src
git clone https://github.mit.edu/MediaLabPEV/pev_simulator

Run Simulation

We are ready to go. Have fun :D

Simple world with navigation and joystick control

# source ros environment fist
source ~/ros/kinetic_ws/devel/setup.bash
# then launch
roslaunch pev_gazebo_demo navigation.launch

Simple world with joystick control

# source ros environment fist
source ~/ros/kinetic_ws/devel/setup.bash
# then launch
roslaunch pev_gazebo_demo joy.launch

[Experimental] City simulation with joystick control

# source ros environment fist
source ~/ros/kinetic_ws/devel/setup.bash
# then launch
roslaunch pev_gazebo_demo joy_city.launch

Screenshots

./doc/img/playpen.png ./doc/img/citysim.png

Authors

  • ChienYu Lin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors