Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
umegan opened this issue Mar 18, 2024 · 1 comment
Open

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

umegan opened this issue Mar 18, 2024 · 1 comment

Comments

@umegan
Copy link

umegan commented Mar 18, 2024

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
Copy link
Author

umegan commented Mar 29, 2024

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant