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

amosteo's profile - activity

2022-06-17 04:52:14 -0500 received badge  Famous Question (source)
2022-04-02 14:00:09 -0500 received badge  Famous Question (source)
2022-04-02 14:00:09 -0500 received badge  Notable Question (source)
2021-11-09 05:19:50 -0500 received badge  Famous Question (source)
2021-11-09 05:19:50 -0500 received badge  Notable Question (source)
2021-08-25 06:37:18 -0500 received badge  Famous Question (source)
2021-07-08 06:14:50 -0500 received badge  Notable Question (source)
2021-06-20 23:06:01 -0500 received badge  Favorite Question (source)
2021-06-08 10:36:07 -0500 received badge  Self-Learner (source)
2021-06-08 10:36:07 -0500 received badge  Teacher (source)
2021-06-08 04:35:29 -0500 received badge  Popular Question (source)
2021-06-08 04:25:58 -0500 marked best answer Setting environment variable in local_setup.bash from ament_cmake package

Hello,

I'd like to set/modify an environment variable when the user sources the local_setup.bash from compiling my packages with colcon. I haven't succeeded at finding how to do this.

My packages use the ament_cmake build method.

Reading https://colcon.readthedocs.io/en/rele... it seems there are some automated detections done by colcon, and ament_cmake generates its own local_setup.bash. But I do not find how to explicitly say 'set this variable' or if I should generate another script to be sourced, and how I should instruct colcon or ament_cmake to pick it up.

Thanks for any guidance.

Update 2021-05-08

It seems that adding contents to the install/pkg/share/pkg/package.dsvfile should do it. Still not clear how to do this. I've read through https://colcon.readthedocs.io/en/rele... and https://docs.ros.org/en/foxy/Guides/A... and I feel I am near the intended solution. Basically I need to make colcon aware of the existence of a new .dsv file.

2021-06-08 04:25:46 -0500 answered a question Setting environment variable in local_setup.bash from ament_cmake package

After some more digging I finally found that what I need is ament_environment_hooks. This is also answered here: https:/

2021-06-08 03:19:42 -0500 received badge  Editor (source)
2021-06-08 03:19:42 -0500 edited question Setting environment variable in local_setup.bash from ament_cmake package

Setting environment variable in local_setup.bash from ament_cmake package Hello, I'd like to set/modify an environment

2021-06-06 04:51:10 -0500 marked best answer Using tf2 in ROS2 with pure C?

This is from the context of a client library that relies on rcl, but I guess it would apply to anyone trying to program only in C. My current version is foxy.

I'm looking to provide a binding to tf2, at least partially. I can successfully transform single points by means of copying the data to a Vector3Stamped. This does not seem however very efficient or generalizable if one wants to transform larger/arbitrary messages. So my questions are:

1) Is there any provision or expectation for using tf2 without C++/Python?

2) My understanding is that the C and C++ typesupports aren't compatible, in the sense that I cannot cast a pointer to a C message into the equivalent C++ message, to transform it in a thin layer of C++ and back. Is this correct?

3) Finally, assuming there's no way around using C++ with C++ typesupports, what do you think would be the simplest/most efficient way of achieving transformations of large/new messages? Wrapping the C messages in a C++ type with toMsg/fromMsg functions? Would that inevitably involve copying the data?

Thanks for any guidance!

2021-06-06 04:50:45 -0500 commented answer Using tf2 in ROS2 with pure C?

Do you know of any C lib that you would recommend or that is already among the ROS2 packages? Thanks.

2021-06-03 04:18:57 -0500 asked a question Setting environment variable in local_setup.bash from ament_cmake package

Setting environment variable in local_setup.bash from ament_cmake package Hello, I'd like to set/modify an environment

2021-06-03 03:13:53 -0500 received badge  Notable Question (source)
2021-05-31 10:17:36 -0500 commented answer Using tf2 in ROS2 with pure C?

Thanks for the feedback, @tfoote, this clarifies things for me. I'm actually not bound to a specific system, at this tim

2021-05-30 11:00:32 -0500 received badge  Famous Question (source)
2021-05-28 00:15:56 -0500 received badge  Popular Question (source)
2021-05-27 08:13:58 -0500 asked a question Using tf2 in ROS2 with pure C?

Using tf2 in ROS2 with pure C? This is from the context of a client library that relies on rcl, but I guess it would app

2021-05-07 06:27:49 -0500 received badge  Favorite Question (source)
2021-05-06 17:29:37 -0500 received badge  Popular Question (source)
2021-05-05 14:53:45 -0500 asked a question Parameter support in rcl/rclc?

Parameter support in rcl/rclc? Hello, I'm the Ada client library author, looking to add support for parameters (I'm cur

2020-10-19 19:27:25 -0500 received badge  Famous Question (source)
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.