Skip to content

Commit

Permalink
[MSA] Workaround to launch files without controllers (#1275)
Browse files Browse the repository at this point in the history
* Enable controller tab with warning

* Warn the user instead of raising exception if controllers are not found

* pre-commit fixes

* Fix cartesian_limits.yaml values

* Fix file_path

Co-authored-by: Jafar <jafar.uruc@gmail.com>

Co-authored-by: JafarAbdi <cafer.abdi@gmail.com>
Co-authored-by: Jafar <jafar.uruc@gmail.com>
  • Loading branch information
3 people authored and DLu committed Jun 13, 2022
1 parent 803bb38 commit 5fabe99
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ def trajectory_execution(
controller_pattern = re.compile("^(.*)_controllers.yaml$")
possible_names = get_pattern_matches(config_folder, controller_pattern)
if not possible_names:
raise RuntimeError(
"trajectory_execution: `Parameter file_path is undefined "
f"and no matches for {config_folder}/*_controllers.yaml"
# Warn the user instead of raising exception
logging.warning(
"\x1b[33;20mtrajectory_execution: `Parameter file_path is undefined "
f"and no matches for {config_folder}/*_controllers.yaml\x1b[0m"
)
else:
chosen_name = None
Expand All @@ -313,7 +314,8 @@ def trajectory_execution(
else:
file_path = self._package_path / file_path

self.__moveit_configs.trajectory_execution.update(load_yaml(file_path))
if file_path:
self.__moveit_configs.trajectory_execution.update(load_yaml(file_path))
return self

def planning_scene_monitor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ SetupAssistantWidget::SetupAssistantWidget(rviz_common::ros_integration::RosNode
setup_steps.push_back("moveit_setup::srdf_setup::RobotPosesWidget");
setup_steps.push_back("moveit_setup::srdf_setup::EndEffectorsWidget");
setup_steps.push_back("moveit_setup::srdf_setup::PassiveJointsWidget");
// setup_steps.push_back("moveit_setup::controllers::ControllersWidget");
setup_steps.push_back("moveit_setup::controllers::ControllersWidget");
// setup_steps.push_back("moveit_setup::simulation::SimulationWidget");
setup_steps.push_back("moveit_setup::app::PerceptionWidget");
setup_steps.push_back("moveit_setup::app::LaunchesWidget");
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,24 @@ void ControllersWidget::onInit()
this->setWindowTitle("Controller Configuration"); // title of window

// Top Header Area ------------------------------------------------
auto header = new HeaderWidget(
"Setup Controllers",
"Configure controllers to be used by MoveIt's controller manager(s) to operate the robot's physical hardware",
this);
// TODO: Remove warning and revert to original header message once controllers are implemented
// https://github.com/ros-planning/moveit2/issues/1261
auto header =
new HeaderWidget("Setup Controllers",
"<font color='red'>Configuring controllers to be used by MoveIt's controller manager(s) to "
"operate the robot's physical hardware is not implemented yet! Please generate the files "
"mentioned in <a href='https://github.com/ros-planning/moveit2/issues/1261'> "
"https://github.com/ros-planning/moveit2/issues/1261</a> by hand if you want to work with "
"trajectory execution!</font>",
this);
layout->addWidget(header);

// Tree Box ----------------------------------------------------------------------
controllers_tree_widget_ = createContentsWidget();

// TODO: Reneable contents widget once controllers are implemented
controllers_tree_widget_->setEnabled(false);

// Joints edit widget
joints_widget_ = new DoubleListWidget(this, "Joint Collection", "Joint");
connect(joints_widget_, SIGNAL(cancelEditing()), this, SLOT(cancelEditing()));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cartesian_limits:
max_trans_vel: 1
max_trans_vel: 1.0
max_trans_acc: 2.25
max_trans_dec: -5
max_trans_dec: -5.0
max_rot_vel: 1.57
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<class type="moveit_setup::srdf_setup::PlanningGroupsWidget" base_class_type="moveit_setup::SetupStepWidget">
<description>Step to configure planning groups</description>
</class>
<class type="moveit_setup::controllers::ControllersWidget" base_class_type="moveit_setup::SetupStepWidget">
<description>Step to configure robot controllers</description>
</class>
<class type="moveit_setup::srdf_setup::RobotPosesWidget" base_class_type="moveit_setup::SetupStepWidget">
<description>Step to configure robot poses</description>
</class>
Expand Down

0 comments on commit 5fabe99

Please sign in to comment.