From 2bb7799eea22302f49aeca499d8124996d05c687 Mon Sep 17 00:00:00 2001 From: John <134429827+jbrhm@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:01:43 -0400 Subject: [PATCH] Fixed topic names for ZED wrapper and Sim (#19) * ZED Naming conflicts * OD in the sim and on ZED * style * style --- perception/object_detector/object_detector.cpp | 2 +- perception/zed_wrapper/zed_wrapper.cpp | 10 +++++----- scripts/visualizer.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/perception/object_detector/object_detector.cpp b/perception/object_detector/object_detector.cpp index dc7f91e6..c5848f47 100644 --- a/perception/object_detector/object_detector.cpp +++ b/perception/object_detector/object_detector.cpp @@ -31,7 +31,7 @@ namespace mrover { } StereoObjectDetector::StereoObjectDetector() { - mSensorSub = create_subscription("/camera/left/points", 1, [this](sensor_msgs::msg::PointCloud2::UniquePtr const& msg) { + mSensorSub = create_subscription("/zed/left/points", 1, [this](sensor_msgs::msg::PointCloud2::UniquePtr const& msg) { StereoObjectDetector::pointCloudCallback(msg); }); } diff --git a/perception/zed_wrapper/zed_wrapper.cpp b/perception/zed_wrapper/zed_wrapper.cpp index cf35ca6b..3309cbcf 100644 --- a/perception/zed_wrapper/zed_wrapper.cpp +++ b/perception/zed_wrapper/zed_wrapper.cpp @@ -18,13 +18,13 @@ namespace mrover { RCLCPP_INFO(this->get_logger(), "Created Zed Wrapper Node, %s", NODE_NAME); // Publishers - mRightImgPub = create_publisher("right/image", 1); - mLeftImgPub = create_publisher("left/image", 1); + mRightImgPub = create_publisher("zed/right/image", 1); + mLeftImgPub = create_publisher("zed/left/image", 1); mImuPub = create_publisher("zed_imu/data_raw", 1); mMagPub = create_publisher("zed_imu/mag", 1); - mPcPub = create_publisher("camera/left/points", 1); - mRightCamInfoPub = create_publisher("camera/right/camera_info", 1); - mLeftCamInfoPub = create_publisher("camera/left/camera_info", 1); + mPcPub = create_publisher("zed/left/points", 1); + mRightCamInfoPub = create_publisher("zed/right/camera_info", 1); + mLeftCamInfoPub = create_publisher("zed/left/camera_info", 1); // Declare and set Params int imageWidth{}; diff --git a/scripts/visualizer.py b/scripts/visualizer.py index 5aae7a5d..336f9e67 100755 --- a/scripts/visualizer.py +++ b/scripts/visualizer.py @@ -112,7 +112,7 @@ def paintEvent(self, event): self.resize(self.renderer.defaultSize()) self.renderer.render(painter) - def update(self): + def update(self): # type: ignore[override] rclpy.spin_once(self.viz) with self.state_machine.mutex: if self.graph is None or self.state_machine.needs_redraw: