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

rospack depends geometry_msgs vs rosmsg packages Header [closed]

asked 2013-01-24 19:17:56 -0500

updated 2013-04-28 23:13:51 -0500

ipso gravatar image

Hi,

I am using ROS Fuerte on Ubuntu 12.04 and I have some problem in understanding the consistency of the output of the following two commands:

$rospack depends geometry_msgs:
<nothing>


$rosmsg packages Header
...
gazebo_msgs
gazebo_plugins
geometry_msgs <--
hpPackage
...

So geometry_msgs is using the Header message from std_msgs, but geometry_msgs does not depend on std_msgs. One example of using the Header message is geometry_msgs/TwistStamped:

$rosmsg show geometry_msgs/TwistStamped
std_msgs/Header header <--
  uint32 seq
  time stamp
  string frame_id
geometry_msgs/Twist twist
  geometry_msgs/Vector3 linear
    float64 x
    float64 y
    float64 z
  geometry_msgs/Vector3 angular
    float64 x
    float64 y
    float64 z

Isn't it a bug?

Best Regards, Stephan

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Stopfer
close date 2015-06-26 02:37:17.831094

2 Answers

Sort by ยป oldest newest most voted
4

answered 2013-01-25 02:01:01 -0500

jbohren gravatar image

updated 2013-01-25 05:11:07 -0500

In ROS Fuerte, some of the core stacks/packages were converted to use a prototype version of the catkin buildsystem (docs here). In this version, the notions of "packages" and "stacks" were re-defined (all deps were pushed to the stack level and all manifest.xml files were made to just contain other metadata). Since common_msgs is one of these stacks that was catkinized, neither rospack nor rosstack in Fuerte can parse this xml file. In this case, std_msgs gets built and installed top /opt/ros/fuerte/include/std_msgs (the new FHS standard), so as long as /opt/ros/fuerte is in a given C++ package's include path, you will be able to include C++ headers from std_msgs (there's a similar setup for Python). You'll see that things like dependency specification are defined differently:

ROS Diamondback (rosbuild)

  • stack.xml: <depend stack="ros_comm" />
  • manifest.xml: <depend package="rosbagmigration"/> (gives you std_msgs via this dep)

ROS Fuerte (catkin prototype):

  • stack.xml: <build_depends>std_msgs</build_depends>, <depends>std_msgs</depends>
  • manifest.xml: No dependency information

ROS Groovy (new catkin):

edit flag offensive delete link more

Comments

This answers all. Whole response of mine is rather pointless now.

130s gravatar image 130s  ( 2013-01-25 04:52:38 -0500 )edit

Well I did skip the version where there was such a thing as "stack.yaml" (:

jbohren gravatar image jbohren  ( 2013-01-25 05:09:46 -0500 )edit
1

Sounds like the right answer. Thank you. Its somehow disapointing, because we are developing roscs (http://ros.org/wiki/roscs), which is a wrapper for ros in order to use c# under linux. We encounter problems, if someone wants to use geometry_msgs in his c# application.

Stopfer gravatar image Stopfer  ( 2013-01-25 07:07:13 -0500 )edit

@Stopfer, all is not lost. Are you using the rospack and rosstack shell scripts to get info about ROS packages? Instead, you could use the rospkg python library, which CAN parse all of these files. I'm not sure why rospack/rosstack don't, though. Maybe file a bug?

jbohren gravatar image jbohren  ( 2013-01-25 07:37:03 -0500 )edit

Thx, we will try it that way. So the bug would state, that rospack and rosstack are not able to parse the stack.xml and manifest.xml, correctly?

Stopfer gravatar image Stopfer  ( 2013-01-27 03:06:47 -0500 )edit

Well, at this point, I'm not sure if it will be fixed, since the issue occurs with a now-outdated prototype version of catkin, but there's no harm in posting it. Make sure you post it here: https://github.com/ros/rospack/issues

jbohren gravatar image jbohren  ( 2013-01-27 04:44:56 -0500 )edit
3

answered 2013-01-24 20:34:14 -0500

130s gravatar image

updated 2013-01-24 20:49:54 -0500

geometry_msgs package contains multiple msg types (see its wiki). Some of them, as you cited TwistStamped for example, uses std_msgs/Header (while some others don't same as you referred). Thus as a package, it depends on std_msgs.

Right now I don't have an access to fuerte but in groovy,

$ rospack depends geometry_msgs 
cpp_common
rostime
roscpp_traits
roscpp_serialization
genmsg
genpy
message_runtime
std_msgs

Update) I confirmed on fuerte indeed rospack depends geometry_msgs returns nothing, and in its manifest.xml no dependency is defined. In the history on github @kwc says:

 stripping depend and export tags from common_msgs manifests as msg dependencies are now declared in cmake and stack.yaml.

This explains why geometry_msgs can still refer to std_msgs w/o the dependency not being defined in manifest.

edit flag offensive delete link more

Comments

Where can I find this cmake and stack.yaml entry? I mean where is it said, under fuerte, that geometry_msgs needs std_msgs?

Stopfer gravatar image Stopfer  ( 2013-01-24 21:09:23 -0500 )edit

Again I don't have an access to fuerte on filesystem but on github, https://github.com/ros/common_msgs/tree/fuerte-devel. I assume stack.yaml might be typo of .xml

130s gravatar image 130s  ( 2013-01-24 21:18:43 -0500 )edit

The command "grep -inr "std_msgs" .", executed in /opt/ros/fuerte/share/geometry_msgs does not find any matches. So I guess, that there is no hint about a dependency to std_msgs in fuerte.

Stopfer gravatar image Stopfer  ( 2013-01-24 22:18:50 -0500 )edit

geometry_msgs is a "package" not a stack. How about in common_msgs stack where geometry_msgs pkg belongs to?

130s gravatar image 130s  ( 2013-01-24 22:41:16 -0500 )edit

"grep -inr "std_msgs" ." executed in /opt/ros/fuerte/share/common_msgs brings up: ./stack.xml:24:build_depends>std_msgs</build_depends> ./stack.xml:28: <depends>std_msgs</depends> . But rosstack depends common_msgs does not show up std_msgs.

Stopfer gravatar image Stopfer  ( 2013-01-24 22:56:27 -0500 )edit

"grep -inr "std_msgs" ." executed in /opt/ros/fuerte/share/common_msgs brings up:<br>

Stopfer gravatar image Stopfer  ( 2013-01-24 22:56:33 -0500 )edit

Question Tools

Stats

Asked: 2013-01-24 19:17:56 -0500

Seen: 1,076 times

Last updated: Jan 25 '13