Re: [ros-users] Reserved message names?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Gerkey
Date:  
To: ros-users
Subject: Re: [ros-users] Reserved message names?
To test Josh's hypothesis, you can try compiling with '-U Status', to
undefine any previous definition of that symbol.

E.g., if you're building an executable called 'bookboot', you could
add this line to your CMakeLists.txt:

rosbuild_add_compile_flags(bookboot -U Status)

If that works (with your message still called 'Status'), then you'd
want to track down the #define of 'Status'.

    brian.


On Thu, Aug 12, 2010 at 4:28 PM, Josh Faust <> wrote:
> My point is that one of those includes may be #defining or otherwise
> declaring Status, separately from the message.  Status as a message works
> fine in a simple test case.
> Josh
>
> On Thu, Aug 12, 2010 at 2:34 PM, Sanja Popovic <> wrote:
>>
>> Hi Josh,
>>
>> Here is the list of includes:
>> #include <ros/ros.h>
>>
>> #include <bookbot/BBox.h>
>> #include <bookbot/Book.h>
>> #include <bookbot/BookList.h>
>> #include <bookbot/Status.h>
>> #include <bookbot/Table.h>
>>
>> #include <tf/transform_listener.h>
>>
>> #include <iostream>
>>
>> #include <object_manipulation_msgs/GraspableObject.h>
>>
>> #include <pcl/filters/passthrough.h>
>> #include <pcl/point_types.h>
>> #include <pcl_visualization/pcl_visualizer.h>
>>
>> #include <sensor_msgs/PointCloud.h>
>> #include <sensor_msgs/PointCloud2.h>
>> #include <sensor_msgs/point_cloud_conversion.h>
>>
>> None of the messages I've generated have status as their field.
>>
>> Anyway, I'll use less generic names in the future.
>>
>> Thanks,
>> Sanja
>> ________________________________________
>> From: [] On
>> Behalf Of Josh Faust []
>> Sent: Thursday, August 12, 2010 5:32 PM
>> To:
>> Subject: Re: [ros-users] Reserved message names?
>>
>> Without more code it's impossible to tell, but likely something you're
>> #including has #defined Status to something you're not expecting.  Nothing
>> in ROS should be doing this.
>>
>> Josh
>>
>> On Thu, Aug 12, 2010 at 2:17 PM, Sanja Popovic
>> <<mailto:sanja@mit.edu>> wrote:
>> Hi,
>>
>> I've created a message for my package named Status and in the code, I had
>> the following function:
>> void pullPickCallback(bookbot::Status s) {
>> ...
>> }
>>
>> When compiling the file, I got the following error:
>>  /opt/ros/cturtle/stacks/lis/bookbot/src/driver.cpp:57: error: variable or
>> field ‘pullPickCallback’ declared void
>>  /opt/ros/cturtle/stacks/lis/bookbot/src/driver.cpp:57: error: expected
>> unqualified-id before ‘int’
>>
>> Line 57 is the one I copied above.
>>
>> Changing the message name from Status to something else fixed the problem.
>> Is Status reserved name in ROS for something or did I just bump into a
>> really strange bug?
>>
>> Thanks,
>> Sanja
>> _______________________________________________
>> ros-users mailing list
>> <mailto:ros-users@code.ros.org>
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>> _______________________________________________
>> ros-users mailing list
>>
>> https://code.ros.org/mailman/listinfo/ros-users
>
>
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users
>
>