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

Fix invalid import of get_parameter_value in rosapi for ROS2 Jazzy. #932

Merged
merged 3 commits into from
Jul 9, 2024

Conversation

Oberacda
Copy link
Contributor

@Oberacda Oberacda commented Jul 8, 2024

Public API Changes

None

Description

The import ros2param.get_parameter_value is no longer valid in ROS2 jazzy.
The code was removed with PR ros2/ros2cli#866, with the suggested alternative being the import from rclpy.
As get_parameter_value was implemented in rclpy for ROS2 versions before Jazzy, this should not break older ROS2 distros.

#926

Signed-off-by: David Oberacker <[email protected]>
Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This works for rolling (i checked, Iron and later) but we'll have to make another branch for humble since it does not work there.

@sea-bass sea-bass merged commit d22f102 into RobotWebTools:ros2 Jul 9, 2024
4 checks passed
@faev999
Copy link

faev999 commented Jul 15, 2024

I am still getting that same error: " ImportError: cannot import name 'get_parameter_value' from 'ros2param.api'"
when trying to launch the rosbridge ros2 launch rosbridge_server rosbridge_websocket_launch.xml. I am using the bridge inside a Docker image that I build like this:

FROM ros:rolling-ros-core

RUN apt-get update && apt-get install -y --no-install-recommends \
    ros-${ROS_DISTRO}-rosbridge-server \
 ...

@sea-bass
Copy link
Contributor

This was only merged to the repo, not released as binaries. You should clone this repo and build it from source.

@Rayman
Copy link
Contributor

Rayman commented Jul 25, 2024

Can we get a new release for jazzy that includes this fix?

@faev999
Copy link

faev999 commented Aug 2, 2024

This was only merged to the repo, not released as binaries. You should clone this repo and build it from source.

When trying to build from source, I got this error:

1.614 E: Unable to locate package ros-rolling-example-interfaces
1.614 ERROR: the following rosdeps failed to install
1.614   apt: command [apt-get install -y ros-rolling-example-interfaces] failed
1.616 executing command [apt-get install -y ros-rolling-example-interfaces]

which is being trigger by this command: rosdep install --from-paths src --ignore-src --rosdistro=$ROS_DISTRO -y

If I switch from Rolling to Jazzy, building from source works, and launching the bridge also works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants