{"id":19134302,"url":"https://github.com/um-arm-lab/mab_ms","last_synced_at":"2025-10-25T08:42:26.737Z","repository":{"id":79650922,"uuid":"127452258","full_name":"UM-ARM-Lab/mab_ms","owner":"UM-ARM-Lab","description":"Bandit-based Model Selection for Deformable Object Manipulation","archived":false,"fork":false,"pushed_at":"2018-03-30T23:47:40.000Z","size":21162,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-09T06:31:02.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UM-ARM-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-30T16:59:12.000Z","updated_at":"2024-08-02T02:56:10.000Z","dependencies_parsed_at":"2023-05-14T09:00:10.696Z","dependency_job_id":null,"html_url":"https://github.com/UM-ARM-Lab/mab_ms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fmab_ms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fmab_ms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fmab_ms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fmab_ms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UM-ARM-Lab","download_url":"https://codeload.github.com/UM-ARM-Lab/mab_ms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232333549,"owners_count":18507054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T06:26:09.432Z","updated_at":"2025-10-25T08:42:26.633Z","avatar_url":"https://github.com/UM-ARM-Lab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-armed Bandit Based Model Selection For Deformable Object Manipulation\n\nThis repository contains several catkin based packages for testing models and MAB methods for deformable object manipulation; first presented at the 12th International Workshop on the Algorithmic Foundations of Robotics (WAFR 2016), an extended version is available [here](https://arxiv.org/abs/1703.10254). The authorative version is soon to be published in IEEE T-ASE.\n\n## Maintainer\n\n- [Dale McConachie](https://robotics.umich.edu/profile/dale-mcconachie/) \u003c\u003cdmcconac@umich.edu\u003e\u003e, [Autonomous Robotic Manipulation Lab](http://arm.eecs.umich.edu/), University of Michigan\n\n*Note:* ***Please use the GitHub issues*** *for questions and problems regarding the mab_ms package and its components.* ***Do not write emails.***\n\n## Dependencies and Install Details\n* This code has been tested on [Ubuntu 16.04](https://www.ubuntu.com/download/desktop) with [ROS Kinetic](http://wiki.ros.org/kinetic/Installation/Ubuntu)\n* Each folder is a catkin pacakge, as such this can be added directly to an existing catkin workspace, or used in a new workspace. There are no other ROS packages needed beyond those installed as part of the ros-kinetic-desktop-full package.\n* Requires some common libraries such as Eigen. If you find one that is not installed on Ubuntu 16.04 by default, please open and ticket and we will update this list.\n* [Gurobi](https://www.gurobi.com)  \n  Get academic license  \n  Download and [follow installation instructions for 7.0.X](http://www.gurobi.com/documentation/7.0/quickstart_linux/software_installation_guid.html#section:Installation) (extract to /opt; add some lines to .bashrc; run `grbgetkey`)\n  Switch to using the g++5.2 version: `cd ${GUROBI_HOME}/lib ` `ln -sf libgurobi_g++5.2.a libgurobi_c++.a`\n* mencoder (for generating videos from the simulated experiments): `sudo apt install mencoder`\n* `imToMov.sh` needs to be added to the system path somewhere (used in conjuction with mencoder for generating videos). E.g.: `sudo cp imToMov.sh /usr/local/bin`\n\n## Running an experiment\nEach experiment uses the same base launch file, and specifies an extra launch file containing parameters specific to that experiment:\n* `roslaunch smmap generic_experiment.launch task_type:=rope_cylinder --screen`\n* `roslaunch smmap generic_experiment.launch task_type:=cloth_table --screen`\n* `roslaunch smmap generic_experiment.launch task_type:=cloth_wafr --screen`\n\n## Logging data\nBy default, the launch files are setup to log data to `./logs/\u003ctask_type\u003e/default`. This will overwrite any data that exists in this folder automatically without prompting. Similarly when screenshots are enabled (see below), the folder `/tmp/smmap_screenshots` will be cleared and recreated every trial.\n\n## Arguments to the outer launch file\n`generic_experiment.launch` can take many parameters as arguments, and set these on the ROS parameter server to change how an experiment is run. The [smmap/scripts](https://github.com/UM-ARM-Lab/mab_ms/tree/master/smmap/scripts) folder contains many examples of running tasks in batch mode with varying parameters.\n\n### Usage\nBasic pattern:\n```\nroslaunch smmap generic_experiment.launch task_type:=\u003crope_cylinder/cloth_table/cloth_wafr\u003e [options:=value]\n```\n\nTask and logging arguments:\n```\ntask_type:=\u003cstring\u003e\n    default: None - needs to be specified\n    options: rope_cylinder, cloth_table, cloth_wafr\n    info: Controls which experiment to run; a matching \"task_type_params.launch\" file must exist\n\nlogging_enabled:=\u003cboolean\u003e\n    default: true\n    options: true, false\n    info: Controls if data is logged to file while running an experiment\n\ntest_id:=\u003cstring\u003e\n    default: default\n    options: Any string that the system can convert to a pth\n    info: Controls the subfolder that logging data is saved to. Ie. logs/\u003ctask_type\u003e/\u003ctest_id\u003e/data_is_saved_here\n```\n\nSimulator arguments:\n```\nlaunch_simulator:=\u003cboolean\u003e\n    default: true\n    options: true, false\n    info: Controls if the launch file starts the simulator directly or not. Used for debugging purposes in combination with an IDE.\n\nfeedback_covariance:=\u003cdouble\u003e\n    default: 0.0\n    options: [0, inf]\n    info: Controls how much noise the deformable object sensor in the simulator has\n\nstart_bullet_viewer:=\u003cboolean\u003e\n    default: true\n    options: true, false\n    info: Controls if the viewer for the simulator is started. Used for batch processing of multiple trials and running on headless machines.\n\nscreenshots_enabled:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Requires start_bullet_viewer:=true. Controls if screenshots of the trial are made, and video created at the end.\n```\n\nModel usage arguments:\n```\nmulti_model:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Controls if we are using a single model, or a collection of 60 models to manipulate the deformable object\n\ncalculate_regret:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Requires multi_model:=true. Controls if we are collecting the data needed to calculate regret plots.\n\ndeformability_override:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Requires multi_model:=false use_adaptive_model:=false. Controls if we are going to override the default value used for a diminishing ridigidity model as set in code.\n\ntranslational_deformability:=\u003cdouble\u003e\n    default: None\n    options: [0, inf]\n    info: Requires multi_model:=false deformability_override:=true use_adaptive_model:=false. Sets K_trans for a single trial.\n\nrotational_deformability:=\u003cdouble\u003e\n    default: None\n    options: [0, inf]\n    info: Requires multi_model:=false deformability_override:=true use_adaptive_model:=false. Sets K_rot for a single trial.\n\nuse_adaptive_model:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Requires multi_model:=false. Controls if a trial is using a diminishing rigidity model, or an adaptive model.\n\nadaptive_model_learning_rate:=\u003cdouble\u003e\n    default: 0.000001\n    options: (0, 1]\n    info: Requires multi_model:=false use_adaptive_model:=true. Controls the learning rate for an adaptive model for a single trial.\n```\n\nMain control loop and controller settings:\n```\nlaunch_planner:=\u003cboolean\u003e\n    default: true\n    options: true, false\n    info: Controls if the planner (main control loop) is started by this launch file.  Used for debugging purposes in combination with an IDE.\n\noptimization_enabled:=\u003cboolean\u003e\n    default: true\n    options: true, false\n    info: Legacy paramter. Can be set to false to change from an Gurobi optimization based controller to pseudo-inverse based controller.\n\nuse_random_seed:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Used to get disable deterministic behaviour, enabling statistical trials.\n\nstatic_seed_override:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Requires use_random_seed:=false. Used to rerun a previous trial to generate the exact same data as was generated previously. Used for debugging purposes.\n\nstatic_seed:=\"hex string\"\n    default = a8710913d2b5df6c\n    options: Any hex string that is convertable into a size_t.\n    info: Requries use_random_seed:=false static_seed_override:=true. Used for debugging purposes.\n```\n\nMulti-armed bandit parameters. The following are meaningful only if `multi_model:=true`:\n```\nbandit_algorithm:=\u003cstring\u003e\n    default: KFMANB\n    options: UCB, KFMANB, KFMANDB\n    info: Controls which MAB method is used to select which model to use at the current timestep to manipulate the object.\n\nkalman_parameters_override:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Controls if we are overriding the default parameters for KFMANDB.\n\nprocess_noise_factor:=\u003cdouble\u003e\n    default: 0.1\n    options: (0, inf)\n    info: Requires kalman_parameters_override:=true.\n\nobservation_noise_factor:=\u003cdouble\u003e\n    default: 0.01\n    options: (0, inf)\n    info: Requires kalman_parameters_override:=true.\n\ncorrelation_strength_factor_override:=\u003cboolean\u003e\n    default: false\n    options: true, false\n    info: Requires kalman_parameters_override:=true.\n\ncorrelation_strength_factor:=\u003cdouble\u003e\n    default: 0.9\n    options: [0, 1]\n    info: Requires kalman_parameters_override:=true correlation_strength_factor_override:=true.\n```\n\n## F.A.Q.\n\n#### I get the following error `[generic_experiment.launch] is neither a launch file in package [smmap] nor is [smmap] a launch file name`, what is wrong?\nDouble check that you have built and sourced your catkin workspace correctly.\n\n#### I get the following error and then the simulator closes!\n```\n================================================================================\nREQUIRED process [deform_simulator_node-2] has died!\nprocess has finished cleanly\nlog file: ~/.ros/log/30ea73d4-3465-11e8-a8bb-0cc47ac81363/deform_simulator_node-2*.log\nInitiating shutdown!\n================================================================================\n```\n\nCheck if this message is preceeded by `terminate_simulation_topic not set! Using default of terminate_simulation`. If so, this is normal shutdown behaviour. We have setup the launch files to automatically close everything at the end of a trial to enable batch trials. If not, check to see what happened immediately prior to everything shutting down.\n\n#### The simulator closes almost immedately, and Eigen assertions are failing!\n\nIs the message similar to this?\n```\n[/smmap_planner_node ros.smmap.planner]: ------------------------------------------------------------------------------------\n[/smmap_planner_node ros.smmap.task]: Determining desired direction\n[/smmap_planner_node ros.smmap.direct_coverage_task]: Finding 'best' object delta\n[/smmap_planner_node ros.smmap.target_point_task]: Found best delta in 0.00554037 seconds\nError code = 10009\nNo Gurobi license found (user dmcconac, host thor, hostid 7ac81363)\nsmmap_test_node_KFMANB: /usr/include/eigen3/Eigen/src/Core/Block.h:148: Eigen::Block\u003cXprType, BlockRows, BlockCols, InnerPanel\u003e::Block(XprType\u0026, Eigen::Index, Eigen::Index, Eigen::Index, Eigen::Index) [with XprType = Eigen::Matrix\u003cdouble, -1, 1\u003e; int BlockRows = 6; int BlockCols = 1; bool InnerPanel = false; Eigen::Index = long int]: Assertion `startRow \u003e= 0 \u0026\u0026 blockRows \u003e= 0 \u0026\u0026 startRow \u003c= xpr.rows() - blockRows \u0026\u0026 startCol \u003e= 0 \u0026\u0026 blockCols \u003e= 0 \u0026\u0026 startCol \u003c= xpr.cols() - blockCols' failed.\n```\nCheck your [Gurobi licence](http://www.gurobi.com/documentation/7.0/quickstart_linux/software_installation_guid.html#section:Installation)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fum-arm-lab%2Fmab_ms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fum-arm-lab%2Fmab_ms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fum-arm-lab%2Fmab_ms/lists"}