Skip to content

Commit

Permalink
Use attached object colors as is in Rviz plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ANogin authored and rhaschke committed Jan 27, 2025
1 parent b7ac2f5 commit d6eebbd
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,9 @@ void RobotStateVisualization::updateHelper(const moveit::core::RobotStateConstPt
{
std::map<std::string, std_msgs::ColorRGBA>::const_iterator it = color_map->find(attached_body->getName());
if (it != color_map->end())
{ // render attached bodies with a color that is a bit different
color.r = std::max(1.0f, it->second.r * 1.05f);
color.g = std::max(1.0f, it->second.g * 1.05f);
color.b = std::max(1.0f, it->second.b * 1.05f);
alpha = color.a = it->second.a;
{
color = it->second;
alpha = color.a;
}
}
rviz::RobotLink* link = robot_.getLink(attached_body->getAttachedLinkName());
Expand Down

0 comments on commit d6eebbd

Please sign in to comment.