You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we know, ROS2 utilizes node classes for defining abstract "nodes" in a ROS Graph. This paradigm shift is in contrast to ROS1's simple and pure function definitions and calls. Because of this, nodes have attributes/fields that would otherwise be considered "global" in the context of ROS1.
In unity_bridge.py of the package sim_bridge. Fix the function calls so that the nodes actually work. The scoped variables within each function should be talking to each other. For example, add a self. before each attribute so that the variables become class attributes instead.
Examples
Example compare and contrast between ROS2 (left) and ROS1 (right):
Example code snippet where problem occurs:
The text was updated successfully, but these errors were encountered:
Problem
As we know, ROS2 utilizes node classes for defining abstract "nodes" in a ROS Graph. This paradigm shift is in contrast to ROS1's simple and pure function definitions and calls. Because of this, nodes have attributes/fields that would otherwise be considered "global" in the context of ROS1.
In
unity_bridge.py
of the packagesim_bridge
. Fix the function calls so that the nodes actually work. The scoped variables within each function should be talking to each other. For example, add aself.
before each attribute so that the variables become class attributes instead.Examples
Example compare and contrast between ROS2 (left) and ROS1 (right):
Example code snippet where problem occurs:
The text was updated successfully, but these errors were encountered: