V-rep is a software that can visualize robot motion. It is based on a distributed control architecture: each object/model can be individually controlled via an embedded script, a plugin, a ROS or BlueZero node, a remote API client, or a custom solution. In this project, two sences that contain script to commulate with simulator will be provided. For the latest version of V-rep, please download it from the V-rep official website: http://www.coppeliarobotics.com.
To open the scece in Vrep, click the File button at the top-left screen. And then click the open scene to choose the scene. The scene for milestone 1 should be a end-effector scene. The scene for milestone 2 should be a scene that have entire robot arm. And the size of the object in these scenes are identical to the end-effector and physical arm.
You might have noticed that the uArm model in V-REP is slightly different from the real robot. The uArm model in V-REP model omitted some closed-loop link due to technical issue with V-REP dynamic engine. Instead, we calculates θaux all the time and actuates the auxiliary joint to keeps the end-effector horizontal.
As the result, the V-REP model can fully simulate the kinematics of the real uArm robot.
To load your csv file into the V-rep, first, you will need to know your csv path. It should be something like /XXX/XXX.csv (for MacOS) or \XXX\XXX.csv (for Windows). Once you get the path, open the scene in V-rep and go to the script window. In the script, find the keyword “filepath” and replace it by your own csv path. Finally, close the script window and press the play button to start the simulation.
After you have complete loading csv file and start simulation, the script will start to parse your csv file and store the data into a matrix form in Vrep. And then, the simulator will start to read the first row in the matrix and check whether it exceed the joint limit or not. If the values are not exceed the joint limit, simulator will assign the value into the joint of robot (joint limit checking is only for milestone 2 only). At this moment, you can see the robot start to move in the screen. Once the simulator finish first assignment (assign first row values), it will repeat the same procedure row by row until the last row. In the end, the simulatior will pause the simulation.
If you want to change the initial cube configuration in V-REP, you can do as the following step:
V-REP has built-in video recorder for you to record screenshot videos. Follow the video tutorial below to get started.