Ask Your Question

amosteo's profile - activity

2019-03-26 00:13:23 -0500 received badge  Popular Question (source)
2019-01-11 12:41:40 -0500 marked best answer trigger recompilation of installed msgs

Related to my question about triggering a new language generator: https://answers.ros.org/question/2918...

I currently have a workspace (from source) with the official ROS2 repositories. This is "installed", so to say, so it is not recompiled. My Ada-related packages are in an overlay workspace, which is recompiled often.

My generator for Ada is correctly triggered when a new .msg is defined in my packages. However, messages already in the official sources (std_msgs, etc) are obviously left alone.

My question is if there is some sanctioned way of regenerating the messages in "parent" overlays.

Looking at ros2_java I see that it basically brings in a lot of ros2 repositories to its workspace during the compilation of ros2_java. I see some problems with this:

  1. Compilation times are higher.
  2. It seems a waste to recompile things that have been compiled during the "official" installation.
  3. If I were working with a "stable" ROS2 source (e.g. Ubuntu packages) it would feel very strange to have to recompile from sources core packages that are installed via package manager (I'm thinking here on the long term for users of those client libraries that don't come in the base ROS2).

I'm leaning toward identifying the installation tree of rosidl_generator_c and search all messages in there, but it seems inelegant, and it would miss other hypothetical overlays' messages.

2018-11-15 07:24:18 -0500 received badge  Famous Question (source)
2018-11-01 19:48:13 -0500 received badge  Famous Question (source)
2018-10-23 11:34:40 -0500 received badge  Notable Question (source)
2018-10-23 02:03:08 -0500 marked best answer Memory allocator for ROS2 messages?

RCL has allocators to have custom memory management, that are taken from rcutils. Tests while doing my Ada binding show that this works nicely. I'm now trying to understand where a message allocator is configured. For example, in the rosidl-generated bool__functions.h there is:

bool std_msgs__msg__Bool__Array__init(std_msgs__msg__Bool__Array * array, size_t size);

and in general any array message is dynamically allocated (I think). I'm trying to ascertain what I should add to my binding to also provide allocators for messages. Thanks for any pointers.

2018-10-23 02:03:00 -0500 answered a question Memory allocator for ROS2 messages?

Answering to myself, it is under evaluation: https://github.com/ros2/rosidl/issues/306

2018-10-11 15:10:57 -0500 received badge  Famous Question (source)
2018-08-31 06:41:08 -0500 received badge  Notable Question (source)
2018-07-31 08:34:26 -0500 received badge  Popular Question (source)
2018-07-27 12:13:53 -0500 received badge  Taxonomist
2018-07-25 03:45:35 -0500 received badge  Popular Question (source)
2018-07-18 12:38:52 -0500 marked best answer Compilation error building against binary Bouncy: could not find FastRTPS

I'm building a few packages against the new Bouncy release and I'm seeing a difference between a binary installation and another one from source. Namely, when I source the installation from source my package builds normally, but when I source the binary one it hits an error. I'm on Ubuntu 18.04.

The error happens in a call to rosidl_generate_interfaces:

rosidl_generate_interfaces(${PROJECT_NAME}
        msg/Test.msg
        srv/Test.srv
        DEPENDENCIES std_msgs)

The error is:

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find FastRTPS (missing: FastRTPS_INCLUDE_DIR FastRTPS_LIBRARIES) Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/opt/ros/bouncy/share/fastrtps_cmake_module/cmake/Modules/FindFastRTPS.cmake:95 (find_package_handle_standard_args)
/opt/ros/bouncy/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cpp-extras.cmake:20 (find_package)
/opt/ros/bouncy/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cppConfig.cmake:30 (include)
/opt/ros/bouncy/share/rmw_implementation_cmake/cmake/call_for_each_rmw_implementation.cmake:61 (find_package)
/opt/ros/bouncy/share/rosidl_generator_py/cmake/rosidl_generator_py_get_typesupports.cmake:26 (call_for_each_rmw_implementation)
/opt/ros/bouncy/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:27 (rosidl_generator_py_get_typesupports) /opt/ros/bouncy/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:38 (include)
/opt/ros/bouncy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:169 (ament_execute_extensions)
CMakeLists.txt:69 (rosidl_generate_interfaces)

My sources can be found at https://github.com/ada-ros. The package causing the error is rosidl_generator_ada. It's quite possible I'm doing something wrong in the CMakeLists.txt/package.xml because I'm not entirely confident on my understanding of ROS2 dependency tags. Thanks for any help.

2018-07-18 12:38:49 -0500 commented answer Compilation error building against binary Bouncy: could not find FastRTPS

Thanks for following through.

2018-07-18 11:19:43 -0500 received badge  Famous Question (source)
2018-07-18 04:12:55 -0500 commented answer Compilation error building against binary Bouncy: could not find FastRTPS

See here for a more complete sequence: https://pastebin.com/wnHpyxMM . This is in another computer, with freshly install

2018-07-17 09:15:09 -0500 asked a question When should data_offset in multi array layout not be zero

When should data_offset in multi array layout not be zero Multiarray layout messages contain a data_offset field (in mul

2018-07-07 03:43:39 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

Ok, thanks, I understand now.

2018-07-07 03:42:28 -0500 commented answer Compilation error building against binary Bouncy: could not find FastRTPS

Sorry, same error after upgrading: $ apt policy python3-colcon-ros python3-colcon-ros: Installed: 0.2.9-1 $ which col

2018-07-06 20:41:40 -0500 received badge  Notable Question (source)
2018-07-06 17:02:24 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

@sloretz, I'm using plain "colcon build". I'm using the one that becomes available when sourcing the corresponding bounc

2018-07-06 17:00:03 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

(...) fixed a clash between the package name and target, I did not see it until trying with the from source bouncy that

2018-07-06 16:58:38 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

Man, these comments are not the best! Anyway: Both my bouncy binary/source installations are per wiki instructions Bef

2018-07-06 16:56:08 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

Create empty ws/src Inside src, $ ros2 pkg create --build-type cmake fail Copy my sample msg/srv to ~/ws/src/fail/ Cre

2018-07-06 16:46:19 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

@DirkThomas, I thought the .xml file wouldn't affect the compilation driven by CMake, if there are missing dependencies

2018-07-06 15:49:39 -0500 received badge  Popular Question (source)
2018-07-06 08:31:07 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

Also I've prepared a small reproducer with the default output of ros2 pkg create. I've only added the minimal dependenci

2018-07-06 07:24:05 -0500 commented question Compilation error building against binary Bouncy: could not find FastRTPS

For what is worth, after converting all the packages to ament_make build type, the error has gone away

2018-07-06 05:59:41 -0500 commented answer ros2 tab completion not working after Bouncy

The empty file wasn't enough, nor directly calling ament_index_register_package(PACKAGE_NAME ${PROJECT_NAME}) did the tr

2018-07-06 02:31:10 -0500 commented answer ros2 tab completion not working after Bouncy

I will try that, thanks. Is there any chance that regular CMake install(EXPORTS) or export() where somehow doing that, o

2018-07-06 01:08:10 -0500 received badge  Notable Question (source)
2018-07-05 17:48:53 -0500 received badge  Popular Question (source)
2018-07-05 16:29:09 -0500 commented question ros2 tab completion not working after Bouncy

In further testing I've created two dummy packages via ros2 pkg create and completion works when build method is ament_c

2018-07-05 16:29:09 -0500 received badge  Commentator
2018-07-05 15:45:53 -0500 asked a question ros2 tab completion not working after Bouncy

ros2 tab completion not working after Bouncy Before the Bouncy release I was developing my Ada client library against so

2018-07-05 15:13:15 -0500 asked a question Compilation error building against binary Bouncy: could not find FastRTPS

Compilation error building against binary Bouncy: could not find FastRTPS I'm building a few packages against the new Bo

2018-06-29 05:27:33 -0500 asked a question Memory allocator for ROS2 messages?

Memory allocator for ROS2 messages? RCL has allocators to have custom memory management, that are taken from rcutils. Te

2018-06-29 05:26:01 -0500 asked a question Memory allocator for messages

Memory allocator for messages RCL has allocators to have custom memory management, that are taken from rcutils. Tests wh

2018-06-25 04:06:13 -0500 marked best answer Identify dependencies when group_depend is involved

I'm trying to navigate the tree of dependencies of some packages in ROS2 but I'm hitting a possible bug.

For normal build_depend and buildtool_depend I can use ament list_dependencies or inspect the package.xml

However, some packages use group_depend. After reading about the format 3 spec, I see this is kind of a reverse dependency specification. Now I would have to find all packages that state to belong to the group. That seems too impractical to be done by hand. And ament crashes when asking it for dependencies (ROS2 built from sources as of today):

$ ament list_dependencies rosidl_default_generators
Traceback (most recent call last):
  File "/home/jano/opt/ros2/install_isolated/ament_tools/bin/ament", line 11, in <module>
    load_entry_point('ament-tools==0.4.0', 'console_scripts', 'ament')()
  File "/home/jano/opt/ros2/install_isolated/ament_tools/lib/python3.6/site-packages/ament_tools/commands/ament.py", line 88, in main
    rc = args.main(args)
  File "/home/jano/opt/ros2/install_isolated/ament_tools/lib/python3.6/site-packages/ament_tools/verbs/list_dependencies.py", line 97, in main
    g.extract_group_members(packages.values())
  File "/home/jano/opt/ros2/install_isolated/ament_package/lib/python3.6/site-packages/ament_package/group_dependency.py", line 60, in extract_group_members
    assert g.evaluated_condition is not None
AssertionError

Any ideas on how to proceed besides grepping my way forward? Should I report this as a bug or am I doing something wrong? Thanks.

2018-06-25 04:06:00 -0500 received badge  Famous Question (source)
2018-06-25 04:06:00 -0500 received badge  Notable Question (source)
2018-06-22 19:09:09 -0500 received badge  Notable Question (source)
2018-06-15 08:22:39 -0500 received badge  Notable Question (source)
2018-06-15 08:22:15 -0500 marked best answer How to hook a new IDL generator

I'm trying to understand how to add a new generator for the Ada language. I've been trying to make sense of the different CMake files in the different packages, ament, rosidl, etc. I've also checked the case of the rosidl_java_generator. Still, I have a general idea of what's happening but I'm failing to pin down the details. Two questions:

I see that the java case requires patching the CMakeLists.txt and package.xml of the rosidl_default_generators package. Is this mandatory? I.e., cannot one add a new generator in a new package without having to patch other people's packages?

Be it possible or not, I'm failing to understand when/how exactly a new generator is called and what information it receives. I guess at some point dependencies are added to the .msg files on some cmake targets, but I have not found where. Any help with these questions will be much appreciated, thanks.