Skip to content

Commit

Permalink
Update due to changes with profile overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Dec 9, 2024
1 parent fe76a2f commit 5d4a628
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 56 deletions.
1 change: 0 additions & 1 deletion tesseract_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ add_message_files(
Mesh.msg
ObjectColor.msg
OctreeSubType.msg
PlannerProfileRemapping.msg
PlanningRequest.msg
PlanningResponse.msg
PluginInfo.msg
Expand Down
2 changes: 0 additions & 2 deletions tesseract_msgs/msg/PlannerProfileRemapping.msg

This file was deleted.

3 changes: 0 additions & 3 deletions tesseract_msgs/msg/PlanningRequest.msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ string input # This should an xml string of tesseract_common::AnyPoly
bool dotgraph # Enable if DOT Graph should be generated and returned
bool debug # Enable debug content
bool save_io # Enable saving of input and output for task infos

tesseract_msgs/PlannerProfileRemapping move_profile_remapping
tesseract_msgs/PlannerProfileRemapping composite_profile_remapping
7 changes: 0 additions & 7 deletions tesseract_planning_server/src/tesseract_planning_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,6 @@ struct TesseractPlanningServer::Implementation
data->setData("planning_input", std::move(planning_input));
data->setData("environment", std::shared_ptr<const tesseract_environment::Environment>(std::move(env)));
data->setData("profiles", profiles);
auto move_profile_remapping = tesseract_rosutils::fromMsg(goal->request.move_profile_remapping);
if (!move_profile_remapping.empty())
data->setData("move_profile_remapping", move_profile_remapping);

auto composite_profile_remapping = tesseract_rosutils::fromMsg(goal->request.composite_profile_remapping);
if (!composite_profile_remapping.empty())
data->setData("composite_profile_remapping", composite_profile_remapping);

// Solve
tesseract_common::Stopwatch stopwatch;
Expand Down
6 changes: 0 additions & 6 deletions tesseract_rosutils/include/tesseract_rosutils/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ ROS_DECLARE_MESSAGE(Trajectory)
ROS_DECLARE_MESSAGE(TransformMap)
ROS_DECLARE_MESSAGE(VisualGeometry)
ROS_DECLARE_MESSAGE(JointTrajectory)
ROS_DECLARE_MESSAGE(PlannerProfileRemapping)
ROS_DECLARE_MESSAGE(PluginInfo)
ROS_DECLARE_MESSAGE(KinematicsPluginInfo)
ROS_DECLARE_MESSAGE(StringPluginInfoPair)
Expand Down Expand Up @@ -204,11 +203,6 @@ bool fromMsg(std::shared_ptr<tesseract_scene_graph::JointSafety>& joint_safety,

bool toMsg(tesseract_msgs::Joint& joint_msg, const tesseract_scene_graph::Joint& joint);

std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
fromMsg(const tesseract_msgs::PlannerProfileRemapping& profile_remapping_msg);
tesseract_msgs::PlannerProfileRemapping
toMsg(const std::unordered_map<std::string, std::unordered_map<std::string, std::string>>& profile_remapping);

tesseract_common::PairsCollisionMarginData
fromMsg(const std::vector<tesseract_msgs::ContactMarginPair>& contact_margin_pairs_msg);
std::vector<tesseract_msgs::ContactMarginPair>
Expand Down
37 changes: 0 additions & 37 deletions tesseract_rosutils/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <tesseract_msgs/Trajectory.h>
#include <tesseract_msgs/TransformMap.h>
#include <tesseract_msgs/VisualGeometry.h>
#include <tesseract_msgs/PlannerProfileRemapping.h>
#include <tesseract_msgs/PluginInfo.h>
#include <tesseract_msgs/TaskComposerKey.h>
#include <tesseract_msgs/TaskComposerNodeInfo.h>
Expand Down Expand Up @@ -992,42 +991,6 @@ tesseract_scene_graph::Joint fromMsg(const tesseract_msgs::Joint& joint_msg)
return joint;
}

std::unordered_map<std::string, std::unordered_map<std::string, std::string>>
fromMsg(const tesseract_msgs::PlannerProfileRemapping& profile_remapping_msg)
{
tesseract_planning::PlannerProfileRemapping profile_remapping;
for (std::size_t i = 0; i < profile_remapping_msg.planner.size(); ++i)
{
std::unordered_map<std::string, std::string> mapping;
for (const auto& pair : profile_remapping_msg.mapping[i].pairs)
mapping.emplace(pair.first, pair.second);

profile_remapping[profile_remapping_msg.planner[i]] = mapping;
}

return profile_remapping;
}

tesseract_msgs::PlannerProfileRemapping
toMsg(const std::unordered_map<std::string, std::unordered_map<std::string, std::string>>& profile_remapping)
{
tesseract_msgs::PlannerProfileRemapping profile_remapping_msg;
for (const auto& planner_remapping : profile_remapping)
{
profile_remapping_msg.planner.push_back(planner_remapping.first);
tesseract_msgs::ProfileMap mapping;
for (const auto& planner_pair : planner_remapping.second)
{
tesseract_msgs::StringPair p;
p.first = planner_pair.first;
p.second = planner_pair.second;
mapping.pairs.push_back(p);
}
profile_remapping_msg.mapping.push_back(mapping);
}
return profile_remapping_msg;
}

tesseract_common::PairsCollisionMarginData
fromMsg(const std::vector<tesseract_msgs::ContactMarginPair>& contact_margin_pairs_msg)
{
Expand Down

0 comments on commit 5d4a628

Please sign in to comment.