Skip to content

Commit

Permalink
Merge branch master into splapp
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Dec 17, 2024
2 parents 794c9cc + 9e90254 commit 6cbcafe
Show file tree
Hide file tree
Showing 146 changed files with 3,653 additions and 3,517 deletions.
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: Create a report to help us improve
body:
- type: input
attributes:
label: Version
description: What version of `tesseract_planning` are you using?
placeholder: Post a tag (e.g., `0.25.0`) or commit hash (e.g., `12faec5`)
validations:
required: True

- type: dropdown
attributes:
label: OS Version
description: What OS version are you running?
options:
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
- MacOS 12
- MacOS 14
- Windows (MSVC 2019)
- Windows (MSVC 2022)
- Other (please specify in the bug description)
validations:
required: True

- type: textarea
attributes:
label: Describe the bug
placeholder: |
A clear and concise description of the bug
validations:
required: True

- type: textarea
attributes:
label: To Reproduce
placeholder: |
Describe the steps to reproduce the behavior
validations:
required: True

- type: textarea
attributes:
label: Expected behavior
placeholder: |
A clear and concise description of what you expected to happen.
validations:
required: True

- type: textarea
attributes:
label: Relevant log output
placeholder: |
Paste any relevant log output here (will be rendered as shell text)
render: shell
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature Request
description: Suggest an idea for this project
body:
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
placeholder: |
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: True

- type: textarea
attributes:
label: Describe the solution you'd like
placeholder: |
A clear and concise description of what you want to happen.
validations:
required: True

- type: textarea
attributes:
label: Describe alternatives you've considered
placeholder: |
A clear and concise description of any alternative solutions or features you've considered.
validations:
required: True

- type: textarea
attributes:
label: Additional context
placeholder: |
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
config:
- runner: macos-12
- runner: macos-13
vcpkg_triplet: x64-osx-dynamic-release
arch: x64
homebrew_root: /usr/local
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ jobs:
vcs-file: .github/workflows/windows_dependencies.repos
upstream-args: --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF -DVCPKG_APPLOCAL_DEPS=OFF
target-path: target_ws/src
target-args: --packages-ignore tesseract_examples --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=ON -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF -DVCPKG_APPLOCAL_DEPS=OFF
target-args: --event-handlers console_cohesion+ --packages-ignore tesseract_examples --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=ON -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF -DVCPKG_APPLOCAL_DEPS=OFF
run-tests-args: --packages-ignore tesseract_examples
1 change: 1 addition & 0 deletions tesseract_command_language/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ add_library(
src/poly/waypoint_poly.cpp
src/move_instruction.cpp
src/profile_dictionary.cpp
src/profile.cpp
src/set_analog_instruction.cpp
src/set_tool_instruction.cpp
src/timer_instruction.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_command_language/poly/instruction_poly.h>
#include <tesseract_command_language/constants.h>
#include <tesseract_command_language/types.h>
#include <tesseract_common/manipulator_info.h>
#include <tesseract_common/any_poly.h>

namespace tesseract_planning
{
class CompositeInstruction;
class ProfileDictionary;
struct MoveInstructionPoly;

/**
Expand Down Expand Up @@ -134,10 +134,10 @@ class CompositeInstruction
void print(const std::string& prefix = "") const;

void setProfile(const std::string& profile);
const std::string& getProfile() const;
const std::string& getProfile(const std::string& ns = "") const;

void setProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides);
std::shared_ptr<const ProfileDictionary> getProfileOverrides() const;
void setProfileOverrides(ProfileOverrides profile_overrides);
const ProfileOverrides& getProfileOverrides() const;

void setManipulatorInfo(tesseract_common::ManipulatorInfo info);
const tesseract_common::ManipulatorInfo& getManipulatorInfo() const;
Expand Down Expand Up @@ -409,7 +409,7 @@ class CompositeInstruction
std::string profile_{ DEFAULT_PROFILE_KEY };

/** @brief Dictionary of profiles that will override named profiles for a specific task*/
std::shared_ptr<const ProfileDictionary> profile_overrides_;
ProfileOverrides profile_overrides_;

/** @brief The order of the composite instruction */
CompositeInstructionOrder order_{ CompositeInstructionOrder::ORDERED };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ enum class WaitInstructionType : int;
class WaitInstruction;

// Profile Dictionary
class Profile;
class ProfileDictionary;
} // namespace tesseract_planning
#endif // TESSERACT_COMMAND_LANGUAGE_FWD_H
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_command_language/poly/move_instruction_poly.h>
#include <tesseract_command_language/poly/waypoint_poly.h>
#include <tesseract_command_language/constants.h>
#include <tesseract_command_language/types.h>
#include <tesseract_common/manipulator_info.h>

namespace tesseract_planning
Expand Down Expand Up @@ -139,16 +140,16 @@ class MoveInstruction
tesseract_common::ManipulatorInfo& getManipulatorInfo();

void setProfile(const std::string& profile);
const std::string& getProfile() const;
const std::string& getProfile(const std::string& ns = "") const;

void setPathProfile(const std::string& profile);
const std::string& getPathProfile() const;
const std::string& getPathProfile(const std::string& ns = "") const;

void setProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides);
std::shared_ptr<const ProfileDictionary> getProfileOverrides() const;
void setProfileOverrides(ProfileOverrides profile_overrides);
const ProfileOverrides& getProfileOverrides() const;

void setPathProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides);
std::shared_ptr<const ProfileDictionary> getPathProfileOverrides() const;
void setPathProfileOverrides(ProfileOverrides profile_overrides);
const ProfileOverrides& getPathProfileOverrides() const;

const std::string& getDescription() const;

Expand Down Expand Up @@ -183,10 +184,10 @@ class MoveInstruction
std::string path_profile_;

/** @brief Dictionary of profiles that will override named profiles for a specific task*/
std::shared_ptr<const ProfileDictionary> profile_overrides_;
ProfileOverrides profile_overrides_;

/** @brief Dictionary of path profiles that will override named profiles for a specific task*/
std::shared_ptr<const ProfileDictionary> path_profile_overrides_;
ProfileOverrides path_profile_overrides_;

/** @brief The assigned waypoint (Cartesian, Joint or State) */
WaypointPoly waypoint_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_command_language/poly/joint_waypoint_poly.h>
#include <tesseract_command_language/poly/state_waypoint_poly.h>
#include <tesseract_command_language/poly/waypoint_poly.h>
#include <tesseract_command_language/types.h>
#include <tesseract_common/manipulator_info.h>
#include <tesseract_common/type_erasure.h>
#include <tesseract_common/fwd.h>
Expand Down Expand Up @@ -127,11 +128,11 @@ struct MoveInstructionConcept // NOLINT
const std::string& path_profile_const = c.getPathProfile();
UNUSED(path_profile_const);

c.setProfileOverrides(nullptr);
c.setProfileOverrides(ProfileOverrides{});
auto profile_overrides = c.getProfileOverrides();
UNUSED(profile_overrides);

c.setPathProfileOverrides(nullptr);
c.setPathProfileOverrides(ProfileOverrides{});
auto path_profile_overrides = c.getPathProfileOverrides();
UNUSED(path_profile_overrides);

Expand Down Expand Up @@ -180,16 +181,16 @@ struct MoveInstructionInterface : tesseract_common::TypeErasureInterface
virtual tesseract_common::ManipulatorInfo& getManipulatorInfo() = 0;

virtual void setProfile(const std::string& profile) = 0;
virtual const std::string& getProfile() const = 0;
virtual const std::string& getProfile(const std::string& ns = "") const = 0;

virtual void setPathProfile(const std::string& profile) = 0;
virtual const std::string& getPathProfile() const = 0;
virtual const std::string& getPathProfile(const std::string& ns = "") const = 0;

virtual void setProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides) = 0;
virtual std::shared_ptr<const ProfileDictionary> getProfileOverrides() const = 0;
virtual void setProfileOverrides(ProfileOverrides profile_overrides) = 0;
virtual const ProfileOverrides& getProfileOverrides() const = 0;

virtual void setPathProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides) = 0;
virtual std::shared_ptr<const ProfileDictionary> getPathProfileOverrides() const = 0;
virtual void setPathProfileOverrides(ProfileOverrides profile_overrides) = 0;
virtual const ProfileOverrides& getPathProfileOverrides() const = 0;

virtual void setMoveType(MoveInstructionType move_type) = 0;
virtual MoveInstructionType getMoveType() const = 0;
Expand Down Expand Up @@ -244,28 +245,22 @@ struct MoveInstructionInstance : tesseract_common::TypeErasureInstance<T, MoveIn
tesseract_common::ManipulatorInfo& getManipulatorInfo() final { return this->get().getManipulatorInfo(); }

void setProfile(const std::string& profile) final { this->get().setProfile(profile); }
const std::string& getProfile() const final { return this->get().getProfile(); }
const std::string& getProfile(const std::string& ns = "") const final { return this->get().getProfile(ns); }

void setPathProfile(const std::string& profile) final { this->get().setPathProfile(profile); }
const std::string& getPathProfile() const final { return this->get().getPathProfile(); }
const std::string& getPathProfile(const std::string& ns = "") const final { return this->get().getPathProfile(ns); }

void setProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides) final
void setProfileOverrides(ProfileOverrides profile_overrides) final
{
this->get().setProfileOverrides(profile_overrides);
}
std::shared_ptr<const ProfileDictionary> getProfileOverrides() const final
{
return this->get().getProfileOverrides();
this->get().setProfileOverrides(std::move(profile_overrides));
}
const ProfileOverrides& getProfileOverrides() const final { return this->get().getProfileOverrides(); }

void setPathProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides) final
{
this->get().setPathProfileOverrides(profile_overrides);
}
std::shared_ptr<const ProfileDictionary> getPathProfileOverrides() const final
void setPathProfileOverrides(ProfileOverrides profile_overrides) final
{
return this->get().getPathProfileOverrides();
this->get().setPathProfileOverrides(std::move(profile_overrides));
}
const ProfileOverrides& getPathProfileOverrides() const final { return this->get().getPathProfileOverrides(); }

void setMoveType(MoveInstructionType move_type) final { this->get().setMoveType(move_type); }
MoveInstructionType getMoveType() const final { return this->get().getMoveType(); }
Expand Down Expand Up @@ -321,16 +316,16 @@ struct MoveInstructionPoly : MoveInstructionPolyBase
tesseract_common::ManipulatorInfo& getManipulatorInfo();

void setProfile(const std::string& profile);
const std::string& getProfile() const;
const std::string& getProfile(const std::string& ns = "") const;

void setPathProfile(const std::string& profile);
const std::string& getPathProfile() const;
const std::string& getPathProfile(const std::string& ns = "") const;

void setProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides);
std::shared_ptr<const ProfileDictionary> getProfileOverrides() const;
void setProfileOverrides(ProfileOverrides profile_overrides);
const ProfileOverrides& getProfileOverrides() const;

void setPathProfileOverrides(std::shared_ptr<const ProfileDictionary> profile_overrides);
std::shared_ptr<const ProfileDictionary> getPathProfileOverrides() const;
void setPathProfileOverrides(ProfileOverrides profile_overrides);
const ProfileOverrides& getPathProfileOverrides() const;

void setMoveType(MoveInstructionType move_type);
MoveInstructionType getMoveType() const;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* @file profile.h
* @brief This is a profile base class
*
* @author Levi Armstrong
* @date December 2, 2024
* @version TODO
* @bug No known bugs
*
* @copyright Copyright (c) 2024, 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_PROFILE_H
#define TESSERACT_MOTION_PLANNERS_PROFILE_H

#include <memory>
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>

namespace tesseract_planning
{
/**
* @brief The Profile class
*/
class Profile
{
public:
using Ptr = std::shared_ptr<Profile>;
using ConstPtr = std::shared_ptr<const Profile>;

Profile() = default;
Profile(std::size_t key);
Profile(const Profile&) = delete;
Profile& operator=(const Profile&) = delete;
Profile(Profile&&) = delete;
Profile&& operator=(Profile&&) = delete;
virtual ~Profile() = default;

/**
* @brief Get the hash code associated with the profile
* @return The profile's hash code
*/
std::size_t getKey() const;

protected:
std::size_t key_{ 0 };
friend class boost::serialization::access;
template <class Archive>
void serialize(Archive&, const unsigned int); // NOLINT
};
} // namespace tesseract_planning

BOOST_CLASS_EXPORT_KEY(tesseract_planning::Profile)

#endif // TESSERACT_MOTION_PLANNERS_PROFILE_H
Loading

0 comments on commit 6cbcafe

Please sign in to comment.