Skip to content

Commit

Permalink
Removed path planning visualization as this should be in path plannin…
Browse files Browse the repository at this point in the history
…g and not stp
  • Loading branch information
JAndringa committed May 2, 2023
1 parent 58abc8e commit b965aec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions roboteam_ai/include/roboteam_ai/stp/skills/GoToPos.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ class GoToPos : public Skill {
*/
const char* getName() override;

/**
* @brief Visualizes the path the robot will take
* @param info StpInfo struct with all relevant information for this robot and skill
*/
void visualize(StpInfo const& info);
};
} // namespace rtt::ai::stp::skill

Expand Down
8 changes: 0 additions & 8 deletions roboteam_ai/src/stp/skills/GoToPos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ Status GoToPos::onUpdate(const StpInfo &info) noexcept {
// forward the generated command to the ControlModule, for checking and limiting
forwardRobotCommand(info.getCurrentWorld());

visualize(info);

// Check if successful
if ((info.getRobot().value()->getPos() - targetPos).length() <= stp::control_constants::GO_TO_POS_ERROR_MARGIN) {
return Status::Success;
Expand All @@ -76,10 +74,4 @@ Status GoToPos::onUpdate(const StpInfo &info) noexcept {

const char *GoToPos::getName() { return "Go To Position"; }

void GoToPos::visualize(const StpInfo &info) {
auto pathPoints = info.getCurrentWorld()->getRobotPositionController()->getComputedPath(info.getRobot().value()->getId());
ai::interface::Input::addDrawing(interface::Drawing(interface::Visual::PATHFINDING, pathPoints, QColorConstants::Magenta, info.getRobot().value()->getId(),
interface::Drawing::LINES_CONNECTED, 10, 10, 10));
}

} // namespace rtt::ai::stp::skill

0 comments on commit b965aec

Please sign in to comment.