Code for running vrep simulations of Biomimetic Millisystems Lab robots with ROS
- Install v-rep 3.3.2 rev3
- Install catkin tools
- apt-get install ros-indigo-joy (if not already installed)
- export environment variable VREP_ROOT with the full path to the vrep dir, and
export PATH=$PATH:VREP\ROOT
to your bashrc - Copy the
coop_slam
folder from the Dropbox into VREP_ROOT - replace VREP_ROOT/programming/ros_packages/v_repExtRosInterface with repo at github.com/biomimetics/v_repExtRosInterface.git
- make a catkin workspace
- have this repo and a symbolic link to the vrep/programming/ros_packages folder in the src directory of the catkin workspace
- run
catkin build
(not catkin_make) from workspace root - symbolic link from workspace/devel/lib/libv_repExtRosInterface.so in VREP_ROOT
- In VREP_ROOT/programming/v_repExtRemoteApi add
-DNON_MATLAB_PARSING -DMAX_EXT_API_CONNECTIONS=255
to makefileCFLAGS
variable. Replace all spaces on indented lines with single tabs. - run
make
from VREP_ROOT/programming/v_repExtRemoteApi (this creates a new libv_repExtRemoteApi.so in thelib
directory) - make symbolic link to new libv_repExtRemoteApi.so in VREP_ROOT (delete or rename the original)
- make symbolic link to new libv_repExtRemoteApi.so in bml_vrep/src named
remoteApi.so
- run roscore
- run vrep.sh
- roslaunch bml_vrep vrep_interface.launch
- Install v-rep 3.2.2
- Install packages ros-indigo-ar-track-alvar, ros-indigo-keyboard, ros-indigo-teleop-twist-keyboard
- Add environment variable VREP_ROOT_DIR to bashrc that points to v-rep isntall directory
- Add VREP_ROOT_DIR to path
- Put ar_tag.ttt in VREP_ROOT_DIR/scenes and bubble_rob_laser.ttm in VREP_ROOT_DIR/models/robots/mobile
- Create ROS workspace and add this repo, as well as a symbolic link to the full path to VREP_ROOT_DIR/programming/ros_packages to the worspace src directory
- Create a symbolic link to VREP_ROOT_DIR/programming/ros_packages/ros_bubble_rob/include/v_repConst.h in this repo's include directory
- Create a symbolic link to VREP_ROOT_DIR/vrep.sh in this repo's src directory
- roslaunch bml_vrep demo.launch
- (in a separate terminal for each robot, replace n with robot number) roslaunch bml_vrep keyboard_input.launch robot=robot_n. You'll probably want to lower the speed to prevent the robots from falling over.
- To quit, find the keyboard input window (should have a keyboard icon in the taskbar) and enter q in it before ctrl-c killing everything else