Long Launch Time for Isaac ROS

Hi everyone,

I’ve been experiencing significant delays when launching Isaac ROS. It takes an unusually long time to start, and I’m unsure what might be causing this issue.

Has anyone else encountered similar problems? If so, what steps did you take to resolve or mitigate the long launch times? Any tips or guidance would be greatly appreciated!

Thanks in advance for your help!

Hi @tanisha.jain

Thank you for your topic. To better help you can you reply to my questions

  1. What type of setup are you using?
  2. Which demo are you running?
  3. Where are you experiencing these significant delays?

Best,
Raffaello

Hi Raffaello,
Thank you for your response.

  1. We’re using Jetson AGX Orin developer kit.
  2. We’re running the following demo, isaac_ros_detectnet — isaac_ros_docs documentation
  3. We’re facing the delays in this particular step,
    cd /workspaces/isaac_ros-dev &&
    ros2 launch isaac_ros_detectnet isaac_ros_detectnet_quickstart.launch.py

Thanks,
Tanisha

Thank you @tanisha.jain your reply is really helpful for me.

Can you please also share with me the log when the demo starts or in which lines the system is stuck?

Maybe it can be something related to the internet connection.

Thank you in advance,
Raffaello

Hi @Raffaello
Pls find the screenshot of the log attached.
Any insights in the context would be of great help!

Thanks,
Tanisha

Thank you for your screenshot.

Looking at your terminal, the component_container has crashed, which is why the demo is not starting. It’s possible that after switching off your docker container, you forgot to reinstall the dependencies.

If you switched off the docker container, please reinstall

sudo apt-get install -y ros-humble-isaac-ros-detectnet ros-humble-isaac-ros-triton ros-humble-isaac-ros-dnn-image-encoder

Hi @Raffaello
Thanks for your reply, we’re able to fix the error with your suggestion.
Could you pls guide on how to change the default image used by this model for detection? Basically seeking leads on how to run the model on a custom image.
Attaching a screenshot of the default image used by the model.

Thanks,
Tanisha

The default image is coming from a rosbag file.

But, the detectnet demo read from topic: /image you can stream to this topic without run the rosbag file.

You can also modify the original file below, changing topic and configuration:

Thank you for your reply.
Could use please elaborate on the steps to modify the file for changing topic and configuration.

Thank you in advance,
Tanisha

Hi @tanisha.jain

I made for you an example of ROS 2 node where you can publish an image starting from a file.

import rclpy
from rclpy.node import Node
from std_msgs.msg import String
from cv_bridge import CvBridge
from sensor_msgs.msg import Image, CameraInfo
import cv2
import numpy as np


class MinimalPublisher(Node):
    def __init__(self):
        super().__init__('minimal_publisher')
        self.publisher_ = self.create_publisher(Image, '/image', 10)
        self.publisher_info_ = self.create_publisher(CameraInfo, '/camera_info', 10)
        timer_period = 0.5  # seconds
        self.timer = self.create_timer(timer_period, self.timer_callback)
        self.i = 0
        self.im_list = []
        self.cv_image = cv2.imread('test.jpg')  # an RGB image

        self.bridge = CvBridge()
        self._camera_info = CameraInfo()
        self._camera_info.header.frame_id = 'optical_frame'
        self._camera_info.height = 720
        self._camera_info.width = 1280
        self._camera_info.distortion_model = 'plumb_bob'
        self._camera_info.d = [-0.010, 0.010, 0.00, 0.00, 0.00]
        self._camera_info.k = [484,0.0,630,0.0,485,373,0.0,0.0,1.0]
        self._camera_info.r = [0.99,-0.00,-0.01,0.00,0.99,0.00,0.01,-0.00,0.99]
        self._camera_info.p = [498,0.0,629,0.0,0.0,498,377,0.0,0.0,0.0,1.0,0.0]
        self._camera_info.binning_x = 0
        self._camera_info.binning_y = 0
        self._camera_info.roi.do_rectify = False

    def timer_callback(self):
        image = self.bridge.cv2_to_imgmsg(np.array(self.cv_image), "bgr8")
        self.publisher_.publish(image)
        self.publisher_info_.publish(self._camera_info)
        self.get_logger().info('Publishing an image')


def main(args=None):
    rclpy.init(args=args)
    minimal_publisher = MinimalPublisher()
    rclpy.spin(minimal_publisher)
    minimal_publisher.destroy_node()
    rclpy.shutdown()


if __name__ == '__main__':
    main()

The variables are dummies:

  • self._camera_info.d
  • camera_info.k
  • camera_info.r
  • camera_info.p

Please set an image on the same folder where you start this ROS 2 node with the name: test.jpg