Skip to content
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

Attached Collision Object Transparency #3093

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ void PlanningSceneDisplay::changedSceneName()
void PlanningSceneDisplay::renderPlanningScene()
{
QColor color = scene_color_property_->getColor();
Ogre::ColourValue env_color(color.redF(), color.greenF(), color.blueF());
Ogre::ColourValue env_color(color.redF(), color.greenF(), color.blueF(), scene_alpha_property_->getFloat());
if (attached_body_color_property_)
color = attached_body_color_property_->getColor();
Ogre::ColourValue attached_color(color.redF(), color.greenF(), color.blueF());
Ogre::ColourValue attached_color(color.redF(), color.greenF(), color.blueF(), robot_alpha_property_->getFloat());

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void PlanningSceneRender::renderPlanningScene(const planning_scene::PlanningScen
color.r = default_attached_color.r;
color.g = default_attached_color.g;
color.b = default_attached_color.b;
color.a = 1.0f;
color.a = default_attached_color.a;
planning_scene::ObjectColorMap color_map;
scene->getKnownObjectColors(color_map);
scene_robot_->update(moveit::core::RobotStateConstPtr(rs), color, color_map);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void RobotStateVisualization::updateHelper(const moveit::core::RobotStateConstPt
RCLCPP_ERROR_STREAM(getLogger(), "Link " << attached_body->getAttachedLinkName() << " not found in rviz::Robot");
continue;
}
Ogre::ColourValue rcolor(color.r, color.g, color.b);
Ogre::ColourValue rcolor(color.r, color.g, color.b, color.a);
const EigenSTL::vector_Isometry3d& ab_t = attached_body->getShapePosesInLinkFrame();
const std::vector<shapes::ShapeConstPtr>& ab_shapes = attached_body->getShapes();
for (std::size_t j = 0; j < ab_shapes.size(); ++j)
Expand Down
Loading