Skip to content

Commit

Permalink
Merge branch 'humble' into humble
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahr authored Jul 26, 2024
2 parents 53bcc5a + d26ec06 commit 2a3b903
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan
ControllersMap::iterator c = managed_controllers_.find(it);
if (c != managed_controllers_.end())
{ // controller belongs to this manager
request->stop_controllers.push_back(c->second.name);
request->deactivate_controllers.push_back(c->second.name);
claimed_resources.right.erase(c->second.name); // remove resources
}
}
Expand All @@ -430,16 +430,16 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan
ControllersMap::iterator c = managed_controllers_.find(it);
if (c != managed_controllers_.end())
{ // controller belongs to this manager
request->start_controllers.push_back(c->second.name);
request->activate_controllers.push_back(c->second.name);
for (const auto& required_resource : c->second.required_command_interfaces)
{
resources_bimap::right_const_iterator res = claimed_resources.right.find(required_resource);
if (res != claimed_resources.right.end())
{ // resource is claimed
if (std::find(request->stop_controllers.begin(), request->stop_controllers.end(), res->second) ==
request->stop_controllers.end())
if (std::find(request->deactivate_controllers.begin(), request->deactivate_controllers.end(),
res->second) == request->deactivate_controllers.end())
{
request->stop_controllers.push_back(res->second); // add claiming controller to stop list
request->deactivate_controllers.push_back(res->second); // add claiming controller to stop list
}
claimed_resources.left.erase(res->second); // remove claimed resources
}
Expand All @@ -451,7 +451,7 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan
// successfully activated or deactivated.
request->strictness = controller_manager_msgs::srv::SwitchController::Request::STRICT;

if (!request->start_controllers.empty() || !request->stop_controllers.empty())
if (!request->activate_controllers.empty() || !request->deactivate_controllers.empty())
{ // something to switch?
auto result_future = switch_controller_service_->async_send_request(request);
if (result_future.wait_for(std::chrono::duration<double>(SERVICE_CALL_TIMEOUT)) == std::future_status::timeout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ void PlanningSceneRender::renderPlanningScene(const planning_scene::PlanningScen
color.r = c.r;
color.g = c.g;
color.b = c.b;
color.a = c.a;
alpha = c.a;
}
for (std::size_t j = 0; j < object->shapes_.size(); ++j)
Expand Down

0 comments on commit 2a3b903

Please sign in to comment.