Teaching Assitant: HUANG, Kan Members: Chen Yau Pun, Lei Zhao, Yang Shaohui
The newest version of regarding softwares is recommended.
-
vrep_ros_bridge(already inside vrep_dep)
-
vrep_ros_interface(already inside vrep_dep)
-
Platform: Ubuntu 16.04 LTS
-
Download vrep 3.5.0
-
Add the line
export VREP_ROOT_DIR=/ChangeWithyourPathToVrep/
to ~/.bashrc -
Add the line
source /path_to_catkin_ws/catkin_ws/devel/setup.bash
to ~/.bashrc -
catkin_make
-
Go to the location of vrep and run
ln -s /YOUR_CATKIN_WS_PATH/devel/lib/libv_repExtRosBridge.so
After configing the environment, run
roscore
first. And in another terminal, run(cd to VREP_ROOT)
./vrep.sh
You should see the loading details of plugins, including ROS Bridge and ROS Interface. In V-REP, load the scene file env.ttt. You can use
rostopic list
to see the Topics of vrep. Like
rostopic echo /vrep/cmd_vel
For controling the Pioneer p3dx robot, type the following in terminal
rostopic pub -r 10 /vrep/cmd_vel geometry_msgs/Twist '{linear: {x: 1.0, y: 1.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}'
where x stand for the velocity of left wheel, and y for the left. A demo video is attached for your information.