https://github.com/agimus-project/agimus_controller

Whole Body Model Predictive Control in the AGIMUS architecture

https://github.com/agimus-project/agimus_controller

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

manipulation mpc-control robotics
Last synced: 6 months ago · JSON representation

Repository

Whole Body Model Predictive Control in the AGIMUS architecture

Basic Info
  • Host: GitHub
  • Owner: agimus-project
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: humble-devel
  • Homepage: https://www.agimus-project.eu/
  • Size: 4.99 MB
Statistics
  • Stars: 4
  • Watchers: 4
  • Forks: 10
  • Open Issues: 32
  • Releases: 0
Topics
manipulation mpc-control robotics
Created about 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

agimus_controller

Model Predictive Controller (MPC) to track a planned trajectory with ROS.

Installation

The dependencies to built can be found in : - franka.repos - control.repos - agimus_dev.repos

agimus_controller

This repository is in fact splitted in 3 packages working together, the first one is agimus_controller.

Factory

The factory contains classes to build the model of the robot with its environment easily, it also contains functions for creating ocp or warm start classes.

### OCP

Few ocp are available, among them the ocpcrocogeneric allows to create ocp easily by simply writing the costs/constraints inside a yaml file, an example for this can be found here ocpgoalreaching.yaml

### Plots

Various plots for MPC are available, to visualize predictions of the solver, number of iterations, convergence of the solver etc ... an example of the usage can be found in this example folder

### Trajectories

Different trajectories builder are available : - sinewaveconfigurationspace : trajectory of a sine wave in the configuration space of the robot. - sinewavecartesianspace : trajectory of a sine wave in the cartesian space. - sinewavecartesianspaceweightincreasing : trajectory of a sine wave in the cartesian space but the end-effector cost increase over time between the two extremas of the sine wave, depending on the tuning of the weights, it may starts to look like a target switching between the two extremas. - generictrajectory : this trajectory awaits for the user to build it's own trajectory and add it. A function to convert arrays of q, dq, ddq into a list of trajectory points is made available. - generictrajectoryvisualservoing : just like the generictrajectory it awaits for users trajectory. The user has to specify when he adds a trajectory from which index to which index visual servoing has to happen. A small state machine is used to manage the sending of the weights. Increasing weights are used for the cost in position of the visual servoing, and also for collision avoidance. Parameters are available to decide what are the max values respectively for the translation part of the pose cost, the rotation part, and the collision avoidance also. A small trick is happening to avoid taking too much time at stopping visual servoing, a parameter regarding the increasing weights concerns at what time we want to achieve a certain percentage of the maximum weight, the trick is to stop increasing the time at this moment.

agimuscontrollerexamples

Pick and place example

This packages contains some examples using agimuscontroller package, it has an example of a pick and place with panda that can be launched with : `python -im agimuscontrollerexamples.main.pandapickandplace.main it is possible to visualize the movement of the mpc in meshcat by doing in the terminalapp.displaypathmeshcat(app.xs)` .

Robot model sensibility

A script to evaluate model sensibilty of a robot is also available here

helpers

Also some helpers are available in the utils folder, to rebuild panda model or create MPC object offline.

agimuscontrollerros

Launch

There are 3 nodes available, an MPC, a trajectory publisher and a last one to view MPC predictions in rviz. The two first nodes are sets by YAML files, you can see an example on how to launch them by looking at this demo launch file. The last node to view MPC predictions can be launched with : bash ros2 run agimus_controller_ros mpc_debugger_node --frame frame --parent-frame parent-frame

Parameters

Parameters from the YAML files are passed using the generateparameterlibrary.

agimuscontrollernode

the agimuscontrollernode is the MPC node, it is set by two YAML files : - The first one sets the costs and constraints used inside the optimal control problem (OCP), you can find an example here ocpdefinitionfile.yaml. - The second one sets all the other parameters for the solver, the building of the pinocchio models, and the node itself. Details about these parameters can be found here, also you can find an example here agimuscontrollerparams.yaml.

simpletrajectorypublisher

This trajectory publisher node is set by one YAML file: - Sets parameters for the trajectory and it's weights to send, details about these parameters can be found here. An example can be found here trajectoryweigthsparams.yaml.

ROS API

agimuscontrollernode

Publishers
  • control [linearfeedbackcontroller_msgs/msg/Control]

    Control output of the MPC.

  • mpc_debug [agimus_msgs/msg/MpcDebug]

    Contains predictions of the solver, number of iterations, references and residuals of costs, KKT norm condition of the solver.

    Enabled by the parameter publishdebugdata.

  • ocpsolvetime [builtin_interfaces/msg/Duration]

    Solve time of the solver used by the MPC.

    Enabled by the parameter publishdebugdata.

  • ocp_x0 [builtin_interfaces/msg/Duration]

    Current state of the robot used by the MPC, usefull to replay it offline.

    Enabled by the parameter publishdebugdata.

Subscribers
  • mpc_input [agimus_msgs/msg/MpcInput]

    Contains references and weights of a trajectory point with the end-effector name.

  • sensor [linearfeedbackcontroller_msgs/msg/Sensor]

    Current state of the robot.

  • robot_description [std_msgs/msg/String]

    String containing URDF description of the robot.

  • environment_description [std_msgs/msg/String]

    String containing URDF description of the robot's environment.

  • robotsrdfdescription [std_msgs/msg/String]

    String containing SRDF description of the robot.

  • joint_state [sensor_msgs/msg/JointState]

    Give state of the robot before robot models are set.

SimpleTrajectoryPublisher

Publishers
  • mpc_input [agimus_msgs/msg/MpcInput]

    Contains references and weights of a trajectory point with the end-effector name.

Subscribers
  • sensor [linearfeedbackcontroller_msgs/msg/Sensor]

    Current state of the robot.

  • robot_description [std_msgs/msg/String]

    String containing URDF description of the robot.

Mpcdebuggernode

Publishers
  • mpcstatesprediction_markers [visualization_msgs/msg/MarkerArray]

    MPC states predictions markers arrays.

Subscribers
  • mpc_debug [agimus_msgs/msg/MpcDebug]

    Contains predictions of the solver, number of iterations, references and residuals of costs, KKT norm condition of the solver.

    Enabled by the parameter publishdebugdata.

  • robot_description [std_msgs/msg/String]

    String containing URDF description of the robot.

  • environment_description [std_msgs/msg/String]

    String containing URDF description of the robot's environment.

  • robotsrdfdescription [std_msgs/msg/String]

    String containing SRDF description of the robot.

  • joint_state [sensor_msgs/msg/JointState]

    Give state of the robot before robot models are set.

Owner

  • Name: agimus-project
  • Login: agimus-project
  • Kind: organization

GitHub Events

Total
  • Create event: 18
  • Issues event: 88
  • Watch event: 4
  • Delete event: 8
  • Member event: 1
  • Issue comment event: 162
  • Push event: 156
  • Pull request review event: 638
  • Pull request review comment event: 723
  • Pull request event: 192
  • Fork event: 5
Last Year
  • Create event: 18
  • Issues event: 88
  • Watch event: 4
  • Delete event: 8
  • Member event: 1
  • Issue comment event: 162
  • Push event: 156
  • Pull request review event: 638
  • Pull request review comment event: 723
  • Pull request event: 192
  • Fork event: 5

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 58
  • Total pull requests: 173
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 5 days
  • Total issue authors: 7
  • Total pull request authors: 11
  • Average comments per issue: 0.86
  • Average comments per pull request: 0.27
  • Merged pull requests: 110
  • Bot issues: 0
  • Bot pull requests: 28
Past Year
  • Issues: 53
  • Pull requests: 113
  • Average time to close issues: 28 days
  • Average time to close pull requests: 6 days
  • Issue authors: 7
  • Pull request authors: 10
  • Average comments per issue: 0.89
  • Average comments per pull request: 0.3
  • Merged pull requests: 62
  • Bot issues: 0
  • Bot pull requests: 17
Top Authors
Issue Authors
  • MaximilienNaveau (24)
  • jmirabel (17)
  • thomaspeyrucain (6)
  • TheoMF (6)
  • ArthurH91 (3)
  • nim65s (1)
  • Kotochleb (1)
Pull Request Authors
  • TheoMF (63)
  • MaximilienNaveau (35)
  • pre-commit-ci[bot] (24)
  • jmirabel (12)
  • ArthurH91 (11)
  • kzorina (7)
  • Kotochleb (6)
  • nim65s (4)
  • dependabot[bot] (4)
  • Dorian-BAUDU (4)
  • hrp2-14 (3)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
dependencies (4) github_actions (3) enhancement (2)