[ros-users] Enabling double precision and finding libraries in ODE

John Hsu johnhsu at willowgarage.com
Mon Aug 16 03:05:24 UTC 2010


Hi Soo-Hyun,

To compile ode in double precision, uncomment --enable-double-precision In
opende/Makefile.ode.tarball.   You might have to make wipe and re-make for
the changes to be effective.

With regards to drawstuff.h, drawstuff is not installed to the destination
directory by default.  In the ros framework you can export it manually by by
adding this flag to the cpp cflags in manifest.xml:

-I${prefix}/build/opende_1730_patched_with_damping/drawstuff/src

and adding:

-L${prefix}/build/opende_1730_patched_with_damping/drawstuff/src
-ldrawstuff

to the lflags attribute.
John


On Sun, Aug 15, 2010 at 5:44 PM, Daniel Stonier <d.stonier at gmail.com> wrote:

> Hi Soo-Hyun,
>
> Added notes inbetween stuff below,
>
> On 16 August 2010 09:19, Soo-Hyun Yoo <yoos117 at gmail.com> wrote:
>
>> Hello,
>>
>> I am running ROS Box Turtle on a 64-bit Arch Linux installation. We are
>> currently in the process of restructuring our code to run with ROS.
>>
>> I am now porting over our robot simulator, which uses ODE. For several
>> days I have been trying to get the simulator (a package I have named
>> "atrias_sim" under the stack "ros_atrias") to compile using the "opende"
>> package provided by ROS. I am running into two problems:
>>
>>    1. The 64-bit architecture requires us to use double precision math,
>>    but I have not found an effective way of passing "--enable-double-precision"
>>    to the configure script of ODE when ROS builds it.
>>    2. Rosmake outputs the following error when building atrias_sim:
>>    "fatal error: drawstuff/drawstuff.h: No such file or directory"
>>
>> First, how do I customize how ROS packages are built? ODE builds
>> successfully in single precision, but this will be problematic later on. I
>> tried uncommenting "--enable-double-precision" in the "Makefile.ode.tarball"
>> file in the opende package directory to no effect.
>>
>
> I'd love a way to customise them too - bit like gentoo with its USE flags.
> Not really possible at the moment though. Not sure if they have plans in
> that direction either. Anyway, its not a really big problem. I usually
> simply fork a package, sometimes even share resources (cmake files) betwen
> the packages so I'm not creating redundancies. We did this with opencv at
> our company to create an embedded version of opencv without all the gui
> components.
>
>
>>
>> Second, what is the proper way to include packages such as ODE? For
>> reference, I have attached some of my config files, which I modeled after
>> those of other packages that use opende (e.g., collision_space, gazebo, and
>> pr2_gazebo_plugins). What do I have to do for rosmake to automatically find
>> drawstuff.h? I can manually specify the include path in
>> /path/to/atrias_sim/CMakeLists.txt, but I hope there is a better solution,
>> since none of the three aforementioned packages do this.
>>
>
> If your ode ros package is exporting its headers properly, you shouldn't
> need to do anything except add ODE as a dependency in your manifest.xml.
> Just make sure the exports in the ODE package are pointing to the correct
> place. At the very least that will let you know how to reference drawstuff.
>
>
>>
>> Third, I should mention that I am new to CMake and suspect that my
>> CMakeLists.txt is incorrect. I get make errors the first time I build
>> atrias_sim but they disappear on the second build. This makes me suspect
>> that I am incorrectly specifying the libraries for the atrias_sim
>> executable. Could someone more experienced with CMake please verify this?
>>
>> You are building a library and an executable. CMake and RoS are probably
> using parallel jobs in which case it tries to build the library and the
> exeuctable at the same time. However on the first run, the library will take
> longer and so when the executable tries to link, it can't find the library.
> Note that you won't be seeing this problem if your ROS_PARALLEL_JOBS is set
> to 1.
>
> To fix it, simply add the following line to your cmake and it will make
> sure it will delay building the executable until after the library has been
> built.
>
> add_dependencies(robot_sim ${PROJECT_NAME})
>
>
>
>> Thank you!
>>
>> Soo-Hyun Yoo
>>
>>
> By the way - are you korean?
>
> Cheers,
> Daniel Stonier
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
>
>
> --
> Phone : +82-10-5400-3296 (010-5400-3296)
> Home: http://snorriheim.dnsdojo.com/
> Yujin Robot: http://www.yujinrobot.com/
> Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100815/ab82d578/attachment-0003.html>


More information about the ros-users mailing list