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

Problem with industrial_msgs/TriState.h

asked 2014-08-18 04:54:05 -0500

Bastbeat gravatar image

updated 2014-08-18 05:48:24 -0500

When I run catkin_make(I'm working with rqt). I get this:

[ 97%] Building CXX object guiakomips3/CMakeFiles/guiakomips3.dir/include/guiakomips3/moc_akomips3.cxx.o
In file included from /opt/ros/hydro/include/industrial_msgs/RobotStatus.h:53:0,
                 from /home/ismael/catkin_workspace/src/guiakomips3/include/guiakomips3/akomips3.h:13,
                 from /home/ismael/catkin_workspace/src/guiakomips3/src/guiakomips3/akomips3.cpp:1:
/opt/ros/hydro/include/industrial_msgs/TriState.h:73:13: error: expected identifier before ‘true’
/opt/ros/hydro/include/industrial_msgs/TriState.h:73:13: error: expected ‘}’ before ‘true’
/opt/ros/hydro/include/industrial_msgs/TriState.h:73:13: error: expected unqualified-id before ‘true’
/opt/ros/hydro/include/industrial_msgs/TriState.h:78:13: error: expected identifier before ‘false’
/opt/ros/hydro/include/industrial_msgs/TriState.h:78:13: error: expected ‘}’ before ‘false’
/opt/ros/hydro/include/industrial_msgs/TriState.h:78:13: error: expected unqualified-id before ‘false’
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:59: error: ‘ContainerAllocator’ was not declared in this scope
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:77: error: template argument 1 is invalid
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:79: error: template argument 1 is invalid
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:84: error: invalid type in declaration before ‘;’ token
/opt/ros/hydro/include/industrial_msgs/TriState.h:86:59: error: ‘ContainerAllocator’ was not declared in this scope
/opt/ros/hydro/include/industrial_msgs/TriState.h:86:77: error: template argument 1 is invalid
/opt/ros/hydro/include/industrial_msgs/TriState.h:86:84: error: template argument 1 is invalid
/opt/ros/hydro/include/industrial_msgs/TriState.h:86:94: error: invalid type in declaration before ‘;’ token
/opt/ros/hydro/include/industrial_msgs/TriState.h:89:1: error: expected declaration before ‘}’ token
make[2]: *** [guiakomips3/CMakeFiles/guiakomips3.dir/src/guiakomips3/akomips3.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /opt/ros/hydro/include/industrial_msgs/RobotStatus.h:53:0,
                 from /home/ismael/catkin_workspace/build/guiakomips3/include/guiakomips3/../../../../src/guiakomips3/include/guiakomips3/akomips3.h:13,
                 from /home/ismael/catkin_workspace/build/guiakomips3/include/guiakomips3/moc_akomips3.cxx:10:
/opt/ros/hydro/include/industrial_msgs/TriState.h:73:13: error: expected identifier before ‘true’
/opt/ros/hydro/include/industrial_msgs/TriState.h:73:13: error: expected ‘}’ before ‘true’
/opt/ros/hydro/include/industrial_msgs/TriState.h:73:13: error: expected unqualified-id before ‘true’
/opt/ros/hydro/include/industrial_msgs/TriState.h:78:13: error: expected identifier before ‘false’
/opt/ros/hydro/include/industrial_msgs/TriState.h:78:13: error: expected ‘}’ before ‘false’
/opt/ros/hydro/include/industrial_msgs/TriState.h:78:13: error: expected unqualified-id before ‘false’
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:59: error: ‘ContainerAllocator’ was not declared in this scope
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:77: error: template argument 1 is invalid
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:79: error: template argument 1 is invalid
/opt/ros/hydro/include/industrial_msgs/TriState.h:85:84: error: invalid type in declaration before ‘;’ token
/opt/ros/hydro/include/industrial_msgs/TriState.h:86:59: error: ‘ContainerAllocator’ was not declared in ...
(more)
edit retag flag offensive close merge delete

Comments

I think we're going to need a little more information than that. Those files are auto-generated, and have not changed for a long time (afaik). They're also used internally by other ROS-Industrial pkgs. Is that the only error you get? Is there no other error before it? Dependencies all properly declared in your manifest?

gvdhoorn gravatar image gvdhoorn  ( 2014-08-18 05:20:11 -0500 )edit

Also: please indent console output with 4 spaces (do not use quote blocks). It makes things a lot easier to read.

gvdhoorn gravatar image gvdhoorn  ( 2014-08-18 05:22:32 -0500 )edit

Now I posted 3 new lines before the old code. Yes, the dependences are declared in the manifest

Bastbeat gravatar image Bastbeat  ( 2014-08-18 05:32:30 -0500 )edit

Please update your original question with at least 10 lines around from both akomips3.h and akomips3.cpp where you include RobotStatus.h. Or make those files available somewhere.

gvdhoorn gravatar image gvdhoorn  ( 2014-08-18 05:42:43 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-08-18 06:04:59 -0500

gvdhoorn gravatar image

updated 2014-08-18 06:05:43 -0500

I just created the following program:

#include <ros/ros.h>
#include <industrial_msgs/RobotStatus.h>

int main(int argc, char **argv)
{
  return 0;
}

Building succeeded (standard CMakeLists.txt, package.xml declaring dependency on industrial_msgs), no errors.

I'm suspecting some kind of conflict between the other includes in your header and cpp file, and the RobotStatus.h header.

PS: any reason you have some double includes?

PPS: I assume there is a #endif in akomips3.h.

edit flag offensive delete link more

Comments

You're right, I don't know why I have double includes. But it still doesn't work. I have the "#endif" and I saw again the CMakelist and the package.xml, but I can't see any strange. I have other packages with this library and they work fine. The problem maybe is rqt

Bastbeat gravatar image Bastbeat  ( 2014-08-18 06:16:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-18 04:54:05 -0500

Seen: 531 times

Last updated: Aug 18 '14