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

Build failed at rosidl_generator_c package

asked 2019-04-06 09:17:39 -0600

Darby Lim gravatar image

Hello :)

I have tried to install ROS2 in my macbook(High Sierra). But I got an error message that rosidl_generator_c package in rosidl(master branch) is failed to build. In this error was not occured in ubuntu.

How to handle this problem?

--- stderr: rosidl_generator_c                                                                                  
'Token' object has no attribute 'children' 
/Users/darby/ros2_ws/build/rosidl_generator_c/rosidl_adapter/rosidl_generator_c/msg/BoundedArrayPrimitives.idl
Error processing idl file: 
/Users/darby/ros2_ws/build/rosidl_generator_c/rosidl_adapter/rosidl_generator_c/msg/BoundedArrayPrimitives.idl
Traceback (most recent call last):
  File "/Users/darby/ros2_ws/src/ros2/rosidl/rosidl_generator_c/bin/rosidl_generator_c", line 40, in <module>
sys.exit(main())
  File "/Users/darby/ros2_ws/src/ros2/rosidl/rosidl_generator_c/bin/rosidl_generator_c", line 35, in main
    args.generator_arguments_file,
   File "/Users/darby/ros2_ws/src/ros2/rosidl/rosidl_generator_c/rosidl_generator_c/__init__.py", line 35, in generate_c
    generate_files(generator_arguments_file, mapping)
  File "/Users/darby/ros2_ws/install/rosidl_cmake/lib/python3.7/site-packages/rosidl_cmake/__init__.py", line 121, in 
generate_files
    raise(e)
  File "/Users/darby/ros2_ws/install/rosidl_cmake/lib/python3.7/site-packages/rosidl_cmake/__init__.py", line 101, in 
generate_files
    idl_file = parse_idl_file(locator)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 60, in 
parse_idl_file
    content = parse_idl_string(string, png_file=png_file)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 69, in 
parse_idl_string
    content = extract_content_from_ast(tree)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 139, in 
extract_content_from_ast
    add_message_members(msg, struct_defs[0])
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 366, in 
add_message_members
    abstract_type = get_abstract_type_from_type_spec(type_spec)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 407, in 
get_abstract_type_from_type_spec
    return get_abstract_type(child)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 440, in 
get_abstract_type
    basetype = get_abstract_type_from_type_spec(type_spec)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 407, in 
get_abstract_type_from_type_spec
    return get_abstract_type(child)
  File "/Users/darby/ros2_ws/install/rosidl_parser/lib/python3.7/site-packages/rosidl_parser/parser.py", line 416, in 
get_abstract_type
    while len(child.children) == 1:
AttributeError: 'Token' object has no attribute 'children'
make[2]: *** [rosidl_generator_c/rosidl_generator_c/msg/bool.h] Error 1
make[2]: *** Deleting file `rosidl_generator_c/rosidl_generator_c/msg/bool.h'
make[1]: *** [CMakeFiles/rosidl_generator_c_interfaces__rosidl_generator_c.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< rosidl_generator_c [ Exited with code 2 ]
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-06 09:37:55 -0600

Dirk Thomas gravatar image

This looks like a duplicate of https://github.com/ros2/rosidl/issues...

You need to make sure at least version 0.7 of the Python package lark-parser is installed

edit flag offensive delete link more

Comments

Thank you very much!

Darby Lim gravatar image Darby Lim  ( 2019-04-08 06:45:33 -0600 )edit

Please mark the answer as correct if it answered your question by clicking on the check mark under the vote.

Dirk Thomas gravatar image Dirk Thomas  ( 2019-04-08 11:26:50 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-04-06 09:17:39 -0600

Seen: 2,282 times

Last updated: Apr 06 '19