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.
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
- ros-kinetic
- gazebo7
- move_base
- teb_local_planner
- joy
- teleop_twist_joy
- velodyne_simulator
- timed_roslaunch
- steer_drive_ros
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-basereference: here
sudo apt-get install ros-kinetic-move-basereference: here
sudo apt-get install ros-kinetic-teb-local-plannerreference: here
sudo apt-get install ros-kinetic-joyreference: here
sudo apt-get install ros-kinetic-teleop-twist-joyreference: here
cd ~/ros/kinetic_ws/src
git clone https://bitbucket.org/DataspeedInc/velodyne_simulator.git
cd ..
catkin_makereference: here
cd ~/ros/kinetic_ws/src
git clone https://github.com/MoriKen254/timed_roslaunch
cd ..
catkin_makereference: 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_makeCity 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/
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
We are ready to go. Have fun :D
# source ros environment fist source ~/ros/kinetic_ws/devel/setup.bash # then launch roslaunch pev_gazebo_demo navigation.launch
# source ros environment fist source ~/ros/kinetic_ws/devel/setup.bash # then launch roslaunch pev_gazebo_demo joy.launch
# source ros environment fist source ~/ros/kinetic_ws/devel/setup.bash # then launch roslaunch pev_gazebo_demo joy_city.launch
- ChienYu Lin

