-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
provide createMarker() #1183
provide createMarker() #1183
Conversation
@dhood: ping |
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.
Thanks for the refactor! (and for your patience 😄 ) This looks good overall, I just have a couple of comments
#include "rviz/default_plugin/markers/points_marker.h" | ||
#include "rviz/default_plugin/markers/text_view_facing_marker.h" | ||
#include "rviz/default_plugin/markers/mesh_resource_marker.h" | ||
#include "rviz/default_plugin/markers/triangle_list_marker.h" |
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.
Could you move the new function to a separate file so this doesn't need to know about the derived classes
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.
Fair enough. I'm not good at inventing new (file) names. I went for marker_utils.h/cpp
.
return new rviz::TriangleListMarker(owner, context, parent_node); | ||
|
||
default: | ||
ROS_ERROR("Unknown marker type: %d", marker_type); |
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.
Please move the decision to print the error message to the callers
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.
Done.
2d55812
to
80b5d06
Compare
@dhood I applied the requested changes, but I face some unrelated problems building on my system. Was there a recent change to
|
A UniquePtr interface has been added for platforms supporting c++11 by default. But that was a while ago so I dont expect that to be the cause of the problem here. As the 2 PR jobs passed my guess is that there is something different between your setup and the farm. There have been some changes in pluginlib recently but your console output seems the include the latest headers so I'm not sure what is different between your setup and the buildfarm... |
Rebuilding my whole workspace solved my local build issues. Tests succeeded. |
on both sides or neither is fine, asymmetric makes me itch :)
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.
Changes lgtm, and it looks like @dhood's comments were addressed, though I'll let her rereview before merging.
I made a few small style changes.
thanks! |
May I ask for a central
createMarker()
function to create an rviz Marker given a specific marker type?This functionality was already coded twice in rviz itself and - as I need it in an external project now - I would go for another copy otherwise.
This PR provides the requested functionality to create markers based on the known marker types in
visualization_msgs::Marker
at the core location, which knows about all these types.