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

Brian Gerkey gerkey at willowgarage.com
Mon Aug 16 18:29:15 UTC 2010


On Sun, Aug 15, 2010 at 5:44 PM, Daniel Stonier <d.stonier at gmail.com> wrote:
> On 16 August 2010 09:19, Soo-Hyun Yoo <yoos117 at gmail.com> wrote:
>> 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.

This is not an area where we've focused much effort, because we'd
prefer to get out of the business of downloading, unpacking, and
building other people's code.  Standard package managers (apt-get,
yum, port, emerge, etc.) do that much better than we ever will.  We
strongly prefer to rely on software that can be installed by an OS
package manager.  We pull 3rdparty code into the build only as a last
resort, often because the version available from the package manager
is too old (but "too old" is always up for debate, and I always argue
the side of using the older version, even if it's worse, because we
don't take on a maintenance burden).

>> 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})

Hmm, that shouldn't fix anything.  In the following lines from the
CMakeLists.txt, the call to target_link_libraries() causes the
executable to depend on the library:

  rosbuild_add_library(${PROJECT_NAME} ${SIM_LIB})
  rosbuild_add_executable(robot_sim src/robot_sim.cpp)
  target_link_libraries(robot_sim ${PROJECT_NAME})

There shouldn't be any missing dependencies. Can you post the build
errors that you see on the first 'make' invocation?

	brian.



More information about the ros-users mailing list