Simple.c example libgazebo

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple.c example libgazebo

tejera
Hi all,

I have the last version in svn of gazebo and I'm trying to compile the simple.c file from this link --> http://playerstage.sourceforge.net/doc/Gazebo-manual-cvs-html/libgazebo_usage.html .


After a lot of problems with the includes, I can't compile it. The log is the next:

simple.c: In function ‘int main(int, char**)’:
simple.c:14: error: ‘gz_client_t’ was not declared in this scope
simple.c:14: error: ‘client’ was not declared in this scope
simple.c:15: error: ‘gz_position_t’ was not declared in this scope
simple.c:15: error: ‘position’ was not declared in this scope
simple.c:24: error: ‘gz_error_init’ was not declared in this scope
simple.c:27: error: ‘gz_client_alloc’ was not declared in this scope
simple.c:30: error: ‘gz_client_connect_wait’ was not declared in this scope
simple.c:34: error: ‘gz_position_alloc’ was not declared in this scope
simple.c:37: error: ‘gz_position_open’ was not declared in this scope
simple.c:44: error: ‘gz_client_wait’ was not declared in this scope
simple.c:47: error: ‘gz_position_lock’ was not declared in this scope
simple.c:54: error: ‘gz_position_unlock’ was not declared in this scope
simple.c:58: error: ‘gz_position_close’ was not declared in this scope
simple.c:59: error: ‘gz_position_free’ was not declared in this scope
simple.c:62: error: ‘gz_client_disconnect’ was not declared in this scope
simple.c:63: error: ‘gz_client_free’ was not declared in this scope


I think that maybe is something with the version, but I'm not sure.

I also try to compile the example files like bandit or position but there are many mistakes in the code, for example in the declarations of the variables and others that I can't identify.

If somebody can help me I will be grateful.  

Thanks in advances.

PS: in the simple.c header appears that I have to compile it with gcc, but I had to compile it with g++. With gcc the compiler doesn't recognize some libraries.

-Tejera
Reply | Threaded
Open this post in threaded view
|

Re: Simple.c example libgazebo

tejera
hi,

Finally, after download many versions of gazebo, I can say that simple.c is an example for old versions of gazebo (0.70 and older I think), so the problem is that the documentation isn't actualized.

After a lot of effort I have compiled the examples of the "libgazebo examples directory" in the installation folder. Now the problem is that I don't know how to run that executables and with witch .world I must run it. If someone can help make it will be wonderful.

Thanks for your help.

-Tejera