bdaiinstitute / spot_ros2

ROS 2 driver package for Boston Dynamics' Spot
Other
157 stars 59 forks source link

Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED) #189

Closed PNisargkumar closed 10 months ago

PNisargkumar commented 10 months ago

I followed the instructions as given in the readme for the installation. But during the build I faced the following error/issue:

non-existent path "/usr/local/lib/python3.10/dist-packages/numpy/core/include" while building spot_msgs

I ran the following command to resolve the above error to build it successfully. sudo pip install --target=/usr/local/lib/python3.10/dist-packages numpy

Now when I launch the driver by setting the environment variable or using the config file it throws the following error:

[spot_image_publisher_node-2] [ERROR] [1699968764.025441927] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful

The driver does not crash it keeps throwing the error repeatedly. I am able to use rest of the services but don't receive images from spot.

For my spot which has a monochromatic camera also tried setting the variable "rgb_cameras" to False in the config.yaml (Closed Issue #64 )

Here is the log:

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [spot_ros2-1]: process started with pid [11845]
[INFO] [spot_image_publisher_node-2]: process started with pid [11847]
[INFO] [robot_state_publisher-3]: process started with pid [11849]
[INFO] [rviz2-4]: process started with pid [11851]
[INFO] [component_container_mt-5]: process started with pid [11853]
[rviz2-4] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[robot_state_publisher-3] [INFO] [1699969781.123349010] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1699969781.123462250] [robot_state_publisher]: got segment body
[robot_state_publisher-3] [INFO] [1699969781.123474883] [robot_state_publisher]: got segment front_left_hip
[robot_state_publisher-3] [INFO] [1699969781.123482908] [robot_state_publisher]: got segment front_left_lower_leg
[robot_state_publisher-3] [INFO] [1699969781.123490045] [robot_state_publisher]: got segment front_left_upper_leg
[robot_state_publisher-3] [INFO] [1699969781.123496724] [robot_state_publisher]: got segment front_rail
[robot_state_publisher-3] [INFO] [1699969781.123503018] [robot_state_publisher]: got segment front_right_hip
[robot_state_publisher-3] [INFO] [1699969781.123509464] [robot_state_publisher]: got segment front_right_lower_leg
[robot_state_publisher-3] [INFO] [1699969781.123516018] [robot_state_publisher]: got segment front_right_upper_leg
[robot_state_publisher-3] [INFO] [1699969781.123522819] [robot_state_publisher]: got segment rear_left_hip
[robot_state_publisher-3] [INFO] [1699969781.123529926] [robot_state_publisher]: got segment rear_left_lower_leg
[robot_state_publisher-3] [INFO] [1699969781.123536299] [robot_state_publisher]: got segment rear_left_upper_leg
[robot_state_publisher-3] [INFO] [1699969781.123542898] [robot_state_publisher]: got segment rear_rail
[robot_state_publisher-3] [INFO] [1699969781.123549245] [robot_state_publisher]: got segment rear_right_hip
[robot_state_publisher-3] [INFO] [1699969781.123555438] [robot_state_publisher]: got segment rear_right_lower_leg
[robot_state_publisher-3] [INFO] [1699969781.123562105] [robot_state_publisher]: got segment rear_right_upper_leg
[rviz2-4] [INFO] [1699969781.328865319] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-4] [INFO] [1699969781.329010539] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-4] [INFO] [1699969781.341668970] [rviz2]: Stereo is NOT SUPPORTED
[component_container_mt-5] [INFO] [1699969781.349106023] [container]: Load Library: /opt/ros/humble/lib/libdepth_image_proc.so
[component_container_mt-5] [INFO] [1699969781.393272579] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container_mt-5] [INFO] [1699969781.393319132] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container_mt-5] [INFO] [1699969781.393330508] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container_mt-5] [INFO] [1699969781.393333314] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container_mt-5] [INFO] [1699969781.393335937] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container_mt-5] [INFO] [1699969781.393338468] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container_mt-5] [INFO] [1699969781.393340919] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container_mt-5] [INFO] [1699969781.393343363] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container_mt-5] [INFO] [1699969781.393346035] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbRadialNode>
[component_container_mt-5] [INFO] [1699969781.393348693] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[component_container_mt-5] [INFO] [1699969781.393351390] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/register_node_frontleft' in container '/container'
[component_container_mt-5] [INFO] [1699969781.400968087] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container_mt-5] [INFO] [1699969781.401008611] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container_mt-5] [INFO] [1699969781.401018812] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container_mt-5] [INFO] [1699969781.401026832] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container_mt-5] [INFO] [1699969781.401034745] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container_mt-5] [INFO] [1699969781.401042066] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container_mt-5] [INFO] [1699969781.401049404] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container_mt-5] [INFO] [1699969781.401056444] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container_mt-5] [INFO] [1699969781.401064057] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbRadialNode>
[component_container_mt-5] [INFO] [1699969781.401071381] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[component_container_mt-5] [INFO] [1699969781.401078723] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/register_node_frontright' in container '/container'
[component_container_mt-5] [INFO] [1699969781.407925415] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container_mt-5] [INFO] [1699969781.407963133] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container_mt-5] [INFO] [1699969781.407972413] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container_mt-5] [INFO] [1699969781.407980248] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container_mt-5] [INFO] [1699969781.407987392] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container_mt-5] [INFO] [1699969781.407994269] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container_mt-5] [INFO] [1699969781.408001060] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container_mt-5] [INFO] [1699969781.408007794] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container_mt-5] [INFO] [1699969781.408039157] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbRadialNode>
[component_container_mt-5] [INFO] [1699969781.408048600] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[component_container_mt-5] [INFO] [1699969781.408055975] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/register_node_left' in container '/container'
[component_container_mt-5] [INFO] [1699969781.413655267] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container_mt-5] [INFO] [1699969781.413694098] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container_mt-5] [INFO] [1699969781.413703736] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container_mt-5] [INFO] [1699969781.413712104] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container_mt-5] [INFO] [1699969781.413721086] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container_mt-5] [INFO] [1699969781.413728174] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container_mt-5] [INFO] [1699969781.413735370] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container_mt-5] [INFO] [1699969781.413742098] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container_mt-5] [INFO] [1699969781.413748820] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbRadialNode>
[component_container_mt-5] [INFO] [1699969781.413755962] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[component_container_mt-5] [INFO] [1699969781.413763233] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/register_node_right' in container '/container'
[component_container_mt-5] [INFO] [1699969781.422484378] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::ConvertMetricNode>
[component_container_mt-5] [INFO] [1699969781.422537399] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::CropForemostNode>
[component_container_mt-5] [INFO] [1699969781.422549102] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::DisparityNode>
[component_container_mt-5] [INFO] [1699969781.422557296] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzNode>
[component_container_mt-5] [INFO] [1699969781.422566116] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzRadialNode>
[component_container_mt-5] [INFO] [1699969781.422574455] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziNode>
[component_container_mt-5] [INFO] [1699969781.422582360] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyziRadialNode>
[component_container_mt-5] [INFO] [1699969781.422590659] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbNode>
[component_container_mt-5] [INFO] [1699969781.422598122] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::PointCloudXyzrgbRadialNode>
[component_container_mt-5] [INFO] [1699969781.422606017] [container]: Found class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[component_container_mt-5] [INFO] [1699969781.422613456] [container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<depth_image_proc::RegisterNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/register_node_back' in container '/container'
[rviz2-4] [INFO] [1699969781.494427616] [rviz2]: Stereo is NOT SUPPORTED
[spot_image_publisher_node-2] [ERROR] [1699969782.498538500] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_ros2-1] [INFO] [1699969782.817194351] [spot_ros2]: Hi from spot_driver.
[spot_ros2-1] [WARN] [1699969782.820031222] [spot_ros2]: The maximum individual task rate is 20.0 Hz. You have manually set the async_tasks_rate to 10.0 which is lower and will decrease the frequency of one of the periodic tasks being run.
[spot_ros2-1] [INFO] [1699969782.824165607] [spot_ros2]: Starting ROS driver for Spot
[spot_image_publisher_node-2] [ERROR] [1699969783.622169738] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_ros2-1] [INFO] [1699969783.985452827] [spot_ros2]: Found estop!
[spot_ros2-1] [INFO] [1699969784.193417363] [spot_ros2]: Driver successfully started!
[spot_image_publisher_node-2] [ERROR] [1699969784.655764281] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969785.471195464] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969786.192535350] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969786.896919144] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969787.517735590] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969788.160070294] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969788.804019659] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969789.418391386] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
[spot_image_publisher_node-2] [ERROR] [1699969790.015747070] [image_publisher]: Failed to get images: Failed to get images: 6(STATUS_UNSUPPORTED_PIXEL_FORMAT_REQUESTED): ImageResponse ::bosdyn::common::Status unsuccessful
joshuaoreilly commented 10 months ago

Does your Spot have the arm mounted on top? If so, can you replace this line:

image_request->set_pixel_format(bosdyn::api::Image_PixelFormat_PIXEL_FORMAT_RGB_U8);

with:

if (source.camera == SpotCamera::HAND) {
    image_request->set_pixel_format(bosdyn::api::Image_PixelFormat_PIXEL_FORMAT_RGB_U8);
}
else {
    image_request->set_pixel_format(has_rgb_cameras ? bosdyn::api::Image_PixelFormat_PIXEL_FORMAT_RGB_U8
                                                        : bosdyn::api::Image_PixelFormat_PIXEL_FORMAT_GREYSCALE_U8);
}

re-compile/re-source, and try running again with rgb_cameras: False in your config file?

PNisargkumar commented 10 months ago

I installed the branch greyscale_cam and the issue is resolved.