ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

control_toolbox does not use native tinyxml in fuerte

asked 2012-07-25 17:17:03 -0500

stochastic gravatar image

I am running ros fuerte on ubunto oneiric.

I was trying to build the cyphy_serial_driver package, which depends on control_toolbox.

I got and tried to build control_toolbox using

roslocate info control_toolbox > control_toolbox.rosinstall

rosinstall <my_ros_dir> control_toolbox.rosinstall

source <my_ros_dir>/setup.bash

rosmake control_toolbox

When building control_toolbox, I got a big nasty error message, the substance of which was:

[rospack] Error: package/stack control_toolbox depends on non-existent package tinyxml

how do I fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-07-25 17:44:54 -0500

stochastic gravatar image

It turns out, per this link:

http://www.ros.org/wiki/tinyxml

that tinyxml used to be the name of a ros package, but now programs should just use the tinyxml system libraries. In order to do that, several changes must be made to the control_toolbox package:

  • includes of <tinyxml tinyxml.h=""> or "tinyxml/tinyxml.h" need to be replaced with <tinyxml.h>
  • the dependence on the tinyxml package needs to be removed from manifest.xml
  • you need to tell the cmake chain that it should link against tinyxml, by adding this to your CMakeLists.txt: target_link_libraries(${PROJECT_NAME} tinyxml)

Here is a complete diff file, which will fix these problems, and cause control_toolbox to build on fuerte. If you put this in a file called patch.diff, you can apply this in the control_toolbox folder by doing this:

patch -p0 -i patch.diff

Index: include/control_toolbox/sinusoid.h

--- include/control_toolbox/sinusoid.h (revision 54851) +++ include/control_toolbox/sinusoid.h (working copy) @@ -38,7 +38,7 @@ #define SINUSOID_H_

#include <iostream> -#include <tinyxml tinyxml.h=""> +#include <tinyxml.h>

namespace control_toolbox {

Index: manifest.xml

--- manifest.xml (revision 54851) +++ manifest.xml (working copy) @@ -6,7 +6,7 @@ <license>BSD</license> <review status="Doc reviewed" notes="&lt;a href=" http:="" www.ros.org="" wiki="" control_toolbox="" reviews="" 2010-01-12_doc_review"="">http://www.ros.org/wiki/control_toolbox/Reviews/2010-01-12_Doc_Review"/> <url>http://ros.org/wiki/control_toolbox</url> - <depend package="tinyxml"/> + <depend package="rosconsole"/> <depend package="tf"/> <depend package="roscpp"/>

Index: src/pid.cpp

--- src/pid.cpp (revision 54851) +++ src/pid.cpp (working copy) @@ -35,7 +35,7 @@ // Original version: Melonee Wise mwise@willowgarage.com

#include "control_toolbox/pid.h" -#include "tinyxml/tinyxml.h" +#include <tinyxml.h>

namespace control_toolbox {

Index: CMakeLists.txt

--- CMakeLists.txt (revision 54851) +++ CMakeLists.txt (working copy) @@ -11,5 +11,6 @@ src/dither.cpp src/sinusoid.cpp

)

+target_link_libraries(${PROJECT_NAME} tinyxml) + # rosbuild_add_executable(test_linear test/linear.cpp)

edit flag offensive delete link more

Comments

joq gravatar image joq  ( 2012-07-26 04:56:12 -0500 )edit
1

thanks, joq, I have submitted ticket #5204: https://code.ros.org/trac/wg-ros-pkg/ticket/5204 Attached to the ticket is a file version of the patch, if that's easier for anyone else with this problem.

stochastic gravatar image stochastic  ( 2012-07-26 05:41:17 -0500 )edit

Question Tools

Stats

Asked: 2012-07-25 17:17:03 -0500

Seen: 779 times

Last updated: Jul 25 '12