ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Building rclrs nodes causes python nodes to break

Open JustSomeRandomUsername opened this issue 2 years ago • 1 comments

I am getting an "AttributeError: 'ParameterDescriptor' object has no attribute 'dynamic_typing'" when trying to start python nodes after building a rclrs node and sourcing the installation.

If I don't build and source the rust node, the python node runs fine. But after I build the rust node and source the installation, I can't sart python nodes, even "ros2 topic list" and similar commands give this error.

For the "ros2 topic" command it seems to help to call it once before sourcing the rust node, then it continues to run normally. The same does not work for my python nodes.

I am running Ros-Humble in a podman container, with ros2_rust installed per instuctions.

JustSomeRandomUsername avatar Jan 23 '23 14:01 JustSomeRandomUsername

with ros2_rust installed per instructions

I think this may be your issue actually. The instructions in the readme have you clone the foxy repos

vcs import src < src/ros2_rust/ros2_rust_foxy.repos
. /opt/ros/foxy/setup.sh

You're likely hitting this line. This attribute is not present in foxy, seems to have been added in galactic.

I was able to reproduce with the following

  1. Follow the instructions as they are in the README and clone the foxy repos in the ros2_rust workspace.
  2. Source'd my system humble installation
  3. Source'd the ros2_rust workspace
  4. Ran the py_pubsub listener example
sam@orange:~/rust_ws_humble$ ros2 run py_pubsub listener 
Traceback (most recent call last):

...

AttributeError: 'ParameterDescriptor' object has no attribute 'dynamic_typing'
[ros2run]: Process exited with failure 1

So to resolve this, make sure you clone the humble repos

vcs import src < src/ros2_rust/ros2_rust_humble.repos

Clean your workspace build and install folders, rebuild, source, and you should be good.

maspe36 avatar Feb 25 '23 22:02 maspe36

In my setup, which is based on one of my Docker environments, I couldn't replicate your problem either. Would you like to tell us about your environment?

  • What is your hardware architecture?
  • Which Podman container do you use? Would you link it?
  • What were the nodes for that caused the crash?

Guelakais avatar Apr 11 '24 08:04 Guelakais

Thanks for looking at this. Ill be honest, I have not worked on the project I had this project in, for quite a while and I don't have the container anymore. I would be absolutly fine closing this, It seems to be a Problem only I had, so it might have been my fault. Sorry for forgetting about is issue. If you want to look into this deeper I would be happy trying to repoduce my old setup.

JustSomeRandomUsername avatar Apr 13 '24 10:04 JustSomeRandomUsername