How I connect the simulation in V-REP with a C code?

Typically: "How do I... ", "How can I... " questions
Post Reply
juanma92
Posts: 5
Joined: 19 Oct 2013, 00:52

How I connect the simulation in V-REP with a C code?

Post by juanma92 »

I have a problem, I can not connect a controller written in C for my robot. I don't understand how I make the connection beetween them, because I think that it's not well explain in the tutorial, anybody can help me out? Thanks..

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

Re: How I connect the simulation in V-REP with a C code?

Post by coppelia »


juanma92
Posts: 5
Joined: 19 Oct 2013, 00:52

Re: How I connect the simulation in V-REP with a C code?

Post by juanma92 »

I made that all. But I can't make that work. I copy from the "External controller tutorial" but when the simulation star appears an scrpit error. Do you why is that? Thanks

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

Re: How I connect the simulation in V-REP with a C code?

Post by coppelia »

We cannot help you when you just say: I can't make that work, or appears an script error. Seriously?
If you expect help, describe what is not working, tell us what error message appears.

Cheers

juanma92
Posts: 5
Joined: 19 Oct 2013, 00:52

Re: How I connect the simulation in V-REP with a C code?

Post by juanma92 »

Sorry about that, I just saw the strin "(script error)" in a graph, but never saw the list of errors. But when I saw your answers I looked for them and found the error. Thanks for all, and sorry again

juanma92
Posts: 5
Joined: 19 Oct 2013, 00:52

Re: How I connect the simulation in V-REP with a C code?

Post by juanma92 »

Another question. All the code from the project have to be at the installation directory's? or could be in other folder? becuse my scene is at a folder and apparently the code's that is running, run form the principal directory. Furthermore, the code in C have to be compile? how do I make it at windows? Thanks

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

Re: How I connect the simulation in V-REP with a C code?

Post by coppelia »

No, your C/C++/Java/Matlab/Python/Urbi code can run from any directory. Also, you will need a C/C++ compiler to compile your C code. Under Windows, try with VS2010 Express.

Cheers

juanma92
Posts: 5
Joined: 19 Oct 2013, 00:52

Re: How I connect the simulation in V-REP with a C code?

Post by juanma92 »

And for compile, there some MACROs that have to be defined? because I read that in a part of the usermanual, but I don't found it now.

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

Re: How I connect the simulation in V-REP with a C code?

Post by coppelia »

Have a look here

Cheers

Post Reply