ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

roslibjs does not receive message containing sensor_msgs/CompressedImage field

asked 2021-10-05 10:47:11 -0500

twdragon gravatar image

updated 2021-10-06 02:17:00 -0500

gvdhoorn gravatar image

I tried to create the custom message encapsulating several sensor_msgs/CompressedImage fields. I planned to connect it with roslibjs to display the images on the webpage. But the web application does not receive anything. Actually, I cannot even to catch the message receiving event. The message type is set up correctly. The publisher is saying the following:

[WARN] [1633447998.427242]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details

Message structure:

Header header
sensor_msgs/CompressedImage raw_frame
sensor_msgs/CompressedImage annotated_frame
sensor_msgs/CompressedImage depth_map
bool has_detections
roi[] detections

where roi is another custom message. When I am trying to pass just sensor_msgs/CompressedImage everything works. Could you please help me to investigate why?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-10-06 07:24:40 -0500

Mike Scheutzow gravatar image

You need to specify the correct package name for the detections field, just like you did with CompressedImage. There was likely an error message telling you this message type failed to compile.

edit flag offensive delete link more
0

answered 2021-10-05 18:43:46 -0500

miura gravatar image

I think it would be a good idea to create a custom message for roi. For example

uint16[] data

as roi.msg, you can use roi[] in other custom messages.

edit flag offensive delete link more

Comments

There are other possible definitions of roi.

uint16 x1
uint16 y1
uint16 x2
uint16 y2
miura gravatar image miura  ( 2021-10-05 18:44:12 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-10-05 10:47:11 -0500

Seen: 104 times

Last updated: Oct 06 '21