DO SLAM based on ROS in V-REP environment https://youtu.be/l-TuIQq4o6I
ROS version: Kinetic
V-REP version: V-REP_PRO_V3_6_2_Ubuntu16_04
install V-REP
cd ~
https://www.coppeliarobotics.com/files/V-REP_PRO_V3_6_2_Ubuntu16_04.tar.xz
tar xf V-REP_PRO_V3_6_2_Ubuntu16_04.tar.xz
mv V-REP_PRO_V3_6_2_Ubuntu16_04 V-REP
roscore
open another terminal
cd ~/V-REP
./vrep.sh
open scene "env.ttt" and press START button, open another ternimal
rostopic list
you can see the rostopics below:
/rosout
/rosout_agg
/tf
/vrep/camera_switch
/vrep/cmd_vel
/vrep/image
/vrep/laser_switch
/vrep/scan
we build a ros package named "key_teleop"
rosmake key_teleop
open another terminal
rosrun key_teleop key_teleop.py
"Key_teleop" is a node that will public message "geometry_msgs/Twist" to topic "/vrep/cmd_vel"
We use hector slam to build the 2D grid map
sudo apt-get install ros-kinetic-hector-slam
open another terminal
roslaunch hector_slam_mapping.launch
By moving the robot with keyboard, hector_slam will build the grid map.
rosmake opencv_detector
move to the "opencv_detector/launch" folder
roslaunch facedetector.launch
move to the "src" folder
rosmake image_marker
rosrun image_marker image_marker
rosmake visual_servo
rosrun visual_servo follow_ball
rosmake loaction_judge
rosrun location_judge location_judge
roslaunch launch_all.launch
You can launch all nodes at once