Page 1 of 1

New to V-rep

Posted: 08 Nov 2014, 07:54
by Hasif
Hi,
I'm new to V-rep and using V-rep simulator to do my final year project to simulate automated guided vehicle (AGV) in a hospital environment using wifi or wireless communication to send information to the agv. The information instructs the agv to move to another location. The agv will be able to navigate to another location by using path planning algorithm for the shortest or fastest way.

So far, I already know how to create a simple model but I'm having difficulties in implementing the codes and understanding the API function.

Is it possible to give me some advice or head start?

Thank you.

Re: New to V-rep

Posted: 09 Nov 2014, 16:40
by coppelia
Hello,

your question is very broad. Try to start with simple tasks, and ask questions about specific topics. Then you can assemble all the information and move on to a more complex task.

Cheers

Re: New to V-rep

Posted: 09 Nov 2014, 17:38
by Eric
Hi

That s a very good advise... I would recommend you to first do spend time doing the bubbleRob and line following bubbleRob tutorials and be sure to understand the lua code, systematically checking the definition of the "sim" instruction in the reference API.
Then you should try to study the scene PracticalPathPlanningDemo... especially the script associated to dr12_robot_. Understand how the robot calculates the path and move toward its target. You ll be able to have your robot define and follow a path toward a goal you can set the position and orientation with simSetObjectPosition and simSetObjectOrientation.

Then you ll probably need to implement a topological path planning algorithm that will supervise the position of the goal for your robot, as the hospital environment might be too big to use v-rep path planning from, for example the room the robot is on the 1st floor A102 to the room in the other building on the 4th floor C401. You ll need to define a subset of of targets to reach withing the hospital along the way to the final target room, or maybe even in each room like
_go to exit point of room A102 (room 02 of the 1st floor of building A)
_go to entry point of room A102 in the corridor corA1(corridor of the first floor building A)
_go to exit point of corridor corA1
_go to entry point of corA1 (i.e. outside the building A in front of the 1st floor corridor)
_go to entry point of cor4C (point outside the buildings, in front of the entrqnce of the corridor 4C
_go to exit point of cor4C ( now the robot is inside the C building, at the entrance of the corridor of the 4th floor)
_go to entry point of room C401
_go to exit point of C401 ( the robot is inside room C401 in the entrance)

where "go to" is like in the PracticalPathPlanningDemo scene, where v-rep computes the path planning toward the dr12_goalPosCylinder object, and control the robot to follow the path.

Cheers

Eric

Re: New to V-rep

Posted: 11 Nov 2014, 15:15
by Hasif
Thank you so much. Anyway, are there any more robot models available for me to import meshes?
And also, to my understanding, am I correct to say that if I want to create a complex or complicated model from scratch, for example, a tank, it is better to create from a modelling software such as AUTOCAD or SolidWork and import their meshes rather than create using primitive shapes which are much harder?

Re: New to V-rep

Posted: 11 Nov 2014, 15:37
by coppelia
Hello,

yes, your are right. Normally you would create the meshes of your robot in a CAD application, then export the creates meshes. Then, in V-REP, you would import the meshes and start building your robot (e.g. adding joints, creating a model hierarchy, adding sensors, etc.)

For CAD models of other robots, have a look at robot manufacturer's website. Many of them provide the CAD data of their robots. YOu might then have to convert the format to another format before being able to import the meshes.

Cheers

Re: New to V-rep

Posted: 07 Feb 2015, 02:37
by Hasif
Hi

I would like to simulate a stationary 4-wheels trolley on a flat surface but when i run the simulation, the trolley seems to slowly to either roll forward or backward as it was due to gravity.
I tried to use a cylinder and place it on the floor and it seems to roll away without any force apply. I did try to remove or set a value 0 to the principal of inertia/mass to all the pure shape of the 4 wheels and the trolley seems to be stationary but as some point when I try to collide the trolley without other pure shapes, it doesn't roll much.
I just want to simulate a real life dynamics situation where the trolley won't roll when it is stationary but when there is a collision, it will roll accordingly and stop.

Is there any solutions for this?

Thank you.

Re: New to V-rep

Posted: 08 Feb 2015, 19:45
by coppelia
you will need to add some friction in the wheel joints. If I understood you correctly, the wheel joints are dynamically enabled (in force/torque mode), but the motor is disabled. Correct?

So first, enable the motor, and set the Max. torque/force to a small value. And set the Target velocity to 0. On a slope, the wheels will still roll, but there will be a small friction that depends on the specified Max. torque/force value.

Cheers

Re: New to V-rep

Posted: 09 Feb 2015, 12:46
by Hasif
Yes. You are correct. I enable all the motors for the 4 wheel joints and put a value of 0.5 into the Max. torque/force and it works perfectly. The trolley doesn't move much when stationary but still be able to be push or tow which I want it to be.

Thank you so much.

Re: New to V-rep

Posted: 15 Feb 2015, 05:02
by Hasif
Hi

I would like to know how to flip an object to a opposite direction.

I had a screw thread model which has a clockwise direction or known as right-handed screw thread and would like this model to be flip so that it becomes anti-clockwise direction or left-handed screw thread. I had created this complicated model's pure shapes which it is very troublesome and time consuming and wouldn't like to do it again for the opposite direction screw thread.

Thank you.

Re: New to V-rep

Posted: 15 Feb 2015, 20:42
by coppelia
Hello,

this is currently not directly possible with pure shapes.

Cheers