{"id":23174071,"url":"https://github.com/zebradevs/fetch_tools","last_synced_at":"2025-08-18T09:30:46.449Z","repository":{"id":35699239,"uuid":"39976531","full_name":"ZebraDevs/fetch_tools","owner":"ZebraDevs","description":"It's like catkin_tools, but for Fetch","archived":false,"fork":false,"pushed_at":"2024-01-08T18:34:46.000Z","size":59,"stargazers_count":10,"open_issues_count":0,"forks_count":10,"subscribers_count":31,"default_branch":"ros1","last_synced_at":"2024-04-24T07:22:10.838Z","etag":null,"topics":["indigo","melodic","open-source"],"latest_commit_sha":null,"homepage":null,"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/ZebraDevs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","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":"2015-07-30T23:17:59.000Z","updated_at":"2024-04-24T07:22:10.838Z","dependencies_parsed_at":"2022-09-08T14:21:44.002Z","dependency_job_id":null,"html_url":"https://github.com/ZebraDevs/fetch_tools","commit_stats":null,"previous_names":["fetchrobotics/fetch_tools"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraDevs%2Ffetch_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraDevs%2Ffetch_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraDevs%2Ffetch_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraDevs%2Ffetch_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZebraDevs","download_url":"https://codeload.github.com/ZebraDevs/fetch_tools/tar.gz/refs/heads/ros1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230220149,"owners_count":18192223,"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":["indigo","melodic","open-source"],"created_at":"2024-12-18T05:19:04.430Z","updated_at":"2024-12-18T05:19:05.063Z","avatar_url":"https://github.com/ZebraDevs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fetch Tools\n===========\n\nThis package contains the `fetch` utility to make development\neasier. For full details of command usage and arguments, run `fetch\n-h` and `fetch COMMAND -h`. It also adds useful aliases for connecting\nto robots. Below summarizes installation and common usage.\n\nIntended Workflow\n-----------------\n\nThis tool was written to help make it easier to develop code and\nswitch between robots with ease. It works by inferring what robot\nyou're working on from `$ROS_MASTER_URI` and automating common tasks\nsuch as account creation, code syncing, and running commands. It\nassumes that you always edit code in your ROS Workspace and then push\na copy of the workspace to the robot afterwards, so that you can run\nit. This keeps all code that you are developing on your computer in\ncase someone takes the robot.\n\n### Example Workflow\n\n```\n# Start working on freight 0 for the first time\nufr 0\nfetch create-account --fullname \"Not A. Robot\"\nfetch push --install-deps --build\nfetch run \"roslaunch my_awesome_package do_stuff.launch\"\n# Edit code to fix a bug\nfetch push --build \"--pkg my_awesome_package\"\nfetch run \"roslaunch my_awesome_package do_stuff.launch\"\n# Switch over to freight 8, since someone kidnapped freight 0\nufr 8\nfetch create-account --fullname \"Not A. Robot\"\nfetch push --install-deps --build\nfetch run \"roslaunch my_awesome_package do_stuff.launch\"\n```\n\nInstallation\n------------\n\nTo install run, checkout the fetchrobotics/sandbox repo and run:\n\n```\nsudo apt-get install ros-noetic-fetch-tools\n```\n\nAfterwards, restart your terminal or run `source $(rospack find\nfetch_tools)/setup.bash`.\n\nCommon Arguments\n-------------\n\n### Robot\n\nMost operations interact with a robot, in this case they take an\noptional `--robot` argument.  If the robot parameter is passed in\nusing `--robot`, that is the value used. If not, the parameter\ndefaults to the robot pointed at by `$ROS_MASTER_URI`. To set the\ndefault value, add the line `export FETCH_ROBOT=myrobot` to your\n.bashrc file.\n\nIf the robot is not on the DNS (i.e. pinging the robot name does not\nwork), you can add `.local` to the parameter, e.g. `fetch4.local`, and\ncommunication with the robot will work via zeroconf (avahi).\n\n### Workspace\n\nSome operations interact with a workspace, in this case take an\noptional `--workspace` argument.  If the a parameter is passed in that\nvalue is used. If not, the parameter defaults to `~/$ROS_DISTRO`. To\nset the default value, add the line `export\nFETCH_WORKSPACE=/path/to/my/workspace` to your .bashrc file. By\ndefault, the remote workspace is assumed to match your local\nworkspace. If not, you can use either the `--remote-workspace`\nargument or the `FETCH_REMOTE_WORKSPACE` environment variable to\nchange it.\n\n### User\n\nMost operations interact with a robot, in this case they often effect\na particular user on that robot, so they take an optional `--user`\nargument.  If the robot parameter is passed in using `--user`, that is\nthe value used. If not, the parameter defaults to `$USER`. To set the\ndefault value, add the line `export FETCH_USER=myuser` to your .bashrc\nfile.\n\n`fetch` Commands\n----------------\n\n### fetch create-account\n\nTo create an account:\n\n```\nfetch create-account\n```\n\nTo create an account with another username:\n\n```\nfetch create-account --robot freight0 --user test\n```\n\nOnce it is done you can run `ssh $USER@freight0` without entering your\npassword. (If both users are the same you can just run `ssh freight0`)\n\n#### Customizing Account Creation\n\nIf you are creating accounts on lots of robots, you can customize the\ninstall process. First, create a copy of the skeleton directory:\n\n```\ncp -r $(rospack find fetch_tools)/resources/robot_skeleton ~/.fetch/robot_skeleton\n```\n\nNext, customize all files to your desired value. `initialize.sh` is a\nspecial script that gets run during the account creation process. If\nyou want to install software or run other commands every time you\ncreate an account, customize `initialize.sh`.\n\n### fetch push\n\n**WARNING:** Synchronize in this context means make the remote\nworkspace like the current workspace. This means new files will be\nadded and *old files will be deleted.* It is strongly recommended that\nyou never change files in the workspace on the robot directly.\n\nTo synchronize your `$workspace/src` directory with the matching\ndirectory on another robot:\n\n```\nfetch push\n```\n\nTo synchronize another workspace with a robot:\n\n```\nfetch push --workspace ~/test_ws\n```\n\nTo synchronize and then run `catkin_make` to build:\n\n```\nfetch push --build\n```\n\nTo synchronize and install all dependencies with rosdep:\n\n```\nfetch push --install-deps\n```\n\nTo synchronize and then run `catkin_make --pkg follow_pick\n-DCMAKE_BUILD_TYPE=RELEASE` instead of `catkin_make --pkg follow_pick\n-DCMAKE_BUILD_TYPE=Debug` to build:\n\n```\nfetch push --build \"--pkg follow_pick -DCMAKE_BUILD_TYPE=RELEASE\"\n```\n\n### fetch pull\n\nIs just fetch push in reverse, so it pulls code from the remote\nworkspace into the local workspace. It supports the same arguments\n\n### fetch run\n\nTo run a command on the robot:\n\n```\nfetch run COMMAND\n```\n\nTo run a command on the robot with arguments:\n\n```\nfetch run \"COMMAND --flag1 --flag2 arg1\"\n```\n\n### fetch lint\n\nFetch lint runs pep8, roslint, and catkin_lint to make sure a package\nis compliant with all style guides. To lint a package:\n\n```\nfetch lint PACKAGE\n```\n\nTo lint a folder:\n\n```\nfetch lint FOLDER\n```\n\nTo lint a file:\n\n```\nfetch lint FILE\n```\n\n### fetch workspace-status\n\nThis command produces a table of the current workspace, including the\ngit information so that you can communicate what code is checked out\neasily. Running:\n\n```\nfetch workspace-status\n```\n\nProduces:\n\nName             | Branch        | SHA1\n-----------------|---------------|--------------\nfetch_ros        | melodic-devel | 30d7794\nfetch_tools      | push          | 5bbb0e4-dirty\nsome_random_code | None          | untracked\n\n### fetch debug-snapshot\n\nThis command takes a debug snapshot of running robot, gathering\ninformation that can be useful in diagnosing robot problems:\n\n```\nfetch debug-snapshot\n```\n\n**NOTE:** If this command is run on the robot itself, it may fail silently\ndue to `ssh` prompts.  You can fix this by manually doing `ssh fetchXYZ`\n(to add the robot's own host key to its list of known hosts).\n\nUseful Aliases\n--------------\n\nIn addition to the `fetch` command, setup.bash loads some useful\naliases for working with multiple Fetch and Freight robots.\n\n### Working with `$ROS_MASTER_URI`\n\nThere are three aliases for working with `$ROS_MASTER_URI`:\n\n```\nuf 5   # Set ROS_MASTER_URI=\"http://fetch5:11311\"\nufr 0  # Set ROS_MASTER_URI=\"http://freight0:11311\"\nul     # Set ROS_MASTER_URI=\"http://localhost:11311\"\n```\n\n- `uf` is short for use fetch\n- `ufr` is short for use freight\n- `ul` is short for use localhost\n\nNote also that `ul` supports setting a custom port\n\n```\nul 11312  # Set ROS_MASTER_URI=\"http://localhost:11312\"\n```\n\n### SSH\n\nThere are two aliases for sshing into robots\n\n```\nsf 5   # SSH into fetch 5\nsfr 0  # SSH into freight0\n```\n\nYou can also use aliases to do `ssh-copy-id` for key setup with robots\n\n```\nkf 1104\nkfr 1234\n```\n\n### Using .local with uf/ufr and sf/sfr\n\nIf your network does not provide DNS for your robots, often the robot's number\ncan simply be appended with `.local` to take advantage of zeroconf (avahi)\nwithout needing any DNS configuration.\n\n```\nuf 5.local   # Set ROS_MASTER_URI=\"http://fetch5.local:11311\"\nsf 5.local   # SSH into fetch 5, without using DNS\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzebradevs%2Ffetch_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzebradevs%2Ffetch_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzebradevs%2Ffetch_tools/lists"}