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

Add a warning if Ros is not initialized #2

Open
Daenyx opened this issue Feb 17, 2022 · 2 comments
Open

Add a warning if Ros is not initialized #2

Daenyx opened this issue Feb 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Daenyx
Copy link

Daenyx commented Feb 17, 2022

Describe the bug
I got no display of the image transport on Qt

Expected behavior
I excepted the topic image transport to display

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • ROS: Melodic
  • Qt: 5.9.5

Additional context

  • When i launch my app on Qt i see the topic it tried to subscribe ("/usb_cam/image_raw/compressed") but nothing appear on the app but usb_cam package topic works perfectly

Code

Item {
  x: 440
  y: 261
  width: 400
  height: 400

  ImageTransportSubscriber {
    id: imageSubscriber
    topic: "/usb_cam/image_raw"
    throttleRate: 0.2 // 1 frame every 5 seconds
    defaultTransport: "compressed"
  }

  VideoOutput {
      width: 400
      height: 400
      source: imageSubscriber
  }
}
@Daenyx Daenyx added the bug Something isn't working label Feb 17, 2022
@Daenyx
Copy link
Author

Daenyx commented Feb 17, 2022

Finally it worked i had to add
Component.onCompleted: { Ros.init("image_subscriber") }
at the end.

@Daenyx Daenyx closed this as completed Feb 17, 2022
@StefanFabian StefanFabian added enhancement New feature or request and removed bug Something isn't working labels Feb 17, 2022
@StefanFabian StefanFabian changed the title No display of video in app Add a warning if Ros is not initialized Feb 17, 2022
@StefanFabian
Copy link
Owner

Glad you figured it out on your own. It's documented on the Ros singleton page but I think it makes sense to add a warning if after 5 seconds Ros was not initialized.

@StefanFabian StefanFabian reopened this Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants