The problem is not with your code, but with the compilation.
It seems that you need to add  -l math to your link command.

You didn't get any problems compiling Gazebo?


>
> following is the error when i compiled and linked the program:
>
> /usr/local/player-stage/lib/libgazebo.a(gz_truth.o): In function
> `gz_truth_quatern_from_euler':
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:150: undefined
> reference to `cos'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:150: undefined
> reference to `cos'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:150: undefined
> reference to `cos'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:150: undefined
> reference to `sin'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:150: undefined
> reference to `sin'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:150: undefined
> reference to `sin' /usr/local/player-stage/lib/libgazebo.a(gz_truth.o): In
> function `gz_truth_euler_from_quatern':
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:136: undefined
> reference to `atan2'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:137: undefined
> reference to `asin'
> /usr/local/player-stage/code/gazebo/libgazebo/gz_truth.c:138: undefined
> reference to `atan2'
> ---------------------------------------------------------------------------



_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to