Skip to content

Commit

Permalink
Remove support for Indigo's ros_control (moveit#2128)
Browse files Browse the repository at this point in the history
Code states "This can be removed upon EOL Indigo", which MoveIt has EOL'd
  • Loading branch information
davetcoleman authored and Pradeep Rajendran committed Jun 3, 2020
1 parent 538f047 commit c8b88e9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
5 changes: 0 additions & 5 deletions moveit_plugins/moveit_ros_control_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ catkin_package(
DEPENDS Boost
)

# support indigo's ros_control - This can be removed upon EOL indigo
if("${controller_manager_msgs_VERSION}" VERSION_LESS "0.10.0")
add_definitions(-DMOVEIT_ROS_CONTROL_INTERFACE_OLD_ROS_CONTROL)
endif()

include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

add_library(${PROJECT_NAME}_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
}

std::vector<std::string> resources;
#if defined(MOVEIT_ROS_CONTROL_INTERFACE_OLD_ROS_CONTROL)
resources = controller.resources;
#else
// Collect claimed resources across different hardware interfaces
for (const controller_manager_msgs::HardwareInterfaceResources& claimed_resource : controller.claimed_resources)
{
Expand All @@ -169,7 +166,6 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
resources.push_back(resource);
}
}
#endif

moveit_controller_manager::MoveItControllerHandlePtr handle =
alloc_it->second->alloc(name, resources); // allocate handle
Expand Down Expand Up @@ -268,15 +264,11 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
ControllersMap::iterator it = managed_controllers_.find(name);
if (it != managed_controllers_.end())
{
#if defined(MOVEIT_ROS_CONTROL_INTERFACE_OLD_ROS_CONTROL)
joints = it->second.resources;
#else
for (controller_manager_msgs::HardwareInterfaceResources& claimed_resource : it->second.claimed_resources)
{
std::vector<std::string>& resources = claimed_resource.resources;
joints.insert(joints.end(), resources.begin(), resources.end());
}
#endif
}
}

Expand Down Expand Up @@ -319,12 +311,6 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
for (std::pair<const std::string, controller_manager_msgs::ControllerState>& active_controller :
active_controllers_)
{
#if defined(MOVEIT_ROS_CONTROL_INTERFACE_OLD_ROS_CONTROL)
for (std::vector<std::string>::iterator r = c->second.resources.begin(); r != c->second.resources.end(); ++r)
{
claimed_resources.insert(resources_bimap::value_type(c->second.name, *r));
}
#else
for (std::vector<controller_manager_msgs::HardwareInterfaceResources>::iterator hir =
active_controller.second.claimed_resources.begin();
hir != active_controller.second.claimed_resources.end(); ++hir)
Expand All @@ -334,7 +320,6 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
claimed_resources.insert(resources_bimap::value_type(active_controller.second.name, resource));
}
}
#endif
}

controller_manager_msgs::SwitchController srv;
Expand All @@ -355,17 +340,6 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
if (c != managed_controllers_.end())
{ // controller belongs to this manager
srv.request.start_controllers.push_back(c->second.name);
#if defined(MOVEIT_ROS_CONTROL_INTERFACE_OLD_ROS_CONTROL)
for (std::vector<std::string>::iterator r = c->second.resources.begin(); r != c->second.resources.end(); ++r)
{ // for all claimed resource
resources_bimap::right_const_iterator res = claimed_resources.right.find(*r);
if (res != claimed_resources.right.end())
{ // resource is claimed
srv.request.stop_controllers.push_back(res->second); // add claiming controller to stop list
claimed_resources.left.erase(res->second); // remove claimed resources
}
}
#else
for (controller_manager_msgs::HardwareInterfaceResources& claimed_resource : c->second.claimed_resources)
{
for (const std::string& resource : claimed_resource.resources)
Expand All @@ -378,7 +352,6 @@ class MoveItControllerManager : public moveit_controller_manager::MoveItControll
}
}
}
#endif
}
}
srv.request.strictness = srv.request.STRICT;
Expand Down

0 comments on commit c8b88e9

Please sign in to comment.