Skip to content

Commit 162314f

Browse files
Add verbose options to process input so planner verbosity can be turned on
1 parent 104915f commit 162314f

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

tesseract/tesseract_planning/tesseract_process_managers/include/tesseract_process_managers/process_input.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,38 @@ struct ProcessInput
5252
ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
5353
const Instruction* instruction,
5454
const ManipulatorInfo& manip_info,
55-
Instruction* seed);
55+
Instruction* seed,
56+
bool verbose = false);
5657

5758
ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
5859
const Instruction* instruction,
5960
const ManipulatorInfo& manip_info,
6061
const PlannerProfileRemapping& plan_profile_remapping,
6162
const PlannerProfileRemapping& composite_profile_remapping,
62-
Instruction* seed);
63+
Instruction* seed,
64+
bool verbose = false);
6365

6466
ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
6567
const Instruction* instruction,
6668
const PlannerProfileRemapping& plan_profile_remapping,
6769
const PlannerProfileRemapping& composite_profile_remapping,
68-
Instruction* seed);
70+
Instruction* seed,
71+
bool verbose = false);
6972

70-
ProcessInput(tesseract::Tesseract::ConstPtr tesseract, const Instruction* instruction, Instruction* seed);
73+
ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
74+
const Instruction* instruction,
75+
Instruction* seed,
76+
bool verbose = false);
7177

7278
/** @brief Tesseract associated with current state of the system */
7379
const tesseract::Tesseract::ConstPtr tesseract;
7480

7581
/** @brief Global Manipulator Information */
7682
const ManipulatorInfo& manip_info;
7783

84+
/** @brief Verbose Output */
85+
bool verbose{ false };
86+
7887
/**
7988
* @brief This allows the remapping of the Plan Profile identified in the command language to a specific profile for a
8089
* given motion planner.

tesseract/tesseract_planning/tesseract_process_managers/src/process_generators/motion_planner_process_generator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int MotionPlannerProcessGenerator::conditionalProcess(ProcessInput input) const
160160
PlannerResponse response;
161161

162162
bool verbose = false;
163-
if (console_bridge::getLogLevel() == console_bridge::LogLevel::CONSOLE_BRIDGE_LOG_DEBUG)
163+
if (input.verbose || console_bridge::getLogLevel() == console_bridge::LogLevel::CONSOLE_BRIDGE_LOG_DEBUG)
164164
verbose = true;
165165
auto status = planner_->solve(request, response, verbose);
166166

tesseract/tesseract_planning/tesseract_process_managers/src/process_input.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ static const PlannerProfileRemapping EMPTY_PROFILE_MAPPING;
4343
ProcessInput::ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
4444
const Instruction* instruction,
4545
const ManipulatorInfo& manip_info,
46-
Instruction* seed)
46+
Instruction* seed,
47+
bool verbose)
4748
: tesseract(std::move(tesseract))
4849
, manip_info(manip_info)
50+
, verbose(verbose)
4951
, plan_profile_remapping(EMPTY_PROFILE_MAPPING)
5052
, composite_profile_remapping(EMPTY_PROFILE_MAPPING)
5153
, instruction_(instruction)
@@ -58,9 +60,11 @@ ProcessInput::ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
5860
const ManipulatorInfo& manip_info,
5961
const PlannerProfileRemapping& plan_profile_remapping,
6062
const PlannerProfileRemapping& composite_profile_remapping,
61-
Instruction* seed)
63+
Instruction* seed,
64+
bool verbose)
6265
: tesseract(std::move(tesseract))
6366
, manip_info(manip_info)
67+
, verbose(verbose)
6468
, plan_profile_remapping(plan_profile_remapping)
6569
, composite_profile_remapping(composite_profile_remapping)
6670
, instruction_(instruction)
@@ -72,19 +76,25 @@ ProcessInput::ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
7276
const Instruction* instruction,
7377
const PlannerProfileRemapping& plan_profile_remapping,
7478
const PlannerProfileRemapping& composite_profile_remapping,
75-
Instruction* seed)
79+
Instruction* seed,
80+
bool verbose)
7681
: tesseract(std::move(tesseract))
7782
, manip_info(EMPTY_MANIPULATOR_INFO)
83+
, verbose(verbose)
7884
, plan_profile_remapping(plan_profile_remapping)
7985
, composite_profile_remapping(composite_profile_remapping)
8086
, instruction_(instruction)
8187
, results_(seed)
8288
{
8389
}
8490

85-
ProcessInput::ProcessInput(tesseract::Tesseract::ConstPtr tesseract, const Instruction* instruction, Instruction* seed)
91+
ProcessInput::ProcessInput(tesseract::Tesseract::ConstPtr tesseract,
92+
const Instruction* instruction,
93+
Instruction* seed,
94+
bool verbose)
8695
: tesseract(std::move(tesseract))
8796
, manip_info(EMPTY_MANIPULATOR_INFO)
97+
, verbose(verbose)
8898
, plan_profile_remapping(EMPTY_PROFILE_MAPPING)
8999
, composite_profile_remapping(EMPTY_PROFILE_MAPPING)
90100
, instruction_(instruction)

0 commit comments

Comments
 (0)