-
Notifications
You must be signed in to change notification settings - Fork 29
GT Room sink #47
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
GT Room sink #47
Conversation
nathanhhughes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| inline static const auto registration_ = | ||
| config::RegistrationWithConfig<UpdateRoomsFunctor::Sink, GtRoomPublisher, Config>( | ||
| "GtRoomPublisher"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better in the source file instead of in the class (I haven't gotten the chance to hide all of them yet in hydra / hydra-ros but that is my intention eventually, the frontend and backend modules are good examples of how to do this)
| room_publisher_ = nh_.create_publisher<visualization_msgs::msg::MarkerArray>( | ||
| "gt_room_boundaries", 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) I'd just do using visualization_msgs::msg::MarkerArray somewhere earlier to try and avoid the line break (room_publisher_ to pub_ would get you the rest of the way if it's not short enough with the using)
| visualization_msgs::msg::Marker m; | ||
| m.action = m.DELETEALL; | ||
| ma.markers.push_back(m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The auto& elem = container.emplace_back(); pattern would work here / would be pretty useful
| const std::vector<double> reds{0, .2, .4, .6, .8, 1}; | ||
| const std::vector<double> greens{1, .8, .6, .4, .2}; | ||
| const std::vector<double> blues{.4, .2, 0, 1}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just grab one of the visualizer colormaps instead of doing this (e.g., this is designed to do what you want)
No description provided.