Skip to content

[BUG] microROS Host(Linux) emulator running failed: xxx_rosidl_typesupport_microxrcedds_c.so lost. #470

Closed

Description

@ZhenshengLee

Issue template

Steps to reproduce the issue

https://github.com/ZhenshengLee/ros2_mcu/tree/master/host_ws

compile

source /opt/ros/galactic/setup.bash
./build.sh

colcon.meta is https://github.com/ZhenshengLee/ros2_mcu/blob/master/host_ws/colcon.meta

running agent

ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888

running app

cd ./host_ws
source /opt/ros/galactic/setup.bash
source ./install/local_setup.bash
export RMW_IMPLEMENTATION=rmw_microxrcedds
ros2 run micro_ros_demos_rclc int32_publisher

Expected behavior

connecting with agent and publish msg.

Actual behavior

run failer.

zs@zs-3630:~/zs_ws/ros2_mcu/host_ws$ ros2 run micro_ros_demos_rclc int32_publisher
[ERROR] [1647244684.547171495] [rclc]: [rclc_publisher_init_best_effort] Error in rcl_publisher_init: Could not load library libstd_msgs__rosidl_typesupport_microxrcedds_c.so: dlopen error: libstd_msgs__rosidl_typesupport_microxrcedds_c.so: cannot open shared object file: No such file or directory, at /tmp/binarydeb/ros-galactic-rcutils-4.0.2/src/shared_library.c:99, at /tmp/binarydeb/ros-galactic-rosidl-typesupport-c-1.2.1/src/type_support_dispatch.hpp:78, at /tmp/binarydeb/ros-galactic-rcl-3.1.2/src/rcl/publisher.c:114

Failed status on line 40: 1. Aborting.

Additional information

in host_ws/install/std_msgs/lib, there are only static libs with rosidl_typesupport_microxrcedds_cpp and rosidl_typesupport_microxrcedds_c

zs@zs-3630:~/zs_ws/ros2_mcu/host_ws/install/std_msgs/lib$ ls
libstd_msgs__python.so                  libstd_msgs__rosidl_typesupport_fastrtps_cpp.so       libstd_msgs__rosidl_typesupport_microxrcedds_c.a
libstd_msgs__rosidl_generator_c.so      libstd_msgs__rosidl_typesupport_fastrtps_c.so         libstd_msgs__rosidl_typesupport_microxrcedds_cpp.a
libstd_msgs__rosidl_typesupport_cpp.so  libstd_msgs__rosidl_typesupport_introspection_cpp.so  python3.8
libstd_msgs__rosidl_typesupport_c.so    libstd_msgs__rosidl_typesupport_introspection_c.so

Activity

  1. pablogs9 commented on Mar 14, 2022

    @pablogs9
    Member

    Normally the build script is called from here: https://github.com/micro-ROS/micro_ros_setup/blob/galactic/scripts/build_firmware.sh

    And this parent script prepares the environment variables and path in order to handle correctly the type support.

    Please make sure that your custom build process follows the same logic.

  2. ZhenshengLee commented on Mar 15, 2022

    @ZhenshengLee
    ContributorAuthor

    Please make sure that your custom build process follows the same logic.

    @pablogs9

    I am sure that the build script and colcon.meta is following https://github.com/micro-ROS/micro_ros_setup/blob/galactic/scripts/build_firmware.sh and https://github.com/micro-ROS/micro_ros_setup/tree/galactic/config/host/generic

    But due to network issues, I cannot test building scripts from this micro_ros_setup repo, could you give this a test?

    I made a PR #473 to generate dynamic libs and made things work, which needs your review.

  3. pablogs9 commented on Mar 15, 2022

    @pablogs9
    Member

    #473 merged, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions