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

Add SimplePlannerLVSAssignPlanProfile, SimplePlannerLVSAssignNoIKPlanProfile, SimplePlannerFixedSizeAssignPlanProfile (with IK), rename SimplePlannerFixedSizeAssignNoIKPlanProfile #448

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion tesseract_motion_planners/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ add_library(
src/profile/simple_planner_lvs_plan_profile.cpp
src/profile/simple_planner_lvs_no_ik_plan_profile.cpp
src/profile/simple_planner_fixed_size_assign_plan_profile.cpp
src/profile/simple_planner_fixed_size_plan_profile.cpp)
src/profile/simple_planner_fixed_size_assign_no_ik_plan_profile.cpp
src/profile/simple_planner_fixed_size_plan_profile.cpp
src/profile/simple_planner_lvs_assign_no_ik_plan_profile.cpp
src/profile/simple_planner_lvs_assign_plan_profile.cpp
src/profile/simple_planner_lvs_no_ik_plan_profile.cpp
src/profile/simple_planner_lvs_plan_profile.cpp)
target_link_libraries(${PROJECT_NAME}_simple PUBLIC ${PROJECT_NAME}_core Boost::boost)
target_compile_options(${PROJECT_NAME}_simple PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE})
target_compile_options(${PROJECT_NAME}_simple PUBLIC ${TESSERACT_COMPILE_OPTIONS_PUBLIC})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* @file simple_planner_fixed_size_assign_no_ik_plan_profile.h
* @brief
*
* @author Matthew Powelson
* @date July 23, 2020
* @version TODO
* @bug No known bugs
*
* @copyright Copyright (c) 2020, Southwest Research Institute
*
* @par License
* Software License Agreement (Apache License)
* @par
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* @par
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef TESSERACT_MOTION_PLANNERS_SIMPLE_FIXED_SIZE_ASSIGN_NO_IK_PLAN_PROFILE_H
#define TESSERACT_MOTION_PLANNERS_SIMPLE_FIXED_SIZE_ASSIGN_NO_IK_PLAN_PROFILE_H

#include <tesseract_motion_planners/simple/profile/simple_planner_profile.h>

namespace tesseract_planning
{
class SimplePlannerFixedSizeAssignNoIKPlanProfile : public SimplePlannerPlanProfile
{
public:
using Ptr = std::shared_ptr<SimplePlannerFixedSizeAssignNoIKPlanProfile>;
using ConstPtr = std::shared_ptr<const SimplePlannerFixedSizeAssignNoIKPlanProfile>;

/**
* @brief SimplePlannerFixedSizeAssignPlanProfile
* @param freespace_steps The number of steps to use for freespace instruction
* @param linear_steps The number of steps to use for linear instruction
*/
SimplePlannerFixedSizeAssignNoIKPlanProfile(int freespace_steps = 10, int linear_steps = 10);

std::vector<MoveInstructionPoly> generate(const MoveInstructionPoly& prev_instruction,
const MoveInstructionPoly& prev_seed,
const MoveInstructionPoly& base_instruction,
const InstructionPoly& next_instruction,
const std::shared_ptr<const tesseract_environment::Environment>& env,
const tesseract_common::ManipulatorInfo& global_manip_info) const override;

/** @brief The number of steps to use for freespace instruction */
int freespace_steps;

/** @brief The number of steps to use for linear instruction */
int linear_steps;

protected:
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive&, const unsigned int); // NOLINT
};

} // namespace tesseract_planning

BOOST_CLASS_EXPORT_KEY(tesseract_planning::SimplePlannerFixedSizeAssignNoIKPlanProfile)

#endif // TESSERACT_MOTION_PLANNERS_SIMPLE_FIXED_SIZE_ASSIGN_NO_IK_PLAN_PROFILE_H
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* @file simple_planner_default_plan_profile.h
* @file simple_planner_fixed_size_assign_plan_profile.h
* @brief
*
* @author Matthew Powelson
* @date July 23, 2020
* @author Roelof Oomen
* @date May 29, 2024
* @version TODO
* @bug No known bugs
*
* @copyright Copyright (c) 2020, Southwest Research Institute
* @copyright Copyright (c) 2024, ROS Industrial Consortium
*
* @par License
* Software License Agreement (Apache License)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file simple_planner_interpolation_plan_profile.h
* @file simple_planner_fixed_size_plan_profile.h
* @brief
*
* @author Matthew Powelson
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/**
* @file simple_planner_lvs_assign_no_ik_plan_profile.h
* @brief
*
* @author Roelof Oomen
* @date May 29, 2024
* @version TODO
* @bug No known bugs
*
* @copyright Copyright (c) 2024, ROS Industrial Consortium
*
* @par License
* Software License Agreement (Apache License)
* @par
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* @par
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef TESSERACT_MOTION_PLANNERS_SIMPLE_PLANNER_LVS_ASSIGN_NO_IK_PLAN_PROFILE_H
#define TESSERACT_MOTION_PLANNERS_SIMPLE_PLANNER_LVS_ASSIGN_NO_IK_PLAN_PROFILE_H

#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <Eigen/Geometry>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_motion_planners/simple/profile/simple_planner_profile.h>

namespace tesseract_planning
{
class SimplePlannerLVSAssignNoIKPlanProfile : public SimplePlannerPlanProfile
{
public:
using Ptr = std::shared_ptr<SimplePlannerLVSAssignNoIKPlanProfile>;
using ConstPtr = std::shared_ptr<const SimplePlannerLVSAssignNoIKPlanProfile>;

/**
* @brief SimplePlannerFixedSizeAssignPlanProfile
* @param freespace_steps The number of steps to use for freespace instruction
* @param linear_steps The number of steps to use for linear instruction
*/
SimplePlannerLVSAssignNoIKPlanProfile(double state_longest_valid_segment_length = 5 * M_PI / 180,
double translation_longest_valid_segment_length = 0.1,
double rotation_longest_valid_segment_length = 5 * M_PI / 180,
int min_steps = 1,
int max_steps = std::numeric_limits<int>::max());

std::vector<MoveInstructionPoly> generate(const MoveInstructionPoly& prev_instruction,
const MoveInstructionPoly& prev_seed,
const MoveInstructionPoly& base_instruction,
const InstructionPoly& next_instruction,
const std::shared_ptr<const tesseract_environment::Environment>& env,
const tesseract_common::ManipulatorInfo& global_manip_info) const override;

/** @brief The maximum joint distance, the norm of changes to all joint positions between successive steps. */
double state_longest_valid_segment_length;

/** @brief The maximum translation distance between successive steps */
double translation_longest_valid_segment_length;

/** @brief The maximum rotational distance between successive steps */
double rotation_longest_valid_segment_length;

/** @brief The minimum number of steps for the plan */
int min_steps;

/** @brief The maximum number of steps for the plan */
int max_steps;

protected:
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive&, const unsigned int); // NOLINT
};

} // namespace tesseract_planning

BOOST_CLASS_EXPORT_KEY(tesseract_planning::SimplePlannerLVSAssignNoIKPlanProfile)

#endif // TESSERACT_MOTION_PLANNERS_SIMPLE_PLANNER_LVS_ASSIGN_NO_IK_PLAN_PROFILE_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/**
* @file simple_planner_lvs_assign_plan_profile.h
* @brief
*
* @author Roelof Oomen
* @date March 19, 2024
* @version TODO
* @bug No known bugs
*
* @copyright Copyright (c) 2024, ROS Industrial Consortium
*
* @par License
* Software License Agreement (Apache License)
* @par
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* @par
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef TESSERACT_MOTION_PLANNERS_SIMPLE_PLANNER_LVS_ASSIGN_PLAN_PROFILE_H
#define TESSERACT_MOTION_PLANNERS_SIMPLE_PLANNER_LVS_ASSIGN_PLAN_PROFILE_H

#include <tesseract_common/macros.h>
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <Eigen/Geometry>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_motion_planners/simple/profile/simple_planner_profile.h>

namespace tesseract_planning
{
class SimplePlannerLVSAssignPlanProfile : public SimplePlannerPlanProfile
{
public:
using Ptr = std::shared_ptr<SimplePlannerLVSAssignPlanProfile>;
using ConstPtr = std::shared_ptr<const SimplePlannerLVSAssignPlanProfile>;

/**
* @brief SimplePlannerFixedSizeAssignPlanProfile
* @param freespace_steps The number of steps to use for freespace instruction
* @param linear_steps The number of steps to use for linear instruction
*/
SimplePlannerLVSAssignPlanProfile(double state_longest_valid_segment_length = 5 * M_PI / 180,
double translation_longest_valid_segment_length = 0.1,
double rotation_longest_valid_segment_length = 5 * M_PI / 180,
int min_steps = 1,
int max_steps = std::numeric_limits<int>::max());

std::vector<MoveInstructionPoly> generate(const MoveInstructionPoly& prev_instruction,
const MoveInstructionPoly& prev_seed,
const MoveInstructionPoly& base_instruction,
const InstructionPoly& next_instruction,
const std::shared_ptr<const tesseract_environment::Environment>& env,
const tesseract_common::ManipulatorInfo& global_manip_info) const override;

/** @brief The maximum joint distance, the norm of changes to all joint positions between successive steps. */
double state_longest_valid_segment_length;

/** @brief The maximum translation distance between successive steps */
double translation_longest_valid_segment_length;

/** @brief The maximum rotational distance between successive steps */
double rotation_longest_valid_segment_length;

/** @brief The minimum number of steps for the plan */
int min_steps;

/** @brief The maximum number of steps for the plan */
int max_steps;

protected:
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive&, const unsigned int); // NOLINT
};

} // namespace tesseract_planning

BOOST_CLASS_EXPORT_KEY(tesseract_planning::SimplePlannerLVSAssignPlanProfile)

#endif // TESSERACT_MOTION_PLANNERS_SIMPLE_PLANNER_LVS_ASSIGN_PLAN_PROFILE_H
Loading
Loading