{"id":13586470,"url":"https://github.com/mit-acl/cadrl_ros","last_synced_at":"2025-09-21T22:55:48.126Z","repository":{"id":41653181,"uuid":"123663473","full_name":"mit-acl/cadrl_ros","owner":"mit-acl","description":"ROS package for dynamic obstacle avoidance for ground robots trained with deep RL","archived":false,"fork":false,"pushed_at":"2021-12-23T14:22:35.000Z","size":6420,"stargazers_count":545,"open_issues_count":2,"forks_count":155,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-04-20T20:55:21.315Z","etag":null,"topics":["collision-avoidance","deep-reinforcement-learning","jackal","ros","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mit-acl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-03T05:43:40.000Z","updated_at":"2024-04-20T20:55:21.316Z","dependencies_parsed_at":"2022-09-09T16:01:43.764Z","dependency_job_id":null,"html_url":"https://github.com/mit-acl/cadrl_ros","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mit-acl/cadrl_ros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-acl%2Fcadrl_ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-acl%2Fcadrl_ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-acl%2Fcadrl_ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-acl%2Fcadrl_ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mit-acl","download_url":"https://codeload.github.com/mit-acl/cadrl_ros/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-acl%2Fcadrl_ros/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276318988,"owners_count":25621651,"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","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["collision-avoidance","deep-reinforcement-learning","jackal","ros","tensorflow"],"created_at":"2024-08-01T15:05:35.465Z","updated_at":"2025-09-21T22:55:48.108Z","avatar_url":"https://github.com/mit-acl.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# cadrl_ros (Collision Avoidance with Deep RL)\n\nROS implementation of a dynamic obstacle avoidance algorithm trained with Deep RL\n\u003cimg src=\"misc/A3C_20agents_0.png\" width=\"500\" alt=\"20 agent circle\"\u003e\n\n#### Paper:\n\nM. Everett, Y. Chen, and J. P. How, \"Motion Planning Among Dynamic, Decision-Making Agents with Deep Reinforcement Learning\", IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2018\n\nPaper: https://arxiv.org/abs/1805.01956\nVideo: https://www.youtube.com/watch?v=XHoXkWLhwYQ\n\nBibtex:\n```\n@inproceedings{Everett18_IROS,\n  address = {Madrid, Spain},\n  author = {Everett, Michael and Chen, Yu Fan and How, Jonathan P.},\n  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},\n  date-modified = {2018-10-03 06:18:08 -0400},\n  month = sep,\n  title = {Motion Planning Among Dynamic, Decision-Making Agents with Deep Reinforcement Learning},\n  year = {2018},\n  url = {https://arxiv.org/pdf/1805.01956.pdf},\n  bdsk-url-1 = {https://arxiv.org/pdf/1805.01956.pdf}\n}\n```\n\n#### Dependencies:\n\n* [TensorFlow](https://www.tensorflow.org/) is required (tested with version 1.4.0)\n\n* numpy is required\n\n* [ROS](http://wiki.ros.org/) is optional (tested with Kinetic on Ubuntu 16.04)\n\n* [ford_msgs](https://bitbucket.org/acl-swarm/ford_msgs/src/master/) if you're using ROS, for our custom msg definitions.\n\n#### General Notes:\nThe main contribution of this software is the `network.py` file and trained model parameters (TensorFlow checkpoints).\nThose contain the policy as reported in our paper and enables other reasearchers to easily compare future algorithms.\n\nTo make it easy to understand the flow of the code, we provide an example in `scripts/ga3c_cadrl_demo.ipynb`, in the form of a Jupyter notebook. This can be used just as a reference, but if you want to edit the file, make sure Jupyter is installed in your tensorflow virtualenv to be sure it will work.\n\n#### To Run Jupyter Notebook (minimum working example of algorithm)\n\nThis assumes you have `nvidia-docker` installed already. Might work with regular docker with minor changes.\n\n```\ngit clone git@github.com/mfe7/cadrl_ros\n./cadrl_ros/docker/build_docker.sh\n./cadrl_ros/docker/run_docker.sh\n```\n\nThat will start an instance of the docker container, and output a Jupyter notebook URL. Copy the URL into a browser, navigate to `cadrl_ros/scripts` and open `ga3c_cadrl_demo.ipynb`.\n\nTensorflow and other deps are already installed in the docker container you just built, so the notebook should \"just work.\"\n\n#### ROS Notes:\n\nWe also provide a ROS implementation that we tested on a Clearpath Jackal ground robot.\nThis node is just one module of the software required for autonomous navigation among dynamic obstacles, and much of it is written as to integrate with our system.\nThe ROS node as written may not be particularly useful for other systems, but should provide an example of how one might connect the modules to test our learned collision avoidance policy on hardware.\nFor example, other systems likely have different representation formats for dynamic obstacles as extracted from their perception system, but it should be straightforward to just replace our `cbClusters` method with another one, as long as the same information makes it into the state vector when the policy is queried.\nWe recommend looking at the Jupyter notebook first.\n\nThe algorithm was trained with goals set to be \u003c10m from the agent's start position, so it would be necessary to provide this system with local subgoals if it were to be tested in a long journey.\nFor short distances, say in an open atrium, this is probably not necessary.\n\n\n#### To Run ROS version:\nClone and build this repo and its dependency (assume destination is ~/catkin_ws/src)\n```\ncd ~/catkin_ws/src\ngit clone git@github.com/mfe7/cadrl_ros\ngit clone git@bitbucket.org:acl-swarm/ford_msgs.git -b dev\ncd ~/catkin_ws \u0026\u0026 catkin_make\n```\n\nConnect inputs/outputs of your system to `launch/cadrl_node.launch`\n\n##### Subscribed Topics:\n* ~pose [[geometry_msgs/PoseStamped]](http://docs.ros.org/api/geometry_msgs/html/msg/PoseStamped.html)\n\tRobot's pose in the global frame\n\n* ~velocity [[geometry_msgs/Vector3]](http://docs.ros.org/kinetic/api/geometry_msgs/html/msg/Vector3.html)\n\tRobot's linear velocity in the global frame (vx, vy)\n\n* ~goal [[geometry_msgs/PoseStamped]](http://docs.ros.org/api/geometry_msgs/html/msg/PoseStamped.html)\n\tRobot's goal position in the global frame\n\n* ~clusters [[ford_msgs/Clusters]]()\n\tPositions, velocities, sizes of other agents in vicinity\n\n* TODO: planner_mode, safe_actions, peds\n\n##### Published Topics:\n* ~nn_cmd_vel [[geometry_msgs/Twist]](http://docs.ros.org/api/geometry_msgs/html/msg/Twist.html)\n\tRobot's commanded twist (linear, angular speed) according to network's output\n\n* The other published topics are just markers for visualization\n\t* ~pose_marker shows yellow rectangle at position according to ~pose\n\t* ~path_marker shows red trajectory according to history of ~pose\n\t* ~goal_path_marker shows blue arrow pointing toward position of commanded velocity 1 second into future\n\t* ~agent_markers shows orange cylinders at the positions/sizes of nearby agents\n\n* TODO: remove other_agents_marker, other_vels\n\n##### Parameters:\n* ~jackal_speed\n\tRobot's preferred speed (m/s) - tested below 1.2m/s (and trained to be optimized near this speed)\n\t\n#### Datasets:\nAs mentioned in the paper, we provide a few datasets that might be useful to researchers hoping to train NNs for collision avoidance.\nPlease find the files in [this Dropbox folder](https://www.dropbox.com/sh/yu1spzhhj8c9akl/AAALo8yXSfQ1nxaU2KFRGWuTa?dl=0), along with instructions for use.\n\nThe test cases used in the paper are posted in [this Dropbox folder](https://www.dropbox.com/sh/58uodr11pke8yi0/AACPrZQr8wFWyNlETIFDCc7Pa?dl=0).\nThese contain initial positions, goal positions, preferred speed, radius settings for each test case, and are separated by number of agents.\nThey were randomly generated in a way to produce reasonably interesting scenarios to evaluate the algorithms, but since they are random, some may be really easy or boring.\n\n#### Primary code maintainer:\nMichael Everett (https://github.com/mfe7)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-acl%2Fcadrl_ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmit-acl%2Fcadrl_ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-acl%2Fcadrl_ros/lists"}