Skip to content

Commit

Permalink
Update due to changes in tesseract and tesseract_planning repos
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Jan 7, 2025
1 parent 6c71489 commit 88f1b41
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
13 changes: 7 additions & 6 deletions tesseract_monitoring/src/contact_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <tesseract_msgs/msg/contact_result_vector.hpp>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_common/contact_allowed_validator.h>
#include <tesseract_rosutils/utils.h>
#include <tesseract_rosutils/plotting.h>
#include <tesseract_monitoring/constants.h>
Expand Down Expand Up @@ -136,21 +137,21 @@ void ContactMonitor::computeCollisionReportThread()
// Create a new manager
std::vector<std::string> active;
tesseract_collision::CollisionMarginData contact_margin_data;
tesseract_collision::IsContactAllowedFn fn;
tesseract_common::ContactAllowedValidator::ConstPtr fn;

{
auto lock_read = monitor_->environment().lockRead();

env_revision_ = monitor_->environment().getRevision();
active = manager_->getActiveCollisionObjects();
contact_margin_data = manager_->getCollisionMarginData();
fn = manager_->getIsContactAllowedFn();
fn = manager_->getContactAllowedValidator();
manager_ = monitor_->environment().getDiscreteContactManager();
}

manager_->setActiveCollisionObjects(active);
manager_->setCollisionMarginData(contact_margin_data);
manager_->setIsContactAllowedFn(fn);
manager_->setContactAllowedValidator(fn);
for (const auto& disabled_link_name : disabled_link_names_)
manager_->disableCollisionObject(disabled_link_name);
}
Expand Down Expand Up @@ -239,19 +240,19 @@ void ContactMonitor::callbackModifyTesseractEnv(
// Create a new manager
std::vector<std::string> active;
tesseract_collision::CollisionMarginData contact_margin_data;
tesseract_collision::IsContactAllowedFn fn;
tesseract_common::ContactAllowedValidator::ConstPtr fn;

{
auto lock_read = monitor_->environment().lockRead();
active = manager_->getActiveCollisionObjects();
contact_margin_data = manager_->getCollisionMarginData();
fn = manager_->getIsContactAllowedFn();
fn = manager_->getContactAllowedValidator();
manager_ = monitor_->environment().getDiscreteContactManager();
}

manager_->setActiveCollisionObjects(active);
manager_->setCollisionMarginData(contact_margin_data);
manager_->setIsContactAllowedFn(fn);
manager_->setContactAllowedValidator(fn);
for (const auto& disabled_link_name : disabled_link_names_)
manager_->disableCollisionObject(disabled_link_name);
}
Expand Down
2 changes: 1 addition & 1 deletion tesseract_monitoring/src/current_state_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ bool CurrentStateMonitor::waitForCompleteState(const std::string& manip, double
std::vector<std::string> missing_joints;
if (!haveCompleteState(missing_joints))
{
tesseract_kinematics::JointGroup::UPtr jmg = env_->getJointGroup(manip);
tesseract_kinematics::JointGroup::ConstPtr jmg = env_->getJointGroup(manip);
if (jmg)
{
std::set<std::string> mj;
Expand Down
8 changes: 4 additions & 4 deletions tesseract_planning_server/src/tesseract_planning_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_motion_planners/simple/profile/simple_planner_profile.h>

#include <tesseract_motion_planners/simple/profile/simple_planner_lvs_no_ik_plan_profile.h>
#include <tesseract_motion_planners/ompl/profile/ompl_default_plan_profile.h>
#include <tesseract_motion_planners/ompl/profile/ompl_real_vector_plan_profile.h>
#include <tesseract_motion_planners/descartes/profile/descartes_default_plan_profile.h>
#include <tesseract_motion_planners/trajopt/profile/trajopt_default_composite_profile.h>
#include <tesseract_motion_planners/trajopt/profile/trajopt_default_plan_profile.h>
#include <tesseract_motion_planners/trajopt/profile/trajopt_default_solver_profile.h>
#include <tesseract_motion_planners/trajopt/profile/trajopt_osqp_solver_profile.h>
#include <tesseract_task_composer/planning/profiles/contact_check_profile.h>
#include <tesseract_task_composer/planning/profiles/iterative_spline_parameterization_profile.h>
#include <tesseract_task_composer/planning/profiles/min_length_profile.h>
Expand Down Expand Up @@ -302,7 +302,7 @@ void TesseractPlanningServer::loadDefaultPlannerProfiles()
std::make_shared<tesseract_planning::TrajOptDefaultCompositeProfile>());
profiles_->addProfile(TRAJOPT_DEFAULT_NAMESPACE,
tesseract_planning::DEFAULT_PROFILE_KEY,
std::make_shared<tesseract_planning::TrajOptDefaultSolverProfile>());
std::make_shared<tesseract_planning::TrajOptOSQPSolverProfile>());

// Add TrajOpt IFOPT Default Profiles
#ifdef TESSERACT_TASK_COMPOSER_HAS_TRAJOPT_IFOPT
Expand All @@ -325,7 +325,7 @@ void TesseractPlanningServer::loadDefaultPlannerProfiles()
// Add OMPL Default Profiles
profiles_->addProfile(OMPL_DEFAULT_NAMESPACE,
tesseract_planning::DEFAULT_PROFILE_KEY,
std::make_shared<tesseract_planning::OMPLDefaultPlanProfile>());
std::make_shared<tesseract_planning::OMPLRealVectorPlanProfile>());

// Add Simple Default Profiles
profiles_->addProfile(SIMPLE_DEFAULT_NAMESPACE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <memory>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_common/resource_locator.h>
#include <tesseract_environment/environment.h>
#include <tesseract_environment/environment_cache.h>
#include <tesseract_environment/environment_monitor.h>
Expand Down Expand Up @@ -94,8 +95,9 @@ int main(int argc, char** argv)

if (!task_composer_config.empty())
{
tesseract_common::GeneralResourceLocator locator;
tesseract_common::fs::path config(task_composer_config);
planning_server->getTaskComposerServer().loadConfig(config);
planning_server->getTaskComposerServer().loadConfig(config, locator);
}

// TODO: Rate seems in seconds, whereas this should be in Hz (otherwise it should be called interval)
Expand Down

0 comments on commit 88f1b41

Please sign in to comment.