Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure controller managers #92

Closed

Conversation

rhaschke
Copy link
Contributor

There are 3 basic MoveIt controller manager plugins:

  • fake = moveit_fake_controller_manager/MoveItFakeControllerManager
    Used in demo.launch. Doesn't really control the robot, but just interpolates between via points. Allows these execution_types:

    • via points: just jumps to the via points
    • interpolate: linearly interpolates between via points (default)
    • last point: jumps to the final trajectory point (used for fast execution testing)
  • ros_control = moveit_ros_control_interface::MoveItControllerManager
    Interfaces to ros_control controllers.
    The package moveit_sim_controller offers a fake controller complying to the ros_control API.

  • simple = moveit_simple_controller_manager/MoveItSimpleControllerManager
    Interfaces to action servers for FollowJointTrajectory and/or GripperCommand that in turn interface to the low-level robot controllers

However, so far move_group.launch distinguished between fake and robot mode only.
My suggestion is to introduce the argument moveit_controller_manager allowing all 3 variants.

I suggest adapting MSA templates appropriately as well. What do you think, @v4hn, @rickstaa?

rickstaa and others added 24 commits September 28, 2021 19:48
This was done since the `moveit_setup_assistant` currently doesn't propagate `xacro` arguments you supply to the `urdf.xacro` file (see [this issue](moveit/moveit#1691)). We need to manually add a way to enable or disable the gripper. This can be done by creating a `panda.srdf.xacro` file.
As Franka changed the collision geometries from meshes to coarse shapes
(matching the collision model of the internal controller) we now observe various self-collisions
in some default poses. This commit disables collision checks between link8 and links 5+6.
This file can be used to control a real Panda using MoveIt.
This commit adds the files needed for running the trajopt planner example that is found in the
[moveit_tutorials](https://ros-planning.github.io/moveit_tutorials/doc/trajopt_planner/trajopt_planner_tutorial.html).
This planner is not included into `move_group.launch` by default but can be invoked via the `pipeline` argument.
This was done since it is not yet officially released (see moveit/moveit#1467).
* Add stomp planner

This commit adds all the scripts needed to run the STOMP planner example in the
[stomp_planner_tutorial](https://ros-planning.github.io/moveit_tutorials/doc/stomp_planner/stomp_planner_tutorial.html).
Keep manually adjusted joint limits from the original Melodic branch.
* Add demo_chomp.launch
* Restore original 'chomp_planning.yaml' config
* Add CHOMP post-processing example, using OMPL+CHOMP
This commit removes the kinematics from the `run_benchmark_trajopt.launch`
launch file since they are already handled in `planning_context.launch`.
This commit adds demo_gazebo.launch using the gazebo simulation of the franka_gazebo package
Additionally, the virtual_joint is removed from the move group definition.
We can define all available controllers in a single file,
even if we don't actually use those controllers.
Thus, we don't need an extra set of files for panda_gripper.
Fixes the following error:
[FATAL] ros.moveit_ros_planning.trajectory_execution_manager:
  Exception while loading controller manager 'panda':
  According to the loaded plugin descriptions the class panda
  with base class type moveit_controller_manager::MoveItControllerManager does not exist.
- headless = !gazebo_gui
- Remove arg load_robot_description:
  We always load the robot description via franka_gazebo to enable Gazebo features in URDF
- Use <group> tag to declare namespace once
There are 3 basic MoveIt controller manager plugins:
- fake = `moveit_fake_controller_manager/MoveItFakeControllerManager`
  Used in demo.launch. Doesn't really control the robot, but just
  interpolates between via points. Allows these execution_types:
  - via points: just jumps to the via points
  - interpolate: linearly interpolates between via points (default)
  - last point: jumps to the final trajectory point (used for fast execution testing)

- ros_control = `moveit_ros_control_interface::MoveItControllerManager`
  Interfaces to ros_control controllers.

- simple = `moveit_simple_controller_manager/MoveItSimpleControllerManager`
  Interfaces to action servers for `FollowJointTrajectory` and/or `GripperCommand`
  that in turn interface to the low-level robot controllers

However, so far move_group.launch distinguished between `fake` and `robot` only.
The argument moveit_controller_manager now allows to switch between all 3 variants.
to run ROS controllers virtually
provided by https://github.com/PickNikRobotics/moveit_sim_controller

Usage:
roslaunch panda_moveit_config demo.launch moveit_controller_manager:=ros_control
roslaunch panda_moveit_config moveit_sim_controller.launch
@rickstaa
Copy link
Contributor

rickstaa commented Oct 25, 2021

@rhaschke Good idea. Giving users the ability to switch between these three controllers is important since the moveit_fake_controller_manager is being replaced with the moveit_sim_controller. I think a great number of users already switched. Further, we already did add the configuration values for the moveit_sim_controller to both the MSA and the panda_moveit_config:

https://github.com/ros-planning/panda_moveit_config/blob/5847d2bbe138e1a502ec098d3428a247b892afce/config/ros_controllers.yaml#L1-L4

I think applying your changes to both the panda_moveit_config and the MSA is a good idea.

@rickstaa rickstaa mentioned this pull request Oct 25, 2021
26 tasks
config/ros_controllers.yaml Outdated Show resolved Hide resolved
config/moveit_sim_controller.yaml Show resolved Hide resolved
launch/moveit_sim_controller.launch Show resolved Hide resolved
@rickstaa
Copy link
Contributor

@rhaschke I'm currently not at the university so I can not test the panda_control_moveit_rviz.launch file. Based on your changes I however do not expect any issues other than the PID gains being poorly tuned (see my comments). I tested the demo.launch file and I found no problems. I however was not able to control the simulated robot when using the franka_gazebo.launch file. When trying to use the gazebo simulation I receive the following error:

[/panda/move_group] [ WARN] [WallTime: 1635155355.357972037, 62.387000000]: Failed to read controllers from /controller_manager/list_controllers
[/panda/move_group] [ERROR] [WallTime: 1635155355.358041334, 62.387000000]: Unable to identify any set of controllers that can actuate the specified joints: [ panda_joint1 panda_joint2 panda_joint3 panda_joint4 panda_joint5 panda_joint6 panda_joint7 ]
[/panda/move_group] [ERROR] [WallTime: 1635155355.358076436, 62.387000000]: Known controllers and their joints:

[/panda/move_group] [ERROR] [WallTime: 1635155355.358121636, 62.387000000]: Apparently trajectory initialization failed

I did not debug this issue yet but it looks like the controllers_list parameter is not loaded (also see my comments).

@rickstaa
Copy link
Contributor

rickstaa commented Oct 25, 2021

@rhaschke As we discussed in our call, rhaschke#11 splits the controller config file between the real and simulated robot.

I converted it to a draft as it was a first attempt to get both the real and simulated robot to work with the moveit_ros_control_interface. The current version solves the warning above but could be improved as it clutters the codebase.

@rickstaa
Copy link
Contributor

@rhaschke Please let me know when I need to reserve a lab slot to quickly test it on the real robot.

@rhaschke
Copy link
Contributor Author

rhaschke commented Nov 8, 2021

Superseded by new noetic-devel branch.

@rhaschke rhaschke deleted the restructure-controller-managers branch September 1, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants