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

The plugin [DataLoad ROS bags] thrown the following exception: Variant::extract -> wrong type #37

Open
yvonl opened this issue Jan 21, 2022 · 2 comments
Assignees

Comments

@yvonl
Copy link

yvonl commented Jan 21, 2022

Hi,

I have a custom ROS message VisualizationData and a bagfile containing built-in ROS messages (like std_msgs/Bool, sensor_msgs/Imu, ...) and others custom ROS messages (including VisualizationData). When I load the bagfile, if I select the topic with Datatype VisualizationData, plotjuggler fails with error:

image

I don't have this issue with the others custom ROS messages.

OS: Ubuntu 20.04
Plotjuggler: from snap, PlotJuggler-3 3.0.7

VisualizationData is a composition of built-in ROS type/fixed-length and variable-length array and custom ROS messages :

VisualizationData.msg

Header header

int64 image_counter
bool zero_velocity_update

int8[] camera_id_array
FrameInfo[] frames

FrameInfo.msg

Point2D[] candidates
Landmark[] landmarks
LandmarkUncertainty[] landmark_uncertainties
NewLandmark[] new_landmarks
PatchInfo[] patches

float64 roll
float64 pitch

Point2D.msg

float32 x
float32 y

Landmark.msg

uint8 LANDMARK_FINAL = 0
uint8 LANDMARK_SURROUNDING_GOOD = 1
uint8 LANDMARK_SURROUNDING_BAD = 2
uint8 LANDMARK_NOT_CONVERGED = 3
uint8 LANDMARK_INTENSITY_ERROR = 4

uint8 status
Point2D point

LandmarkUncertainty.msg

Point2D point
uint32 number

float64 sigma1
float64 sigma2
float64 sigma_angle

NewLandmark.msg

uint8 NEW_LANDMARK_CANDIDATE = 0
uint8 NEW_LANDMARK_CONVERGED_VALID = 1
uint8 NEW_LANDMARK_CONVERGED_REJECTED = 2
uint8 NEW_LANDMARK_NOT_CONVERGED = 3

uint8 status
Point2D point
uint32 number

PatchInfo.msg

uint8 PATCH_SUCCESS = 0
uint8 PATCH_NOT_IN_FRAME = 1
uint8 PATCH_OUTLIER = 2
uint8 PATCH_NOT_CONVERGED = 3
uint8 PATCH_TOO_LARGE_INTENSITY_ERROR = 4

uint8 status
Point2D point
Point2D[4] corners
float64 data

I tracked down the issue to ros1_parser.cpp: IntrospectionParser::parseMessage and the functions raising the exception to variant.hpp: Variant::extract. But I don't know why it fails to parse the message, given its definition.

Any idea what may be causing this?

@facontidavide
Copy link
Contributor

can you give me a rosbag to replicate the error?

@facontidavide facontidavide self-assigned this Feb 11, 2022
@yvonl
Copy link
Author

yvonl commented Feb 15, 2022

Yes, of course. With this bagfile visualizationData-wrong_type.zip you should be able to reproduce the error.

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

2 participants