Recommendations on getting started with VREP/Arduino

Typically: "How do I... ", "How can I... " questions
coppelia
Site Admin
Posts: 7314
Joined: 14 Dec 2012, 00:25

Re: Recommendations on getting started with VREP/Arduino

Post by coppelia » 05 Feb 2016, 10:02

Hello,

trying to do what you want with the serial port communication is difficult, since you would have to have a Arduino command decoder on the V-REP side. The demo model in V-REP does it the other way round: send motor commands to the real board.

If you want to communicate with V-REP from your arduino that has ethernet, then using the remote API is your best option.

Cheers

dnahar
Posts: 30
Joined: 07 Jan 2016, 03:03

Re: Recommendations on getting started with VREP/Arduino

Post by dnahar » 05 Feb 2016, 20:47

Hello,

So, i think i should be sending commands from VREP to real and virtual robot through serial communication.

I need to build simulation of my robot in vrep and it is similar to below example you guys have developed, can i get hold of the simulation from you and then make changes to it to make it similar to our robot. Our robot is a one long and thin tendril like. This will be a real breakthrough for us and also for VREP. Can we drive this models with anything other than the large but discrete set of joint angles you (I assume) use to specify their shape? We need to make it more continuous. I need all sorts of details on this model, how is it moving,what coding it requires etc.

Also I need more details to build a gui in vrep.

https://www.youtube.com/watch?v=ho5VPySBMJQ

Thanks,
Dixit

coppelia
Site Admin
Posts: 7314
Joined: 14 Dec 2012, 00:25

Re: Recommendations on getting started with VREP/Arduino

Post by coppelia » 07 Feb 2016, 19:30

If you look carefully, you will find the scene you mention in the demo scenes of your V-REP installation: inverseKinematicsOf144DofManipulator.ttt. You can modify everything and also create custom UIs, either by using the built-in custom UIs (which are however not ment for complicated things), or by using the UI from a plugin. There are the source code of the collada and URDF plugins, that use such UIs for instance.

Cheers

dnahar
Posts: 30
Joined: 07 Jan 2016, 03:03

Re: Recommendations on getting started with VREP/Arduino

Post by dnahar » 10 Feb 2016, 15:11

Hello,

I have started to create my GUI in Qt designer which i want to use to control both my simulation and real robot(using plugin). I am to use serial communication to send commands to/fro from vrep to arduino. Could you outline me a step by step procedure for doing this?

I am trying to understand about using plugins with programming/v_repExtPluginSkeleton, collada and urdf plugin for gui, but looks tough. Can you help me here on a basic level how the communication flow works?

Your simulation inverseKinematicsOf144DofManipulator.ttt is of great help for us. We are building our simulation on it. We want to know the inverse kinematics calculations of this simulation. We want to see what results have been sent to the simulation to achieve a position/orientation as we may have to develop our own.

Thanks,
Dixit

coppelia
Site Admin
Posts: 7314
Joined: 14 Dec 2012, 00:25

Re: Recommendations on getting started with VREP/Arduino

Post by coppelia » 11 Feb 2016, 11:45

Dixit,

you should try to go step-by-step. TRying to make everything at once will be tough.
You can read the joint positions of all your joints in the mechanism with simGetJointPosition. Do this in the sensing phase of a non-threaded child script (or schedule a threaded child script to be active in the sensing phase).

In your case, try first to do things without plugin, by having a child script communicate with your arduino. Then build on top of that.

Cheers

dnahar
Posts: 30
Joined: 07 Jan 2016, 03:03

Re: Recommendations on getting started with VREP/Arduino

Post by dnahar » 23 Feb 2016, 07:22

Hello,

I looked at UI plugin of Collada and URDF. It is very difficult to adopt the code and make my gui on top of this. Could you tell me a simpler way how to write a plugin for my Qt GUI to control the real robot? (i went through other plugin tutorials with same difficulty)

Thanks,
Dixit

coppelia
Site Admin
Posts: 7314
Joined: 14 Dec 2012, 00:25

Re: Recommendations on getting started with VREP/Arduino

Post by coppelia » 23 Feb 2016, 10:19

there is no other way to do what you want with a plugin. What exactly is the difficulty?

Cheers

dnahar
Posts: 30
Joined: 07 Jan 2016, 03:03

Re: Recommendations on getting started with VREP/Arduino

Post by dnahar » 23 Feb 2016, 17:45

Hello,

The problem is not with the plugin. It looks promising. I dont know how to write a plugin for my gui in Qt. I coundnt unserstand from the tutorials either on how to write a plugin for Qt GUI.

Set of instructions on how to do it would be of great help.

Also,

My robot is similar to inverseKinematicsOf144DofManipulator.ttt

I want to know where is the inverse kinematics calculations of above simulation, so i can tweak it for my use. As i see in the calculation module of above simulation, it says IK group[containing 4 ik elements(s)] is active for inverse kinematics. Can you tell me where is this and how to analyse it?

Thanks,
Dixit

coppelia
Site Admin
Posts: 7314
Joined: 14 Dec 2012, 00:25

Re: Recommendations on getting started with VREP/Arduino

Post by coppelia » 24 Feb 2016, 09:47

Regarding Qt, I suggest you follow a few tutorials from the many available.

About the Ik functionality. Most details can be found here. The dialog you are looking for is located here.

Cheers

dnahar
Posts: 30
Joined: 07 Jan 2016, 03:03

Re: Recommendations on getting started with VREP/Arduino

Post by dnahar » 28 Feb 2016, 22:42

Hello,

I have done something with my simulation and background has become all dark greyish and the simulation has become weirdly hanging or connected? I am not getting the default background and simulation settings.

Thanks,
Dixit

Post Reply