Tutorial on the V-REP and Matlab Interface using ROS

posted Jan 11, 2016, 12:13 PM by Hyungju Andy Park   [ updated Jan 11, 2016, 12:13 PM ]

Setting up V-REP and Matlab Robotics System Toolbox with ROS

Andy Park @ Purdue University

Last update date: Nov 20th, 2015

Here are some list of the steps that are necessary to set up the tools to simulate different types of robots in V-REP environment from MATLAB using ROS. I will first list what I can think of right now so please feel free to leave some questions or comments so we can keep this steps more organized and clearly laid out.

Possible settings:

a computer running ubuntu 14.04 LTS for ROS and V-REP + another computer with any OS running matlab R2015a/b with robotics system toolbox
one computer running ubuntu 14.04 for ROS + V-REP + matlab

  1. Install V-REP simulation software
    Use the following link to download V-Rep software:
    http://www.coppeliarobotics.com/downloads.html

  2. Install a V-REP ROS Bridge package
    Follow the instructions from these links:
    http://wiki.ros.org/vrep_ros_bridge
    https://github.com/lagadic/vrep_ros_bridge

  3. Install ROS custom message in MATLAB
    We need to build custom messages that are used for V-REP ROS bridge so that we can receive/send those messages from matlab too. Please follow the instructions from the following link:
    http://www.mathworks.com/matlabcentral/fileexchange/49810-robotics-system-toolbox-interface-for-ros-custom-messages

  4. Test subscribing/publishing ros topics in MATLAB from example scenes of V-REP
    run “roscore” first and start V-REP simulator
    try opening the example scenes provided by V-Rep ROS Bridge package:
    https://github.com/lagadic/vrep_ros_bridge/tree/master/SceneVrep
    check the following in MATLAB

rosinit
rostopic list
check if you see topics with “/vrep/…”

Other notes

If we want to import our own model (e.g. an ABB arm) or use some other robots in V-REP, then please follow the instruction in http://wiki.ros.org/vrep_ros_bridge to enable handlers appropriate for the robot model. The list of handlers can be found from the link:

  • Robots:
    • Manipulators and mobile robots (manipulator_handler)
      • Quadrotors (quadrotor_handler)
  • Sensors:
    • Vision sensor (camera_handler)
    • IMU sensor (imu_handler)
      and this is the list of the handlers to control and describe the simulation:
  • Rigid body handler: (rigid_body_handler)
    • Pose: Set/Get pose
    • Twist: Set/Get Twist

Questions

1-1 of 1

Comments