Skip to content

Commit a9f4373

Browse files
authored
Rename ROS 2 publisher to node (#374)
It encapsulates a ROS 2 node, not a publisher. A publisher in ROS 2 is an entity that publishes an individual topic.
1 parent f420f71 commit a9f4373

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/build-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ jobs:
310310
-e NV_CXR_RUNTIME_DIR="$CXR_HOST_VOLUME_PATH/.cloudxr/run" \
311311
-e XR_RUNTIME_JSON="$CXR_HOST_VOLUME_PATH/.cloudxr/openxr_cloudxr.json" \
312312
--entrypoint bash teleop_ros2_ref:${{ env.ROS_DISTRO }} -c \
313-
"source /usr/local/bin/teleop-env-setup && timeout -s SIGINT 5 uv run teleop_ros2_publisher.py --ros-args -p mode:=$mode -p use_mock_operators:=true > $LOG_FILE 2>&1; rc=\$?; [ \$rc -eq 130 ] || [ \$rc -eq 124 ] || exit 1" || docker_rc=$?
313+
"source /usr/local/bin/teleop-env-setup && timeout -s SIGINT 5 uv run teleop_ros2_node.py --ros-args -p mode:=$mode -p use_mock_operators:=true > $LOG_FILE 2>&1; rc=\$?; [ \$rc -eq 130 ] || [ \$rc -eq 124 ] || exit 1" || docker_rc=$?
314314
315315
if [ -f "$LOG_FILE" ]; then
316316
cat "$LOG_FILE"

examples/teleop_ros2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ RUN echo "source /usr/local/bin/teleop-env-setup" >> /etc/bash.bashrc
127127
# Pre-install Python dependencies so uv run doesn't download at every launch.
128128
RUN uv sync --no-dev
129129

130-
ENTRYPOINT ["/usr/local/bin/teleop-entrypoint", "uv", "run", "teleop_ros2_publisher.py"]
130+
ENTRYPOINT ["/usr/local/bin/teleop-entrypoint", "uv", "run", "teleop_ros2_node.py"]

examples/teleop_ros2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ docker run --rm --net=host --ipc=host \
8686
-r xr_teleop/hand:=my_robot/hand -r xr_teleop/ee_poses:=my_robot/ee_poses
8787
```
8888

89-
Available parameters: `rate_hz`, `mode`, `world_frame`, `right_wrist_frame`, `left_wrist_frame`, `left_finger_joint_names`, `right_finger_joint_names`. Use `ros2 param list /teleop_ros2_publisher` and `ros2 param describe /teleop_ros2_publisher <param>` (with the node running) for the full set.
89+
Available parameters: `rate_hz`, `mode`, `world_frame`, `right_wrist_frame`, `left_wrist_frame`, `left_finger_joint_names`, `right_finger_joint_names`. Use `ros2 param list /teleop_ros2_node` and `ros2 param describe /teleop_ros2_node <param>` (with the node running) for the full set.
9090

9191
By default, `left_finger_joint_names` and `right_finger_joint_names` use the prefixed TriHand names. If overridden, each parameter must provide 7 names in TriHand order (`thumb_rotation`, `thumb_proximal`, `thumb_distal`, `index_proximal`, `index_distal`, `middle_proximal`, `middle_distal`). Those names are threaded into the retargeter output and published on `xr_teleop/finger_joints`.
9292

93-
Available topics for remapping: `xr_teleop/hand`, `xr_teleop/ee_poses`, `xr_teleop/root_twist`, `xr_teleop/root_pose`, `xr_teleop/controller_data`, `xr_teleop/full_body`, `xr_teleop/finger_joints`. Active remaps can be inspected with `ros2 node info /teleop_ros2_publisher`.
93+
Available topics for remapping: `xr_teleop/hand`, `xr_teleop/ee_poses`, `xr_teleop/root_twist`, `xr_teleop/root_pose`, `xr_teleop/controller_data`, `xr_teleop/full_body`, `xr_teleop/finger_joints`. Active remaps can be inspected with `ros2 node info /teleop_ros2_node`.
9494

9595
### Mode
9696

examples/teleop_ros2/python/teleop_ros2_publisher.py renamed to examples/teleop_ros2/python/teleop_ros2_node.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0
55

66
"""
7-
Teleop ROS2 Reference Publisher.
7+
Teleop ROS2 Reference Node.
88
99
Publishes teleoperation data over ROS2 topics using isaacteleop TeleopSession.
1010
The `mode` parameter selects the teleoperation scenario and which topics are
@@ -428,11 +428,11 @@ def _build_full_body_payload(full_body: OptionalTensorGroup) -> Dict:
428428
}
429429

430430

431-
class TeleopRos2PublisherNode(Node):
431+
class TeleopRos2Node(Node):
432432
"""ROS 2 node that publishes teleop data."""
433433

434434
def __init__(self) -> None:
435-
super().__init__("teleop_ros2_publisher")
435+
super().__init__("teleop_ros2_node")
436436

437437
self.declare_parameter("mode", "controller_teleop")
438438
self.declare_parameter("rate_hz", 60.0)
@@ -880,7 +880,7 @@ def main() -> int:
880880
rclpy.init()
881881
node = None
882882
try:
883-
node = TeleopRos2PublisherNode()
883+
node = TeleopRos2Node()
884884
return node.run()
885885
finally:
886886
if node is not None:

0 commit comments

Comments
 (0)