Re: [ros-users] Enabling double precision and finding librar…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ build_output.log (text/x-log)
Delete this message
Reply to this message
Author: Soo-Hyun Yoo
Date:  
To: ros-users
Subject: Re: [ros-users] Enabling double precision and finding libraries in ODE
Hi John,

We used ODE in our non-ROS code by having the following in our Makefile: "-I
${ODE_PATH}include/ -l ode -L ${ODE_PATH}drawstuff/src/.libs/ -l drawstuff".

It may or may not be helpful for you to know that robot_sim.h has "#include
<drawstuff/drawstuff.h>" explicitly stated. Is this correct usage? To remove
Make's complaint that it could not find the header file, I copied
drawstuff.h and version.h to /path/to/opende/opende/include/drawstuff. Is
this what you meant by "installing them into the ros install directories
(opende/opende/*)" ?

Sorry, I missed one more flag, *--disable-demos *should be replaced by *
> --enable-demos* in order for drawstuff library to be built. It seems the
> two error logs you've sent are both failing at finding the drawstuff
> library, the above change should fix it (but again, you'll have to trigger a
> re-configure in opende by make clean or equivalent).
>


I flipped that flag to --enable-demos as you described and saw that
libdrawstuff.la was built in
build/opende_1730_patched_with_damping/drawstuff/src/. However, even after a
full recompilation of opende, Make complains: "/usr/bin/ld: cannot find
-ldrawstuff". I have attached the output log.

Also, the output of /path/to/opende/opende/bin/ode-config is the following:

-I/home/yoos/devel/ros/stacks/physics_ode/opende/opende/include -DdDOUBLE
-Wl,-rpath,/home/yoos/devel/ros/stacks/physics_ode/opende/opende/lib
-L/home/yoos/devel/ros/stacks/physics_ode/opende/opende/lib -lode


Shouldn't -ldrawstuff be in there somewhere?

Also I would like to note that drawstuff is considered to be part of ODE
> demo and not part of the dynamics engine library, so it's not officially
> exported into the ODE installation directories. If it's extremely useful,
> we can consider exporting the c++ flags or simply installing them into the
> ros install directories (opende/opende/*) by default as well. Please ticket
> me on it.
>


I apologize for my lack of insight into our code, but I do not know what
drawstuff is actually used for in robot_sim, as I did not write it. I will,
however, look into it, and if it seems useful enough, submit a ticket.

As Brian mentioned, there's no plans to customize builds for 3rd party
> packages under ROS for now. Would it be sufficient to make ODE compile
> with double precision by default? I've been meaning to switch it over as
> the gains at keeping things float on most modern computers are less
> significant. As for drawstuff, if its a dependency of atrias_sim, I can
> enable the demos build by default as well. Please see changes in r31755.
> If there are no objections, the changes should be included in the next
> physics_ode release.



It would indeed be nice if double precision and the demos were enabled by
default---thank you!

Soo-Hyun Yoo
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package atrias_sim
[rosbuild] Including /home/yoos/devel/ros/ros/core/rospy/cmake/rospy.cmake
[rosbuild] Including /home/yoos/devel/ros/ros/core/roscpp/cmake/roscpp.cmake
[rosbuild] Including /home/yoos/devel/ros/ros/core/roslisp/cmake/roslisp.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build
cd build && make -j2
make[1]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[2]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[3]: Entering directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
Linking CXX shared library ../lib/libatrias_sim.so
/usr/bin/ld: cannot find -ldrawstuff
collect2: ld returned 1 exit status
make[3]: *** [../lib/libatrias_sim.so] Error 1
make[3]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[2]: *** [CMakeFiles/atrias_sim.dir/all] Error 2
make[2]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/home2/devel/ros/stacks/ros_atrias/atrias_sim/build'
make: *** [all] Error 2