NVIDIA-ISAAC-ROS / isaac_ros_pose_estimation

Deep learned, NVIDIA-accelerated 3D object pose estimation
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
142 stars 21 forks source link

How to use realsense 435i on DOPE (about ros2 topic node) #35

Open umegan opened 6 months ago

umegan commented 6 months ago

On the quickrun page, I was able to run ros2 bag but don't know how to replace it with realsense 435i.

isaac_ros_dope lauch code:

ros2 launch isaac_ros_dope isaac_ros_dope_tensor_rt.launch.py model_file_path:=/tmp/models/redbull_60.onnx engine_file_path:=/tmp/models/redbull_60.plan

realsense lauch code:

ros2 run realsense2_camera realsense2_camera_node

realsense topic:

/color/camera_info /color/image_raw

rosbag info:

Files: dope_rosbag_0.db3 Bag size: 6.0 MiB Storage id: sqlite3 Duration: 0.5s Start: Oct 10 2023 03:46:35.884 (1696877195.884) End: Oct 10 2023 03:46:35.889 (1696877195.889) Messages: 2 Topic information: Topic: /camera_info | Type: sensor_msgs/msg/CameraInfo | Count: 1 | Serialization Format: cdr Topic: /image | Type: sensor_msgs/msg/Image | Count: 1 | Serialization Format: cdr

rqt grapth of rosbag and image resize node

Screenshot from 2024-03-18 17-40-17

umegan commented 5 months ago

Still confuse why subscribe of image resize subscribers dose not change,

I did replace "image" with "/color/image_raw" then colcon build --merge-install but not thing has change. Please tell me if I miss some step.

resize_node.cpp

using nvidia::gxf::optimizer::GraphIOGroupSupportedDataTypesInfoList;

constexpr char INPUT_CAM_COMPONENT_KEY[] = "input_compositor/cam_info_in";
constexpr char INPUT_DEFAULT_CAM_INFO_FORMAT[] = "nitros_camera_info";
constexpr char INPUT_CAM_TOPIC_NAME[] = "/color/camera_info";
// constexpr char INPUT_CAM_TOPIC_NAME[] = "camera_info";

constexpr char INPUT_COMPONENT_KEY[] = "input_compositor/image_in";
constexpr char INPUT_DEFAULT_TENSOR_FORMAT[] = "nitros_image_bgr8";
constexpr char INPUT_TOPIC_NAME[] = "/color/image_raw";
// constexpr char INPUT_TOPIC_NAME[] = "image";

Terminal

admin@anpc:/workspaces/isaac_ros-dev$ ros2 node info /image_resize
/image_resize
  Subscribers:
    /camera_info: sensor_msgs/msg/CameraInfo
    /camera_info/nitros: negotiated_interfaces/msg/NegotiatedTopicsInfo
    /image: sensor_msgs/msg/Image
    /image/nitros: negotiated_interfaces/msg/NegotiatedTopicsInfo
    /parameter_events: rcl_interfaces/msg/ParameterEvent
  Publishers:
    /parameter_events: rcl_interfaces/msg/ParameterEvent
    /resize/camera_info: sensor_msgs/msg/CameraInfo
    /resize/camera_info/nitros: negotiated_interfaces/msg/NegotiatedTopicsInfo
    /resize/image: sensor_msgs/msg/Image
    /resize/image/nitros: negotiated_interfaces/msg/NegotiatedTopicsInfo
    /resize/image/nitros/nitros_image_rgb8: sensor_msgs/msg/Image
    /rosout: rcl_interfaces/msg/Log
  Service Servers:
    /image_resize/describe_parameters: rcl_interfaces/srv/DescribeParameters
    /image_resize/get_parameter_types: rcl_interfaces/srv/GetParameterTypes
    /image_resize/get_parameters: rcl_interfaces/srv/GetParameters
    /image_resize/list_parameters: rcl_interfaces/srv/ListParameters
    /image_resize/set_parameters: rcl_interfaces/srv/SetParameters
    /image_resize/set_parameters_atomically: rcl_interfaces/srv/SetParametersAtomically
  Service Clients:

  Action Servers:

  Action Clients:

ros2 launch isaac_ros_dope isaac_ros_dope_tensor_rt.launch.py model_file_path:=/tmp/models/Ketchup.onnx engine_file_path:=/tmp/models/Ketchup.plan

[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/dope_decoder' in container '/dope_container'
[component_container_mt-1] [INFO] [1711709174.051054469] [image_resize]: [NitrosNode] Starting post negotiation setup
[component_container_mt-1] [INFO] [1711709174.051194441] [image_resize]: [NitrosNode] Getting data format negotiation results
[component_container_mt-1] [INFO] [1711709174.051253344] [image_resize]: [NitrosPublisher] Use the negotiated data format: "nitros_image_rgb8"
[component_container_mt-1] [INFO] [1711709174.051292489] [image_resize]: [NitrosPublisher] Negotiation ended with no results
[component_container_mt-1] [INFO] [1711709174.051323652] [image_resize]: [NitrosPublisher] Use only the compatible publisher: topic_name="/resize/camera_info", data_format="nitros_camera_info"
[component_container_mt-1] [INFO] [1711709174.051356974] [image_resize]: [NitrosSubscriber] Negotiation ended with no results
[component_container_mt-1] [INFO] [1711709174.051388057] [image_resize]: [NitrosSubscriber] Use the compatible subscriber: topic_name="/image", data_format="nitros_image_bgr8"
[component_container_mt-1] [INFO] [1711709174.051420278] [image_resize]: [NitrosSubscriber] Negotiation ended with no results
[component_container_mt-1] [INFO] [1711709174.051448179] [image_resize]: [NitrosSubscriber] Use the compatible subscriber: topic_name="/camera_info", data_format="nitros_camera_info"
[component_container_mt-1] [INFO] [1711709174.051537405] [image_resize]: [NitrosPublisherSubscriberGroup] Adjusted the compatible format of the component "input_compositor/image_in" (type="nvidia::gxf::DoubleBufferReceiver") from "nitros_image_bgr8" to "nitros_image_rgb8"