aurora-opensource / xviz

A protocol for real-time transfer and visualization of autonomy data

Home Page:http://xviz.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Style set_fill_color in Protobuf Format not working

jruebsam opened this issue · comments

I currently try to write some xviz messages in C++ using the protobuf files defined in this repository.
However, I am not getting color settings to work e.g. I do something like:

    auto style = current_poly->mutable_base()->mutable_style();
    std::string fill_color{"#142FF8"};
    style->set_fill_color(fill_color);

but in the streetscape.gl visualizer the color is not properly set.
I assume this is due to the default base64 encoding in the protobuf.js library?
is there any workaround ?

Cheers

commented

I'm also writing a C++ framework for xviz and there it works really good and without any problems. I mostly use it for points.
Which style is that?
(Edit) I use currently JSON and it works really fine. so maybe a problem with the protobuf lib.

This is an object style. Yes this issue only appears when using the protobuf classes, I guess due to some base64 encoding.

Solved by not using color strings instead color arrays