Ask Your Question
0

Cannot compile a msg file

asked 2019-08-10 04:59:38 -0500

EdwardNur gravatar image

I want to compile a ros2 msg file and my packages.xml looks like this:

<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
  <name>rtabmap_ros</name>
  <version>0.0.0</version>
  <description>TODO: Package description</description>
  <maintainer email="abyl.ikhsanov@gmail.com">abyl</maintainer>
  <license>TODO: License declaration</license>

  <buildtool_depend>ament_cmake</buildtool_depend>
  <buildtool_depend>rosidl_default_generators</buildtool_depend>

  <depend>rclcpp</depend>
  <depend>builtin_interfaces</depend>
  <depend>rosidl_default_runtime</depend>
  <depemd>std_msgs</depemd>

  <test_depend>ament_lint_auto</test_depend>
  <test_depend>ament_lint_common</test_depend>

  <export>
    <build_type>ament_cmake</build_type>
  </export>
</package>

And part of my CMakeLists:

find_package(ament_cmake REQUIRED)
find_package(rclcpp)
find_package(cv_bridge)
find_package(sensor_msgs)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)

set(msg_files
    "msg/Info.msg")

rosidl_generate_interfaces(${PROJECT_NAME}
  ${msg_files}
  DEPENDENCIES builtin_interfaces std_msgs geometry_msgs
  ADD_LINTER_TESTS
)

But in the end I am getting this error:

 Error processing 'int32 refId' of 'rtabmap_ros/Info': 'the field name
  'refId' is not valid'

Where the Info.msg is:

Header header

int32 refId
int32 loopClosureId
int32 proximityDetectionId

Also, I have tried to look for the pcl_ros in ROS2 but did not find anything. Any idea how people deal with it in ROS2?

edit retag flag offensive close merge delete

Comments

Please try lower case names for the message parameters

ct2034 gravatar imagect2034 ( 2019-08-10 09:43:54 -0500 )edit

@ct2034 if this works, that is a big one bullshit in ROS2

EdwardNur gravatar imageEdwardNur ( 2019-08-10 12:02:06 -0500 )edit

@ct2034, yeap, it worked. I think I should go for a paid alternative, that student project is a non sense

EdwardNur gravatar imageEdwardNur ( 2019-08-10 12:03:20 -0500 )edit

Does your student project make no sense? Sorry to hear that but I guess we can not help you with that.

ct2034 gravatar imagect2034 ( 2019-08-10 12:36:17 -0500 )edit

@ct2034 Yeah I know, just raging on my student project...

EdwardNur gravatar imageEdwardNur ( 2019-08-10 13:13:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-08-10 12:18:55 -0500

tfoote gravatar image

Field names are required to be lowercase alphanumeric with underscores to be able to generate into all the different languages.

Full details are at http://design.ros2.org/articles/legac...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-08-10 04:59:38 -0500

Seen: 24 times

Last updated: Aug 10