Skip to content

Commit

Permalink
Use attached object colors as is in Rviz plugin (#3274) (#3278)
Browse files Browse the repository at this point in the history
(cherry picked from commit 870b23d)

Co-authored-by: Aleksey Nogin <[email protected]>
  • Loading branch information
mergify[bot] and ANogin authored Jan 27, 2025
1 parent 1380117 commit 73c386f
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,9 @@ void RobotStateVisualization::updateHelper(const moveit::core::RobotStateConstPt
{
std::map<std::string, std_msgs::msg::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_default_plugins::robot::RobotLink* link = robot_.getLink(attached_body->getAttachedLinkName());
Expand Down

0 comments on commit 73c386f

Please sign in to comment.