Skip to content

Commit

Permalink
Update planning request input to leverage AnyPoly
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Nov 8, 2023
1 parent 501f0bd commit cfef9b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions tesseract_monitoring/include/tesseract_monitoring/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#ifndef TESSERACT_MONITORING_CONSTANTS_H
#define TESSERACT_MONITORING_CONSTANTS_H

#include <string>

namespace tesseract_monitoring
{
/// The name of the topic used by default for receiving joint states
Expand Down
2 changes: 1 addition & 1 deletion tesseract_msgs/msg/PlanningRequest.msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tesseract_msgs/EnvironmentCommand[] commands # Additional Commands to be applied

string name # The name of the taskflow to use
string executor # The executor to leverage, if empty default one is used.
string instructions # This should an xml string of the command language instructions
string input # This should be 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
Expand Down
6 changes: 2 additions & 4 deletions tesseract_planning_server/src/tesseract_planning_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/planning/planning_task_composer_problem.h>

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

#include <tesseract_monitoring/environment_monitor.h>
#include <tesseract_rosutils/utils.h>
Expand All @@ -67,7 +67,6 @@ using tesseract_common::Serialization;
using tesseract_planning::InstructionPoly;
using tesseract_planning::PlanningTaskComposerProblem;
using tesseract_planning::TaskComposerDataStorage;
using tesseract_rosutils::processMsg;

static const std::string TRAJOPT_DEFAULT_NAMESPACE = "TrajOptMotionPlannerTask";
static const std::string TRAJOPT_IFOPT_DEFAULT_NAMESPACE = "TrajOptIfoptMotionPlannerTask";
Expand Down Expand Up @@ -206,8 +205,7 @@ void TesseractPlanningServer::onMotionPlanningCallback(
auto problem = std::make_unique<tesseract_planning::PlanningTaskComposerProblem>(goal->request.name);
try
{
problem->input_instruction =
Serialization::fromArchiveStringXML<tesseract_planning::InstructionPoly>(goal->request.instructions);
problem->input = Serialization::fromArchiveStringXML<tesseract_common::AnyPoly>(goal->request.input);
}
catch (const std::exception& e)
{
Expand Down

0 comments on commit cfef9b1

Please sign in to comment.