Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Image panel: support custom message containing nested image #203

Closed
chenjunnn opened this issue Dec 16, 2021 · 10 comments
Closed

Image panel: support custom message containing nested image #203

chenjunnn opened this issue Dec 16, 2021 · 10 comments
Labels
feature A new feature or idea

Comments

@chenjunnn
Copy link

chenjunnn commented Dec 16, 2021

I'd like to publish multiple images in one msg, but foxglove studio can only visualize the standard image msg type.

The custom msg may be like:

sensor_msgs/Image raw1
sensor_msgs/Image raw2
sensor_msgs/CompressedImage compressed1
sensor_msgs/CompressedImage compressed2
@chenjunnn chenjunnn added the feature A new feature or idea label Dec 16, 2021
@defunctzombie
Copy link

@Chenjun00 Is there some limitation you have on-robot that prevents these from being sent as separate topics?

@jtbandes
Copy link
Member

Theoretically there is no reason the Image panel shouldn't be able to pull out one field of a message as long as that field has the expected format/datatype.

@chenjunnn
Copy link
Author

chenjunnn commented Dec 17, 2021

@Chenjun00 Is there some limitation you have on-robot that prevents these from being sent as separate topics?

I'm writing a node that using OpenCV to process image, so there are many debug images during the processing that I want to publish to visualize. If the images are sent as separate topics, I need to construct lots of publisher which I think is not convenient. But I have figured out a way that using a param to control which image to publish to a single topic. So if you think this feature is unnecessary, please close this issue.

And I'm looking forward to the feature https://github.com/foxglove/studio/issues/1662 to be supported.

@amacneil
Copy link
Contributor

Seems like a reasonable feature to support.

@defunctzombie @jtbandes how difficult would it be to show message fields that match a supported schemaName (in addition to topics that match a support schemaName) in the image selector dropdown?

@defunctzombie
Copy link

Somewhat challenging - tho not impossible. We'd need to figure out if we provide the name through our parsed RosDatatypes structure.

I'm just not convinced the UI complexity is worth it tho.

@jtbandes
Copy link
Member

What UI complexity? Wouldn't we just replace the dropdown in the Image panel with a MessagePathInput?

@defunctzombie
Copy link

@jtbandes Adrian actually proposed keeping a dropdown and in the dropdown showing all the detected renderable topics and fields.

An alternative could be to use MessagePathInput and pre-filter its items to the topics and message paths that are renderable. That could also work well.

@amacneil
Copy link
Contributor

Yeah, I think just predetermine all the message paths, and add them to the existing dropdown. That way for existing users without nested images, there will be no UI change.

@gayar-helm
Copy link

gayar-helm commented May 12, 2022

This could be a very useful feature. Our use case is that the image is published together with some meta information. e.g:

my_image_msg_type
{
meta_msg msg
sensor_msgs/Image image
}

Would it be possible to specify something like "my_msg.image" at the top of image panel? Just like described here - #203

@defunctzombie
Copy link

Would it be possible to specify something like "my_msg.image" at the top of image panel? Just like described here

Yep. Need to think through how we accomplish this in the implementation but I think the UX described above with a dropdown that supports selecting any topic or field that contains a matching datatype seems sensible.

@amacneil amacneil changed the title Panel:Image Support custom msg that contains images Image panel: support custom message containing nested image May 20, 2022
@amacneil amacneil transferred this issue from another repository Dec 16, 2022
@foxglove foxglove locked and limited conversation to collaborators Dec 16, 2022
@amacneil amacneil converted this issue into discussion #228 Dec 16, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature A new feature or idea
Development

No branches or pull requests

5 participants