diff --git a/README.md b/README.md index e0e99227566a019edbc476c7bdcfb6bd24f8372e..07bd9885fe6ef1c973a7a6493de935e11a8b536b 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ Make sure to connect the **SCL** and **SDA** lines for I2C communication, as wel performance. ## How It Works + - ```bash ros2 run serial_to_pcl serial_to_pcl_node ``` diff --git a/workspaces/COLCON_WS/src/serial_to_pcl/serial_to_pcl/serial_to_pcl_node.py b/workspaces/COLCON_WS/src/serial_to_pcl/serial_to_pcl/serial_to_pcl_node.py index 10b254e73ba4a8b27d179217d2296caac89ec3a8..d90094ae0cfe9a4c81d00efb05b24495668a7908 100644 --- a/workspaces/COLCON_WS/src/serial_to_pcl/serial_to_pcl/serial_to_pcl_node.py +++ b/workspaces/COLCON_WS/src/serial_to_pcl/serial_to_pcl/serial_to_pcl_node.py @@ -31,7 +31,8 @@ class SerialListPublisher(Node): super().__init__('serial_to_pcl_node') # Initialize the ROS 2 node with a name self.declare_parameter('parent_frame', 'vl53l7cx_link') # Declare a parameter for the parent frame self.parent_frame = self.get_parameter('parent_frame').get_parameter_value().string_value # Get the parameter value - + self.declare_parameter('usb_port', serial_port) + serial_port = self.get_parameter('usb_port').get_parameter_value().string_value # Create a publisher for PointCloud2 messages self.pcd_publisher = self.create_publisher(PointCloud2, 'pcl', 10)