[ros-users] Include sensor_msgs/Imu.h

Brian Gerkey gerkey at willowgarage.com
Wed Apr 7 14:02:52 UTC 2010


hi Leif,

If message headers are going into msg_gen/cpp, then you must be using
ROS 1.1.x (or ros/trunk), which is unstable, and not recommended.

Having said that, it should work.  Concurrent with the change of
location for the message headers is a little magic in rospack that
auto-generates appropriate -I flags when it finds that message headers
were put into msg_gen/cpp.  Eventually, it will not be necessary to
export anything in manifests for including message headers; forgetting
or mistyping these exports has consistently been a source of bugs.

Off-hand, I would guess that your package doesn't depend on
sensors_msgs; i.e., you're missing this line from your package's
manifest:
  <depend package="sensor_msgs"/>

If that's not the problem, then post back with verbose build output, e.g.:
  make VERBOSE=1

	brian.

On Wed, Apr 7, 2010 at 5:10 AM, Leif Christensen
<leif.christensen at dfki.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
>
> Hi,
>
> I just finished the tutorials and I am now trying to write my first
> publisher in c++. I want to use the sensor_msgs/Imu msg in my code, but
> I am stuck right at the beginning. Make fails to include sensor_msgs/Imu.h:
>
> #include <sensor_msgs/Imu.h> , whereas
> #include <std_msgs/Stringh> as in the Tutorial is working fine.
>
> The stack common_msgs and the package sensor_msgs underneath are there
> and can be found via rospack find. The generated include-headers are in
> the package folder under
>
> msg_gen/cpp/include/sensor_msgs/ ,
>
> which is different from the location stated in
> http://www.ros.org/wiki/roscpp/Overview/Messages . After that document,
> the location of generated msgs should be
>
> msg/cpp/sensor_msgs/ ,
>
> and in the manifest.txt only this location is exported as an cpp cflag:
>
> - -I${prefix}/msg/cpp
>
> But even adding -I${prefix}/msg_gen/cpp/include/ and rebuilding doesn't
> help.
>
> Perhaps someone can point me in the right direction?
>
> Greetings,
> Leif
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAku8dk0ACgkQgrIQzq7NbhFoyQCgyq/tp1WimMos1Aj8IL7aBZ/i
> lUMAnip3R1aXMzgvg2x39p7q3yBqIs+9
> =ZrZ/
> -----END PGP SIGNATURE-----
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list