Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosbag fails at importing import_c_library #522

Closed
christianrauch opened this issue Sep 10, 2020 · 11 comments
Closed

rosbag fails at importing import_c_library #522

christianrauch opened this issue Sep 10, 2020 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@christianrauch
Copy link

Description

ros2 bag fails to record or play bag files

Expected Behavior

ros2 bag can record and play

Actual Behavior

I tried to record on ROS2 foxy via ros2 bag record <log-file-name> which fails with:

Traceback (most recent call last):
  File "/opt/ros/foxy/bin/ros2", line 11, in <module>
    load_entry_point('ros2cli==0.9.7', 'console_scripts', 'ros2')()
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2cli/cli.py", line 67, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2bag/command/bag.py", line 38, in main
    return extension.main(args=args)
  File "/opt/ros/foxy/lib/python3.8/site-packages/ros2bag/verb/record.py", line 141, in main
    from rosbag2_transport import rosbag2_transport_py
  File "/opt/ros/foxy/lib/python3.8/site-packages/rosbag2_transport/__init__.py", line 15, in <module>
    from rpyutils import import_c_library
ImportError: cannot import name 'import_c_library' from 'rpyutils' (/opt/ros/foxy/lib/python3.8/site-packages/rpyutils/__init__.py)

To Reproduce

  1. ros2 bag record test
  2. failure cannot import name 'import_c_library' from 'rpyutils'

System (please complete the following information)

  • OS: Ubuntu 20.04
  • ROS 2 Distro: Foxy
  • Version: Foxy stable

Additional context

This used to work on foxy about a week ago.

@christianrauch christianrauch added the bug Something isn't working label Sep 10, 2020
@ralph-lange
Copy link

I just got the same error after a fresh Foxy installation.

The problem: The Debian package ros-foxy-rpyutils is from 24 June 2020, but ros-foxy-rosbag2 is from 1 September 2020. Therefore, ros-foxy-rpytuils does not include the import_c_library from ros2/rpyutils#4, which is used by rosbag2.

@clalancette
Copy link
Contributor

Thanks for digging in. @jacobperron FYI, looks like we need to do a new release of rpyutils into Foxy and a new sync.

@jacobperron jacobperron self-assigned this Sep 11, 2020
@jacobperron
Copy link
Member

Thanks for reporting! I've made a new release of rpyutils (ros/rosdistro#26537) and will do another Foxy sync shortly.

@jacobperron
Copy link
Member

I've also added a new test (#523) in an effort to catch this kind of bug in earlier in the release cycle.

@christianrauch
Copy link
Author

Thanks for digging into this and providing a fix so promptly.

I am still surprised to see core tooling break during a stable release. This diminishes the trust of using ROS2 stable releases for serious projects.
Wouldn't it be possible to postpone such updates to the next stable release or at least try them out in testing and rolling releases before uploading them to the stable release?

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/new-packages-for-foxy-fitzroy-2020-09-10/16348/3

@crystaldust
Copy link

My PR also fails with the same logs(ros2/rclpy#599), which seems to be the same problem. Hope the latest change will come to the foxy image ASAP

@clalancette
Copy link
Contributor

Wouldn't it be possible to postpone such updates to the next stable release or at least try them out in testing and rolling releases before uploading them to the stable release?

That was all done. The problem in this case is that we missed backporting and releasing an additional patch to rpyutils for Foxy. It was further compounded by the fact that we didn't have any tests for this, which is now rectified by #523 .

In general, there is tension between keeping the released versions stable and adding fixes to the stable version. To really be sure about patches that are backported, testing is needed. That can come both in the form of automated tests, or manual testing by users. Many automated tests are currently being added, so that side of the equation is at least being worked on. The manual testing is (and has always been) a problem; there has historically been very little (I would say almost zero) testing of the "testing" repositories by the community. I'm not sure how to improve that, but I'd definitely be open to suggestions.

@jacobperron
Copy link
Member

I believe this issue has been resolved. Feel free to comment or re-open.

@FilipDziwulski
Copy link

FilipDziwulski commented Sep 16, 2020

I'm seeing this failure when building in docker on arm64 using FROM ros:foxy

How long does it take for changes to propagate.Or how can I point to a working version?

@jacobperron
Copy link
Member

@FilipDziwulski I don't have an idea for how long it takes for the docker file to be updated, but you should be able to upgrade within the docker container to the newest package versions, e.g. apt update && apt upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants