Open Zephyr69 opened 1 year ago
But when it is launched along with my robot node
What's the meaning? Launching astra_pro_launch.py
in another launch file?
But when it is launched along with my robot node
What's the meaning? Launching
astra_pro_launch.py
in another launch file?
Right! It is simply included in another launch file, without any launch_arguments. The relavent logs when launching:
[robot_state_publisher-10] [INFO] [1669163211.233574408] [astra_state_publisher]: got segment camera_depth_frame [robot_state_publisher-10] [INFO] [1669163211.233721769] [astra_state_publisher]: got segment camera_depth_optical_frame [robot_state_publisher-10] [INFO] [1669163211.233793706] [astra_state_publisher]: got segment camera_link [robot_state_publisher-10] [INFO] [1669163211.233856010] [astra_state_publisher]: got segment camera_rgb_frame [robot_state_publisher-10] [INFO] [1669163211.233914986] [astra_state_publisher]: got segment camera_rgb_optical_frame [uvc_camera_node-9] [WARN] [1669163211.308858981] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [astra_camera_node-8] [INFO] [1669163211.447235840] [astra_wrapper]: Device "2bc5/0403@1/13" found. [astra_camera_node-8] [INFO] [1669163211.451206868] [astra_camera_node]: ir_frame_id = 'camera_ir_optical_frame' [astra_camera_node-8] [INFO] [1669163211.451467670] [astra_camera_node]: rgb_frame_id = 'camera_rgb_optical_frame' [astra_camera_node-8] [INFO] [1669163211.451551222] [astra_camera_node]: depth_frame_id = 'camera_depth_optical_frame'
[astra_camera_node-8] Warning: USB events thread - failed to set priority. This might cause loss of data...
[uvc_camera_node-9] [INFO] [1669163211.516445054] [uvc_camera_node]: Opening camera with vendor=0x2bc5, product=0x501, serial="", index=0
[astra_camera_node-8] Warning: USB events thread - failed to set priority. This might cause loss of data...
[astra_camera_node-8] [INFO] [1669163211.682229156] [astra_wrapper]: device name: Orbbec Astra Pro
[astra_camera_node-8] [INFO] [1669163211.684497103] [astra_camera_node]: depth_mode is Resolution: 640x480@30Hz Format: Depth 1mm
[astra_camera_node-8] [INFO] [1669163211.684769137] [astra_camera_node]: color mode is Resolution: 640x480@30Hz Format: RGB888
[astra_camera_node-8] [INFO] [1669163211.684917393] [astra_camera_node]: IR mode is Resolution: 640x480@30Hz Format: Gray16
[component_container-7] [INFO] [1669163211.848066730] [depth_image_proc_container]: Found class: rclcpp_components::NodeFactoryTemplate
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, GroupAction, IncludeLaunchDescription
from launch.substitutions import LaunchConfiguration
from launch.launch_description_sources import PythonLaunchDescriptionSource
def generate_launch_description():
bringup_dir = get_package_share_directory('ros2_astra_camera')
launch_dir = os.path.join(bringup_dir, 'launch')
enable_color_cloud = LaunchConfiguration('enable_color_cloud')
declare_enable_color_cloud_cmd = DeclareLaunchArgument(
'enable_color_cloud', default_value='False',
description='Whether to enable color cloud')
bringup_cmd_group = GroupAction([
IncludeLaunchDescription(
PythonLaunchDescriptionSource(os.path.join(launch_dir, 'astra_pro_launch.py')),
launch_arguments={'enable_color_cloud': enable_color_cloud}.items()),
])
ld = LaunchDescription()
ld.add_action(declare_enable_color_cloud_cmd)
ld.add_action(bringup_cmd_group)
return ld
I write the code which simply includes astra_pro_launch.py, But I can't reproduce the situation you met.
I'm encoutering a weird situation.
When the astra_pro_launch.py is launched alone, everything seems to work correctly. But when it is launched along with my robot node, although all topics are created, only color and ir images are published, and no image is published in any of the depth image topics. As soon as the robot node is shutdown, depth images start to be published correctly.
The console info during the launchs in both senarios are exactly the same, and TF shows no problem as indicated by rviz2.
What could be causing this?