Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
CMake fix and cleanup abstract class (#6)
Browse files Browse the repository at this point in the history
* Install hybrid_planning_demo_node separately to avoid exporting it

* Fix exported include directory

* Remove getTargetWayPointIndex() from abstract trajectory operator class

* Delete unused getTargetWayPointIndex()
  • Loading branch information
AndyZe committed Dec 7, 2021
1 parent ba25036 commit 5cd1a5f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
10 changes: 8 additions & 2 deletions moveit_ros/hybrid_planning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,19 @@ rclcpp_components_register_nodes(moveit_hybrid_planning_manager "moveit::hybrid_
rclcpp_components_register_nodes(moveit_global_planner_component "moveit::hybrid_planning::GlobalPlannerComponent")
rclcpp_components_register_nodes(moveit_local_planner_component "moveit::hybrid_planning::LocalPlannerComponent")

install(TARGETS ${LIBRARIES} hybrid_planning_demo_node
install(TARGETS ${LIBRARIES}
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
INCLUDES DESTINATION include)

install(TARGETS hybrid_planning_demo_node
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
INCLUDES DESTINATION include)

install(DIRECTORY ${THIS_PACKAGE_INCLUDE_DIRS} DESTINATION include)

install(DIRECTORY test/launch DESTINATION share/${PROJECT_NAME})
Expand All @@ -86,7 +92,7 @@ pluginlib_export_plugin_description_file(moveit_hybrid_planning simple_sampler_p
pluginlib_export_plugin_description_file(moveit_hybrid_planning replan_invalidated_trajectory_plugin.xml)
pluginlib_export_plugin_description_file(moveit_hybrid_planning forward_trajectory_plugin.xml)

ament_export_include_directories(${THIS_PACKAGE_INCLUDE_DIRS})
ament_export_include_directories(include)
ament_export_libraries(${LIBRARIES})
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ class TrajectoryOperatorInterface
*/
virtual bool reset() = 0;

/** \brief Return the most recent target waypoint index */
virtual size_t getTargetWayPointIndex() = 0;

protected:
// Reference trajectory to be precessed
robot_trajectory::RobotTrajectoryPtr reference_trajectory_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class SimpleSampler : public TrajectoryOperatorInterface
robot_trajectory::RobotTrajectory& local_trajectory) override;
double getTrajectoryProgress(const moveit::core::RobotState& current_state) override;
bool reset() override;
size_t getTargetWayPointIndex() override;

private:
std::size_t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ SimpleSampler::getLocalTrajectory(const moveit::core::RobotState& current_state,
return feedback_;
}

size_t SimpleSampler::getTargetWayPointIndex()
{
return next_waypoint_index_;
}

double SimpleSampler::getTrajectoryProgress(const moveit::core::RobotState& current_state)
{
// Check if trajectory is unwinded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def generate_common_hybrid_launch_description():
robot_description_semantic,
kinematics_yaml,
planning_pipelines_config,
moveit_controllers
moveit_controllers,
],
),
ComposableNode(
Expand Down

0 comments on commit 5cd1a5f

Please sign in to comment.