{"id":19855168,"url":"https://github.com/leggedrobotics/swerve_steering","last_synced_at":"2025-05-02T01:30:45.765Z","repository":{"id":43082178,"uuid":"463262078","full_name":"leggedrobotics/swerve_steering","owner":"leggedrobotics","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-21T08:01:47.000Z","size":7752,"stargazers_count":32,"open_issues_count":0,"forks_count":5,"subscribers_count":11,"default_branch":"release","last_synced_at":"2025-04-06T20:46:28.794Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leggedrobotics.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":"2022-02-24T18:39:02.000Z","updated_at":"2025-02-05T15:30:36.000Z","dependencies_parsed_at":"2022-09-21T13:23:37.657Z","dependency_job_id":null,"html_url":"https://github.com/leggedrobotics/swerve_steering","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/leggedrobotics%2Fswerve_steering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leggedrobotics%2Fswerve_steering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leggedrobotics%2Fswerve_steering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leggedrobotics%2Fswerve_steering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leggedrobotics","download_url":"https://codeload.github.com/leggedrobotics/swerve_steering/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969270,"owners_count":21673183,"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-12T14:11:55.025Z","updated_at":"2025-05-02T01:30:40.756Z","avatar_url":"https://github.com/leggedrobotics.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swerve MPC\n![ animation of swerve steering robot, driving and reconfiguring ](swerve_animation.gif)\n\nCode for the RA-L and IROS publication \"Design and Motion Planning for a Reconfigurable Robotic Base\".\n\nThe full text of the paper is on [IEEE Xplore](https://ieeexplore.ieee.org/document/9817632).\n\nYou can find the accepted version on [arxiv](https://arxiv.org/abs/2206.15298).\n\nBibtex snippet to cite our work:\n\n```\n@article{pankertDesignMotionPlanning2022,\n\ttitle = {Design and {Motion} {Planning} for a {Reconfigurable} {Robotic} {Base}},\n\tvolume = {7},\n\tissn = {2377-3766},\n\tdoi = {10.1109/LRA.2022.3189166},\n\tnumber = {4},\n\tjournal = {IEEE Robotics and Automation Letters},\n\tauthor = {Pankert, Johannes and Valsecchi, Giorgio and Baret, Davide and Zehnder, Jon and Pietrasik, Lukasz L. and Bjelonic, Marko and Hutter, Marco},\n\tmonth = oct,\n\tyear = {2022},\n\tnote = {Conference Name: IEEE Robotics and Automation Letters},\n\tkeywords = {Legged locomotion, Manipulators, Mechanism design, mobile manipulation, Navigation, Planning, robotics and automation in construction, Robots, Task analysis, Wheels, whole-body motion planning and control},\n\tpages = {9012--9019}\n}\n```\n\nVideos of the hardware experiments are on [youtube](https://youtu.be/qBY4zovf2vo).\n\n## Docker\nThe easiest way to run a demo on your local machine is to use docker.\nFetch the image from dockerhub with:\n```\ndocker pull rslethz/swerve_mpc\n```\nAlternatively, build a docker image by cloning this repository and running the following command:\n```\ndocker image build -t rslethz/swerve_mpc .\n```\nRun the simulation with this command:\n```\nxhost local:root \u0026\u0026\\\ndocker container run -it --rm --name swerve_simulation_demo \\\n -e DISPLAY=$DISPLAY \\\n -v /tmp/.X11-unix:/tmp/.X11-unix \\\n --device /dev/dri \\\n rslethz/swerve_mpc /bin/bash -c \"source devel/setup.bash \u0026\u0026 roslaunch swerve_control simulation.launch\"\n```\nIf a joystick is connected to the port `/dev/input/js0`, you can give the container access to it:\n```\nxhost local:root \u0026\u0026\\\ndocker container run -it --rm --name swerve_simulation_demo \\\n -e DISPLAY=$DISPLAY \\\n -v /tmp/.X11-unix:/tmp/.X11-unix \\\n --device /dev/dri --device /dev/input/js0 \\\n rslethz/swerve_mpc /bin/bash -c \"source devel/setup.bash \u0026\u0026 roslaunch swerve_control simulation.launch\"\n```\n \nThe reconfiguration scripts can be called as follows:\n```\ndocker exec swerve_simulation_demo /bin/bash -c \"source devel/setup.bash \u0026\u0026 rosrun swerve_mpc x_open.py\"\n```\n\n## Local Installation\nThe code has been tested with Ubuntu 20.04 and ros-noetic.\nInstall the following tools to fetch the dependencies:\n```\nsudo apt install python3-catkin-tools python3-rosdep git python3-vcstool\n```\n\nCreate a new catkin workspace and clone this repo into the src dir.\n\nClone all source dependencies into the src dir with vcstool:\n```\nvcs import . \u003c ../dependencies_exact.rosinstall --recursive --shallow\n```\n\nUse rosdep to install all binary dependencies:\n```\nrosdep update \u0026\u0026 rosdep install --from-paths . --ignore-src -r -y\n```\n\nCompile all packages with:\n```\ncatkin build swerve_control\n```\n\n### Gazebo Simulation\nTo launch in simulation, run:\n```\nroslaunch swerve_control simulation.launch\n```\nBy default, the gazebo simulator starts with an empty world. In `swerve_description/launch/gazebo.launch`, the world file can be specified. We provide the file `slope.world` to test the SE3 motion model of the MPC. For deployments on slopes, the state estimator can be activated by setting the argument `use_state_estimator` in `swerve_control/launch/highlevel_controller.launch` to true.\n\nThe MPC ros controller can be activated with the `rqt_controller_manager` GUI. Navigation commands can be send to the robot with the `rviz` goal pose marker or a joystick.\nReconfiguration can be triggered with the rosservice `/swerve_base/brakes_service` or the following scripts:\n```\nrosrun swerve_mpc x_open.py\nrosrun swerve_mpc x_close.py\nrosrun swerve_mpc h_open.py\nrosrun swerve_mpc h_close.py\nrosrun swerve_mpc a_open.py\nrosrun swerve_mpc a_close.py\n```\nThe `open` scripts open the brakes and allow for reconfiguration. The `close` scripts fix the base at the current configuration. Please note that a navigation goal needs to be sent while reconfiguring.\n\n## Packages\n### Controllers\n#### swerve_mpc\nSwerve MPC module and a `ros_control` tracking controller implementation.\n### Support\n#### swerve_control\nLaunch files to start the simulation. \n\n#### strafe_joy\nFork of turtle_teleop_joy including a new axis for strafing.\n\n#### swerve_description\nRobot description files specific to swerve.\n\n#### swerve_msgs\nMessage definitions for steering controllers and brakes\n\n#### swerve_brakes\nContains code for controlling magnetic brakes and reading brake encoders with a micro controller\n\n## License\nBSD-3-Clause\nCopyright (c) 2022 Johannes Pankert \u003cpankertj@ethz.ch\u003e, Davide Baret, Lukasz Pietrasik\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice,\n   this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright\n   notice, this list of conditions and the following disclaimer in the\n   documentation and/or other materials provided with the distribution.\n3. Neither the name of this work nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleggedrobotics%2Fswerve_steering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleggedrobotics%2Fswerve_steering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleggedrobotics%2Fswerve_steering/lists"}