├── .gitignore ├── README.md ├── fetch_binary_drivers ├── CHANGELOG.rst ├── CMakeLists.txt ├── Makefile.tarball ├── README.md ├── fetch-drivers-0.9.3.tar.gz.md5sum └── package.xml ├── fetch_bringup ├── CHANGELOG.rst ├── CMakeLists.txt ├── config │ ├── analyzers.yaml │ ├── default_controllers.yaml │ ├── fetch_driver_params.json │ └── graft.yaml ├── launch │ ├── fetch.launch │ └── include │ │ ├── aggregator.launch.xml │ │ ├── graft.launch.xml │ │ ├── head_camera.launch.xml │ │ ├── laser.launch.xml │ │ ├── runstop.launch.xml │ │ └── teleop.launch.xml ├── package.xml └── scripts │ ├── controller_reset.py │ ├── software_runstop.py │ └── test │ └── test_software_runstop.py ├── fetch_system_config ├── README.md ├── debian │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── docs │ ├── fetch-noetic-config.install │ ├── fetch-noetic-config.postinst │ ├── fetch-noetic-config.ps4joy.service │ ├── fetch-noetic-config.robot.logrotate │ ├── fetch-noetic-config.robot.service │ ├── fetch-noetic-config.ros.logrotate │ ├── fetch-noetic-config.roscore.service │ ├── fetch-noetic-config.soundplay.service │ ├── freight-noetic-config.install │ ├── freight-noetic-config.postinst │ ├── freight-noetic-config.ps3joy.service │ ├── freight-noetic-config.ps4joy.service │ ├── freight-noetic-config.robot.logrotate │ ├── freight-noetic-config.robot.service │ ├── freight-noetic-config.ros.logrotate │ ├── freight-noetic-config.roscore.service │ ├── freight-noetic-config.soundplay.service │ ├── rules │ ├── source │ │ └── format │ └── triggers └── root │ ├── etc │ ├── acpi │ │ ├── events │ │ │ └── powerbtn │ │ └── powerbtn.sh │ ├── asound.conf │ ├── default │ │ └── grub.d │ │ │ └── 50-fetch.cfg │ ├── modprobe.d │ │ └── blacklist-intel-audio.conf │ └── netplan │ │ └── 99-fetch-ethernet.yaml.default │ ├── lib │ └── udev │ │ └── rules.d │ │ ├── 40-libopenni2-0609.rules │ │ └── 99-ds4drv.rules │ └── opt │ └── ros │ ├── roscore_poststart.bash │ └── roscore_prestart.bash └── freight_bringup ├── CHANGELOG.rst ├── CMakeLists.txt ├── config ├── analyzers.yaml ├── default_controllers.yaml ├── freight_driver_params.json └── graft.yaml ├── launch ├── freight.launch └── include │ ├── aggregator.launch.xml │ ├── graft.launch.xml │ ├── laser.launch.xml │ └── teleop.launch.xml └── package.xml /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.tar.gz 3 | *.so 4 | 5 | # system config; these are all files generated by dpkg-buildpackage 6 | *.buildinfo 7 | *.changes 8 | *.deb 9 | *.debhelper 10 | *.dsc 11 | *.log 12 | *.substvars 13 | fetch-noetic-config 14 | fetch-system-config*.tar.xz 15 | freight-noetic-config 16 | files 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fetch_robots 2 | 3 | Bringup files for Fetch and Freight, and a binary version of the the drivers and firmware. 4 | 5 | ## ROS Buildfarm Release 6 | 7 | Package | Melodic Source | Melodic Debian 8 | -------- | -------------- | -------------- 9 | fetch_drivers | [![Build Status](http://build.ros.org/job/Msrc_uB__fetch_drivers__ubuntu_bionic__source/badge/icon)](http://build.ros.org/job/Msrc_uB__fetch_drivers__ubuntu_bionic__source/) | [![Build Status](http://build.ros.org/job/Mbin_uB64__fetch_drivers__ubuntu_bionic_amd64__binary/badge/icon)](http://build.ros.org/job/Mbin_uB64__fetch_drivers__ubuntu_bionic_amd64__binary/) | 10 | fetch_bringup | [![Build Status](http://build.ros.org/job/Msrc_uB__fetch_bringup__ubuntu_bionic__source/badge/icon)](http://build.ros.org/job/Msrc_uB__fetch_bringup__ubuntu_bionic__source/) | [![Build Status](http://build.ros.org/job/Mbin_uB64__fetch_bringup__ubuntu_bionic_amd64__binary/badge/icon)](http://build.ros.org/job/Mbin_uB64__fetch_bringup__ubuntu_bionic_amd64__binary/) | 11 | fetch_system_config | | | 12 | freight_bringup | [![Build Status](http://build.ros.org/job/Msrc_uB__freight_bringup__ubuntu_bionic__source/badge/icon)](http://build.ros.org/job/Msrc_uB__freight_bringup__ubuntu_bionic__source/) | [![Build Status](http://build.ros.org/job/Mbin_uB64__freight_bringup__ubuntu_bionic_amd64__binary/badge/icon)](http://build.ros.org/job/Mbin_uB64__freight_bringup__ubuntu_bionic_amd64__binary/) | 13 | 14 | ## ROS Buildfarm Devel 15 | 16 | Package | Melodic Devel 17 | ------- | ------------- 18 | fetch_robots | [![Build Status](http://build.ros.org/job/Mdev__fetch_robots__ubuntu_bionic_amd64/badge/icon)](http://build.ros.org/job/Mdev__fetch_robots__ubuntu_bionic_amd64) | 19 | 20 | -------------------------------------------------------------------------------- /fetch_binary_drivers/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package fetch_drivers 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 0.9.3 (2021-04-25) 6 | ------------------ 7 | * New bump to binary drivers (0.9.3) 8 | 9 | * Fix: Loosen tolerance for torso startup position 10 | * Fix: Longer signal from mainboard to computer for shutdown 11 | 12 | * Contributors: Eric Relson 13 | 14 | 0.9.2 (2021-03-12) 15 | ------------------ 16 | * Update md5sum file 17 | * Contributors: Eric Relson 18 | 19 | 0.9.1 (2021-03-05) 20 | ------------------ 21 | * Initial Noetic release 22 | * Point to a new drivers binary release (0.9.0) 23 | * Contributors: Alex Moriarty, Eric Relson, Russell Toris 24 | 25 | 0.9.0 (2021-03-05) 26 | ------------------ 27 | 28 | * Contributors: Alex Moriarty, Eric Relson, Russell Toris 29 | 30 | 0.8.8 (2019-08-21) 31 | ------------------ 32 | * Binary Drivers 0.8.8 (`#52 `_) 33 | 34 | * Sync drivers with internal release 2018.8_stable. 35 | * This fixes https://github.com/fetchrobotics/fetch_ros/issues/70 36 | 37 | * Merge pull request `#1647 `_ from moriarty/opensource-fixes 38 | This addresses https://github.com/fetchrobotics/fetch_ros/issues/70 39 | * Docker based testing 2.0 (`#1332 `_) 40 | * More LED Diagnostics [2018.8] (`#1510 `_) 41 | * Merge pull request `#1504 `_ from dbking77/publish_gyro_offset_age.8 42 | 43 | * Extra gyro diagnostics 2018.8 44 | * Publish gyro offset age. 45 | * Record interval average for gyro offset. 46 | * Publish average gyro temperature. 47 | 48 | * Merge pull request `#1398 `_ from dbking77/slower_gyro_drift_fix-2018.8 49 | 50 | * Put slightly more aggressive filter on wheel motion detector. 51 | * Also don't keep gyro output enabled for a long time unless robot has been moving for a while. 52 | 53 | * Backport driver creation system [2018.8] (`#1369 `_) 54 | * Merge pull request `#1364 `_ from dbking77/combined_gyro_zeroing_fix_2018.8 55 | * Merge pull request `#1335 `_ from dbking77/combined_gyro_output_disable_delay_2018.8 56 | * Merge pull request `#1306 `_ from dbking77/charger_config_improvements_for_2018.8 57 | * Merge pull request `#1309 `_ from dbking77/accel_direction_fixup_for_2018.8 58 | * added nav command sub to light driver (`#1314 `_) 59 | * Support for mainboard rev I and J 60 | * Merge pull request `#1259 `_ from dbking77/imu_param_description_fix 61 | * Merge branch '2018.6_stable' into master 62 | * Merge pull request `#1202 `_ from moriarty/compatibility-fixes 63 | 64 | * [ROS][C++] Indigo & Melodic Compatibility fixes 65 | * [C++] urdf/model.h upstream compatibility ptr 66 | * This fixes `#1181 `_ 67 | * and can fix `fetchrobotics/fetch_ros#86 `_ 68 | * [C++] additional [-Werror=catch-value=] fixes 69 | * [C++] catch errors by const ref 70 | 71 | * More extensive docker stuff as well as a fix for testing master (`#1186 `_) 72 | * Use std::isnan instead of isnan 73 | * Add missing catkin dependencies for actionlib messages 74 | * Move header files shared by driver and firmware to shared directory. (`#1167 `_) 75 | 76 | * Moving header files shared by driver and firmware to shared directory. 77 | * Put shared structs/enums in fetch_drivers::shared namespace. 78 | * Change include of stdint.h cstdint. 79 | * Put BoardFlags, PanelFlags, and TorsoSensorParams in a struct. 80 | * Update gitignore to ignore bootloader and firmware. 81 | 82 | * Merge pull request `#1187 `_ from chadrockey/1604_fixes 83 | * Contributors: Alexander Moriarty, Andrew Parker, Carl Saldanha, Chad Rockey, Derek King, Eric Relson, Jeff Wilson, Justin Watson, Luc Bettaieb, Niharika Arora, Sarah Elliott 84 | 85 | 86 | 0.8.7 (2019-08-06) 87 | ------------------ 88 | 89 | 0.8.6 (2019-02-28) 90 | ------------------ 91 | * Merge pull request `#36 `_ from fetchrobotics/install-laser-filters 92 | [fetch_drivers] Catkin Install missed laser filters 93 | * Contributors: Alexander Moriarty, Carl Saldanha 94 | 95 | 0.8.5 (2019-02-26) 96 | ------------------ 97 | * [FIX] missing laser filter plugins (`#34 `_) 98 | The drivers work without them, but the robot drives reallly slow. 99 | * Contributors: Alex Moriarty 100 | 101 | 0.8.4 (2019-02-21) 102 | ------------------ 103 | 104 | 0.8.3 (2019-02-15) 105 | ------------------ 106 | * Add depend urdfdom, and switch to (`#32 `_) 107 | * Contributors: Alexander Moriarty 108 | 109 | 0.8.2 (2019-02-15) 110 | ------------------ 111 | * [fetch_driver] Makefile and mk depend on rospack 112 | mk uses rospack internally but we don't get the rospack dependency. 113 | https://github.com/ros/ros/issues/204 114 | We also call rospack in Makefile.tarball so we should directly depend on 115 | it instead of assuming it is depended on by ros/core/mk. 116 | * Contributors: Alexander Moriarty 117 | 118 | 0.8.1 (2019-02-15) 119 | ------------------ 120 | * Merge pull request `#29 `_ from moriarty/fix-build-deps 121 | [fetch_drivers] exec_depend -> build_depend 122 | I left find_package in the CMakeLists.txt for these dependencies. 123 | * Contributors: Alexander Moriarty, Carl Saldanha 124 | 125 | 0.8.0 (2019-01-30) 126 | ------------------ 127 | * Merge pull request `#27 `_ from moriarty/fetch-binary-drivers 128 | [fetch_binary_drivers] new [fetch_drivers] package 129 | * [fetch_drivers] add more dependencies 130 | All these dependencies are exec_dependencies because this 131 | package doesn't compile anything. 132 | They're also in the CMakeLists.txt in the catkin_package and find_package to be safe. 133 | * [fetch_binary_drivers] new [fetch_drivers] package 134 | This is a new package providing the "fetch_drivers" which was previously 135 | built internally and distributed as a binary only debian package. 136 | We will officially announce when the upgrade from Indigo->Melodic is 137 | ready. 138 | 18.04 and ROS Melodic on the Fetch Research Platforms is still being 139 | tested. 140 | The process isn't straight foward as there are calibration files 141 | which you will want to back-up before the upgrade. 142 | This `fetch_drivers` package also won't start like it use to because of 143 | the change from `upstart` to `systemd`. 144 | That requires `fetch_system_config` which will be open sourced soon. 145 | This `fetch_binary_drivers` package is part of a plan to distribute 146 | updates and upgrades to Fetch Research Platform customers faster in the future. 147 | This relates to `fetchrobotics/fetch_ros#63 `_ 148 | 1. An officiall announcement will be made when everything is ready. 149 | 2. We will update and document the process on: 150 | https://docs.fetchrobotics.com/ 151 | 3. We will also announce via our mailing list, ros discourse and post on: 152 | https://opensource.fetchrobotics.com/ 153 | * Contributors: Alexander Moriarty, Carl Saldanha, Eric Relson 154 | 155 | 0.8.0 / 2018.8 (2019-01-30) 156 | ---------------------------- 157 | * added public binary driver creation system for 158 | * Merge pull request `#1364 `_ from dbking77/combined_gyro_zeroing_fix_2018.8 159 | Have zero gyro\_ state (for dual_imu_publisher), not just output message. 160 | * Merge pull request `#1335 `_ from dbking77/combined_gyro_output_disable_delay_2018.8 161 | Don't instantly zero combined gyro when enbale_gyro_output is false, instead 162 | allow each invidual gyro to do their own thing. 163 | This is related to a feature that was implemented with 164 | https://github.com/fetchrobotics/fetch_drivers/pull/1103 165 | * Merge pull request `#1309 `_ from dbking77/accel_direction_fixup_for_2018.8 166 | Reorder accelerometer axes for revI and newer mainboards. 167 | * Support for mainboard rev I and J 168 | Updates to docs describing adding a new board. 169 | * Merge pull request `#1259 `_ from dbking77/imu_param_description_fix 170 | Fix description of a couple IMU parameters. 171 | * Update Dockerfile 172 | * Merge pull request `#1202 `_ from moriarty/compatibility-fixes 173 | [ROS][C++] Indigo & Melodic Compatibility fixes 174 | [C++] urdf/model.h upstream compatibility ptr 175 | This fixes `#1181 `_ and can fix `fetchrobotics/fetch_ros#86 `_ 176 | Upstream urdf/model.h has changed, and a fix backported to indigo. 177 | The fix is only available if you upgrade your ROS indigo pacakges. 178 | This fix should work for all three cases 179 | backport not available, backport available, backport not needed. 180 | * [C++] catch errors by const ref (`#1201 `_) 181 | This fixes the warning as error: 182 | catching polymorphic type ‘class std::runtime_error’ by value 183 | [-Werror=catch-value=] 184 | * Added low charge and critical charge LED effects. 185 | FIRM-59 186 | * More extensive docker stuff as well as a fix for testing master (`#1186 `_) 187 | * Merge pull request `#1184 `_ from dbking77/eth_state_machine 188 | Object-based state machine to operation Ethernet + LwIP stack 189 | * Merge pull request `#1187 `_ from chadrockey/1604_fixes 190 | Small Fixes to allow building on 16.04 191 | * Use std::isnan instead of isnan 192 | * Add missing catkin dependencies for actionlib messages 193 | * Move header files shared by driver and firmware to shared directory. (`#1167 `_) 194 | Also: 195 | - Put shared structs/enums in fetch_drivers::shared namespace. 196 | - Change include of stdint.h cstdint. 197 | - Put BoardFlags, PanelFlags, and TorsoSensorParams in a struct. 198 | - Update gitignore to ignore bootloader and firmware. 199 | * Contributors: Alexander Moriarty, Andrew Parker, Carl Saldanha, Chad Rockey, Derek King, Eric Relson, Jeff Wilson, Justin Watson, Luc Bettaieb, Niharika Arora, Sarah Elliott 200 | 201 | 0.7.29 (2018-01-29) 202 | ------------------- 203 | * Merge pull request `#1047 `_ from dbking77/depracate_breaker_scripts 204 | Enable/disable breaker scripts are old and perform no error checking. 205 | * Enable/disable breaker scripts are old and perform no error checking. 206 | Use breaker.py or c++ breaker tool instead. 207 | * Merge pull request `#1043 `_ from dbking77/read_board_unique_id_fixes 208 | Allow read_board to continue even if unique ID cannot be read. 209 | * Merge pull request `#1042 `_ from dbking77/motor_control_flags_namespace_fix 210 | MotorControlFlag namespace fix. 211 | * Allow read_board to continue even if unique ID cannot be read. 212 | * MotorControlFlag namespace fix. 213 | * Merge pull request `#1041 `_ from dbking77/charger_diagnostics_fix2 214 | Fix incorrect virtual function in ChargerStatusGenerator class. 215 | * Fix incorrect virtual function in ChargerStatusGenerator class. 216 | Virtual function should be collect(void) not collect(double). 217 | Because base class provided default collect(), there was no compile time error, but diagnostics output for charger was mostly garbage. 218 | Add "override" to all sub-class virtual function definitions so this would cause a compile time error if this happens again. 219 | Remove virtual from all sub-class function definitions (it is redudant, and kind silly now that override exists) 220 | * Add units to system time in read_board 221 | * Merge pull request `#1033 `_ from briancairl/NAV-1006 222 | NAV-1006 : Adds filter plugin for filtering neighborhoods which span a small distance 223 | * Add option to prevent use of gyro1 or gyro2 in combined gyro output. (`#1032 `_) 224 | * Add option to prevent use of gyro1 or gyro2 in combined gyro output. 225 | * Increase gyro covariance when neither gyro is available. 226 | * Adds filter plugin for filtering neighborhoods which span a small distance 227 | Changes default filter plugin chain to filter small clusters (in the maximum spanning distance sense) as opposed to groups with few points 228 | * Have imu test create CSV log of collected IMU data. (`#1031 `_) 229 | Have imu test create CSV log of collected IMU data. 230 | Also support test option for revH boards on the command line. 231 | Also, added function to load saved CSV file. 232 | * qual 0.2.30: Support new primesense topic count 233 | - Update restart_checker and initial_qual as well 234 | - Also clean up imports and whitespace 235 | - Add to .gitignore 236 | * Merge pull request `#1020 `_ from aravindsv/AVRfirmware 237 | Modified makefile so there is no linking step 238 | * Merge pull request `#1027 `_ from dbking77/robot_log_split_plots 239 | Put break between different logs in plots from robot_log.csv 240 | * Merge pull request `#1026 `_ from fetchrobotics/montana_1000 241 | Remaining issues for Montana 242 | * Merge pull request `#1013 `_ from dbking77/led_panel_test 243 | Combine all charger LED control into single class to allow testing. 244 | * ADc Interrupts are working. UART bitbang timing is off, so debugging results is 245 | sketchy at best 246 | * Also print dates for log start and stop times. 247 | * fix led movement when moving very slowly 248 | * fixes to make new led manager work with montana 249 | * panel and strip share same SPI interface 250 | * runstop state should still be sent to LED strip, so it is red 251 | * Have option to put breaks between driver starts in logs. 252 | Put battery SOC data on separate plots (otherwise stuff is too confusing). 253 | * properly set velocity/acceleration limits 254 | * apply proper current limit for 1500 255 | * set fault if EDM error 256 | * use standstill flag when present 257 | * update to flexisoft r7 258 | * Modified uart timing so data can be read by logic analyzer 259 | * Cleaned up some indentation and added a note in Makefile_defines 260 | * User serial for updating logpro record 261 | * Remove Access Panel LED test 262 | Stopping the robot drivers blinks all LEDs and this is a sufficient test. 263 | * Combine all freight100 and montana panel LED control into single class to allow testing. 264 | - Add interface to allow test to be run on all LEDs at once 265 | - Time limit test mode, and also enable it for production firmware 266 | - For device without LED panel driver, provide "fake" interface (to avoid extra ifdefs) 267 | - Script to put LEDs into testing mode 268 | * Wrote bitbanged sendString for uart 269 | * Modified makefile so there is no linking step. Otherwise, no main 270 | * Merge pull request `#1019 `_ from fetchrobotics/boot_with_bms 271 | turn on BMS on boot 272 | * turn on BMS on boot 273 | * add some documentation 274 | * Merge pull request `#1014 `_ from dbking77/measure_joint_linearization 275 | Modify linearize_motor script to plot joint non-linearity 276 | * Modify linearize_motor script to plot joint non-linearity 277 | Also: 278 | - Update command line parsing to use argparse 279 | - More comments about linearizing motor vs linearizing joint 280 | * Contributors: Aravind Vadali, Brian Cairl, Derek, Derek King, Eric Relson, Michael Ferguson 281 | 282 | 0.7.28 (2017-11-16) 283 | ------------------- 284 | * Merge pull request `#1011 `_ from briancairl/intensity-filter-vinyl-cuts 285 | Updates intensity filter defaults; updates logging 286 | * Merge pull request `#1009 `_ from dbking77/mainboard_rev_h 287 | Mainboard Rev-H 288 | * Updates intensity filter defaults; updates logging 289 | * Update balancing testing. 290 | * Software support for battery balancing current measurement. 291 | * Firmware support for battery balancing current measurement. 292 | * Merge pull request `#1007 `_ from fetchrobotics/low_power 293 | add low power mode to montana 294 | * Merge pull request `#1006 `_ from erelson/add_local_fix 295 | Also remove freightXX.local from knownhosts 296 | * Also remove freightXX.local from knownhosts 297 | * Remove fetchcore_tools depend and bump robot_qual version 298 | * Remove commented code blocks 299 | * Don't remove public ssh keys in robot qual 300 | * Remove unneccessary hmi screen check 301 | * increased sleep time and switched to fetch_drivers charger_power reboot for power cycle 302 | * Merge pull request `#951 `_ from erelson/arm_motor_no_joint_test 303 | Add test for arm joints running fake-joint firmware 304 | * Refactors laser filter; makes configurable through plugins (`#1005 `_) 305 | * Converts existing filter to proper filter plugins 306 | - Removes excessive scan copying between filter stages 307 | - Adds filter plugin which loads/runs a sequence of filters 308 | - Adds Chain (adds sequential filters) 309 | - Adds Branch (adds parallel branch of filters) 310 | - Adds min-neighborhood laser filter 311 | - Adds laser scan publisher component 312 | - Updates laser_filter node to use new plugin objects 313 | * with interface 314 | * alternate sides working 315 | * add swirl 316 | * Add breakfree test for jointless motors 317 | * Add test for arm joints running fake-joint firmware 318 | * add low power (tested, but needs interface) 319 | * Contributors: Brian Cairl, David Moon, Derek, Derek King, Eric Relson, Michael Ferguson, Xu Han 320 | 321 | 0.7.27 (2017-11-05) 322 | ------------------- 323 | * Add small group filtering to intensity filter 324 | * Contributors: Brian Cairl 325 | 326 | 0.7.26 (2017-11-01) 327 | ------------------- 328 | * Merge pull request `#1003 `_ from aravindsv/DutyCycleCap 329 | Capped hmi led pulse mode at 33% duty cycle 330 | * Merge pull request `#1001 `_ from briancairl/intensity-filter 331 | Adds laser_intensity filter; refactors laser_filter module 332 | * Capped hmi led pulse mode at 33% duty cycle 333 | * Adds intensity filter with hooking mode 334 | - Adds to filter chain: pass-through with repub hook 335 | * Refactors laser_filter module organization 336 | * Contributors: Aravind Vadali, Brian Cairl, Derek, Michael Ferguson 337 | 338 | 0.7.25 (2017-10-27) 339 | ------------------- 340 | 341 | * Charger firmware version 102: 342 | * Add flags for charger balancing and fan configs 343 | * IO_485 firmware version 101: 344 | * Improve analog processing 345 | * Montana firmware version 101: increase cutoff voltage 346 | * montana_driver: additional diagnostics 347 | * montana_driver: publish motor state, charger state 348 | * montana_driver: reduce timeout to 100ms 349 | * montana_driver: disable drives when charging 350 | * read_board: fix some issues with lack of metadata 351 | * read_board: add support for IO_485 board 352 | * align_motor: improve error messages 353 | * charger_lockout: new tool to set lockout time 354 | * laser_self_filter: add padding option 355 | * add support for head mcb rev D.0 356 | * add support for round mcb rev D.0 357 | * add support for large mcb rev E.0 358 | * Contributors: Aravind Vadali, Brian Cairl, David Moon, Derek King, Eric Relson, Michael Ferguson 359 | 360 | 0.7.24 (2017-09-13) 361 | ------------------- 362 | * cart_dock_driver: add diagnostics publisher, read-only updates until ready 363 | * io_mpu_driver: add diagnostics publisher, read-only updates until ready 364 | * gripper_driver: add diagnostics publisher, read-only updates until ready 365 | * freight_driver: fix issue with panel led flags 366 | * add io_485 support 367 | * Contributors: David Moon, Derek, Michael Ferguson, Aravind Vadali 368 | 369 | 0.7.23 (2017-09-07) 370 | ------------------- 371 | * Charger firmware version 101: 372 | * Send response to panel flags writes. 373 | * Add support for rev H. 374 | * Mainboard firmware version 100: 375 | * Add support for rev H. 376 | * Fix some issues with automatic firmware cross/downgrade 377 | * Gripper driver: improve startup reliability 378 | * Contributors: Derek King, Eric Relson, Michael Ferguson 379 | 380 | 0.7.22 (2017-08-29) 381 | ------------------- 382 | * Mainboard firmware version 100: 383 | * Expose both gyros 384 | * Charger firmware version 100: 385 | * Save SOC before rebooting 386 | * Add support for rev. G boards 387 | * MCB firmware version 100: 388 | * IO Board firmware version 100: 389 | * Gripper firmware version 100: 390 | * Cancel command on board reset 391 | * F500/1500 firmware version 100: 392 | * Expose both gyros 393 | * Add automatic firmware cross/downgrade 394 | * cart_dock_driver: add firmware management 395 | * io_mpu_driver: add firmware management 396 | * F500/1500 driver: improve imu filtering 397 | * F500/1500 driver: always set robot/serial parameter 398 | * Contributors: David Moon, Derek King, Eric Relson, Michael Ferguson 399 | 400 | 0.7.21 (2017-07-27) 401 | ------------------- 402 | * F500/1500 firmware version 12: 403 | * Give gyros extra time to start up 404 | * Update charge LED usage 405 | * Update panel LED usage to match F100. 406 | * Charger firmware version 87: 407 | * Move panel LED register out of board flags 408 | * Fix F500/1500 drivers to actually update firmware 409 | * Fix F500/1500 drivers not to stop charging on driver restart 410 | * Add CSV logging to F500/1500 drivers 411 | * Update read_board to work with F500/1500 412 | * Install F500/1500 driver 413 | * Contributors: Aaron Gemmell, David Moon, Derek King, Michael Ferguson 414 | 415 | 0.7.20 (2017-07-11) 416 | ------------------- 417 | * IO Board firmware version 5: 418 | * Fix issue with LED strip lockup 419 | * Drivers: add support for mlockall/nice 420 | * Drivers: fix for empty motor messages 421 | * Drivers: update Ethernet/IP devices while not ready (Freight-500/1500) 422 | * Contributors: Alex Henning, Derek King, Eric Relson, Michael Ferguson 423 | 424 | 0.7.19 (2017-06-22) 425 | ------------------- 426 | * Charger firmware version 86: 427 | * Turn off leds when in low-power notification mode 428 | * IO Board firmware version 4: 429 | * Better locking around HMI led status 430 | * Initial Freight-500 driver 431 | * Contributors: Aaron Gemmell, Eric Relson, Michael Ferguson 432 | 433 | 0.7.18 (2017-06-19) 434 | ------------------- 435 | * Charger firmware version 85: 436 | * Better low-battery indication 437 | * Adds battery balancing configuration 438 | * Blink wifi/fc/runstop LEDs when disconnected 439 | * Fixes issue with LED panels locking up 440 | * Fixes potential issue of getting stuck in a voltage ramp 441 | * IO board firmware version 3: 442 | * Initial release 443 | * Initial release of io_mpu_driver 444 | * Initial release of field charging test 445 | * Drivers: actually start charge lockout action server 446 | * Drivers: also log SOC 447 | * Drivers: update LED panel even when not "ready" 448 | * Drivers: ignore timeouts during shutdown to avoid spurious faults 449 | * Contributors: Brian Cairl, David Moon, Derek King, Eric Relson, Michael Ferguson, Michael Janov, Aaron Gemmell 450 | 451 | 0.7.17 (2017-03-15) 452 | ------------------- 453 | * Charger firmware version 79: 454 | * Add support for LED panel on Rev. F 455 | * Allow faster charging at higher temperatures 456 | * Mainboard firmware version 63 457 | * Allow breakers to run hotter 458 | * Add support gripper Rev. E 459 | * Adds robot CSV logger 460 | * Updated laser filter with support for carts 461 | * Add battery SOC tool 462 | * Contributors: Brian Cairl, Derek King, Michael Ferguson 463 | 464 | 0.7.16 (2016-12-16) 465 | ------------------- 466 | * Charger firmware version 75 467 | * Improves balancing of batteries for better life 468 | * Improves state of charge estimation during partial discharges 469 | * Add interface for forcing computer restart 470 | * Add stale data detection to drivers 471 | * Add charger_power tool 472 | * Contributors: Derek King, Eric Relson, Michael Ferguson 473 | 474 | 0.7.15 (2016-11-29) 475 | ------------------- 476 | 477 | * Charger firmware version 72 478 | * Gripper firmware version 70 479 | * MCB firmware version 76: 480 | * Reset hall encoder error counters when signal good 481 | * Mainboard firmware version 62: 482 | * Initial support for Rev. F boards 483 | * Add support for dual gyro 484 | * Breaker tool: fix typo in usage message 485 | * Update tool: fix issues with gripper update 486 | * Fix issue with debug packets showing as lost packets 487 | * Add support for automatically enabling/disabling aux breaker on startup 488 | * Contributors: David Moon, Derek King, Eric Relson, Michael Ferguson 489 | 490 | 0.7.14 (2016-08-25) 491 | ------------------- 492 | 493 | * MCB firmware version 75: 494 | * Add support for cart docking mechanism MCB 495 | * Add support for revision F mainboard/charger 496 | * Add support for revision D large mcb 497 | * Add enviroment variable support to dynamically set driver ip 498 | * Gripper driver now publish IMU data (there is no calculation of gyro offset). 499 | * Set/Reset fault state properly in hourly logs 500 | * Contributors: Aaron Blasdel, Aravind Vadali, Camilo Buscaron, David Moon, Derek King, Eric Relson, Michael Ferguson 501 | 502 | 0.7.13 (2016-06-21) 503 | ------------------- 504 | 505 | * MCB firmware version 74: 506 | * Improve base motor alignment at higher torques 507 | * Reduce minimum voltage before fault 508 | * Recalculate joint position when offset changes 509 | * Charger firmware version 71: 510 | * Improvements for faster charging, better heat management 511 | * Send fault log on low-battery poweroff 512 | * Gripper firmware version 69 513 | * Mainboard firmware version 61 514 | * Contributors: Brian R Cairl, Derek King, Eric Relson, Michael Ferguson, Camilo Buscaron 515 | 516 | 0.7.12 (2016-06-09) 517 | ------------------- 518 | * Increase ADC sampling time for battery inputs. 519 | * Add aux option to breaker tool. 520 | * Use template parameters for GPIO interrupts instead of global variables. 521 | * Contributors: Derek King, Eric Relson, Michael Ferguson 522 | 523 | 0.7.11 (2016-05-26) 524 | ------------------- 525 | * MCB firmware version 73: 526 | * Add separate error flag for joint position monitor 527 | * Charger firmware version 69: 528 | * Slightly increase cyclic battery charging voltages 529 | * New battery voltage controller that is less likely to overshoot 530 | * Mainboard firmware version 60: 531 | * Disable breakers when shutting down 532 | * Update tool: fix identification of freights 533 | * Drivers: publish diagnostics for aux breakers 534 | * Contributors: Derek King, Eric Relson, Michael Ferguson 535 | 536 | 0.7.10 (2016-05-19) 537 | ------------------- 538 | * MCB firmware version 72: 539 | * Fix potential overflow in callbacks 540 | * Gripper firmware version 68: 541 | * Fix potential overflow in callbacks 542 | * Mainboard firmware version 59: 543 | * Fix potential overflow in callbacks 544 | * Charger firmware version 68: 545 | * Fix potential overflow in callbacks 546 | * Fix issues with handling of continuous joints 547 | * Add gripper state publishing 548 | * Contributors: Camilo Buscaron, Derek King, Eric Relson, Michael Ferguson 549 | 550 | 0.7.9 (2016-05-08) 551 | ------------------ 552 | * MCB firmware version 71: 553 | * Increase base motor torque and power limits for Freight 554 | * Firmware upload: convert board ID to int before printing 555 | * Align motor tool: fix printed output 556 | * Contributors: Camilo Buscaron, Derek King, Eric Relson, Michael Ferguson 557 | 558 | 0.7.8 (2016-04-27) 559 | ------------------ 560 | * Mainboard firmware version 57: 561 | * Fix communications lockup regression 562 | * Fix bug when has_base is false 563 | * Contributors: Camilo Buscaron, Derek King, Eric Relson, Michael Ferguson 564 | 565 | 0.7.7 (2016-04-14) 566 | ------------------ 567 | * Mainboard firmware version 56: 568 | * Block gyro glitches 569 | * Fix occasional communications lockup when runstopped 570 | * Charger firmware version 67: 571 | * State of charge improved when robot has not fully charged in a long time 572 | * Gripper firmware version 66: 573 | * Block gyro glitches 574 | * Publish zeroed IMU data when runstopped, prevents "wandering" robot 575 | * Enable auxillary breaker services 576 | * Torso Calibration Tool: log results 577 | * Read Board Tool: also get unique serial 578 | * Breaker Tool: fix to exit when arguments are not valid 579 | * Firmware Update Tool: better handle when ACKs are missed 580 | * Contributors: Derek King, Eric Relson, Michael Ferguson 581 | 582 | 0.7.6 (2016-03-19) 583 | ------------------ 584 | * Mainboard firmware version 55, Gripper version 65: 585 | * Updates for gyro glitches 586 | * Contributors: Derek King, Michael Ferguson 587 | 588 | 589 | 0.7.5 (2016-03-09) 590 | ------------------ 591 | * MCB firmware version 70: 592 | * Add filter gains for older MCBs driving new suspension and motors 593 | * Fix for mcb encoder error on boot 594 | * Mainboard firmware version 54: 595 | * Updates for gyro data glitches 596 | * Check computer current before asserting computer power button signal 597 | to avoid turning computer back on at power-off if already shutdown 598 | * Charger firmware version 66: 599 | * Fixes missed timing error that sometimes occurs when disabling charging 600 | * Gripper firmware version 64: 601 | * Updates for gyro data glitches 602 | * Assume runstopped robot is moving, do not update IMU offset. 603 | * Gyro offset calculation improved for faster convergence 604 | and improved noise immunity. 605 | * Additional locking around data published in ROS. 606 | * New read_board, breaker, align_motor, and joint_offset tools 607 | * Add DisableChargingAction to avoid hot unplugging 608 | * Contributors: Brian R Cairl, Casey Duckering, Derek King, Eric Relson, 609 | Griswald Brooks, Michael Ferguson, Bhavya Kattapuni, Camilo Buscaron 610 | 611 | 0.7.4 (2016-01-12) 612 | ------------------ 613 | * MCB firmware version 66: 614 | * Increase filtering to reduce buzz on new motors with type 3 suspension. 615 | * Monitor joint position compared to motor sensor position. 616 | * Charger firmware version 61: 617 | * Load saved battery SOC data from flash on boot. 618 | * Fix logpro logging when robot is calibrated 619 | * Check for zero joint_ratio value. 620 | * Update tool: Add option to force updates of all detected boards. 621 | * Torso calibration tool: first release. 622 | * Contributors: Derek King, Eric Relson, Michael Ferguson, Camilo Buscaron 623 | 624 | 0.7.3 (2015-11-20) 625 | ------------------ 626 | * MCB firmware version 63: 627 | * Fix bug where position gains are being set instead of velocity gains. 628 | * Contributors: Derek King, Michael Ferguson 629 | 630 | 0.7.2 (2015-11-20) 631 | ------------------ 632 | * MCB firmware version 62: 633 | * Add support for calibration of torso initialization sensor 634 | * Fix occasional bug in unique ID response packet parsing 635 | * Add additional checks on unique ID 636 | * Contributors: Derek King, Eric Relson, Michael Ferguson, Camilo Buscaron 637 | 638 | 0.7.1 (2015-11-11) 639 | ------------------ 640 | * MCB firmware version 61 641 | * Add suport for mcb rev C.1 642 | * Fix issue with unrefreshed gripper MCB register table that 643 | caused slow LED change action. 644 | * Contributors: Derek King, Michael Ferguson 645 | 646 | 0.7.0 (2015-11-02) 647 | ------------------ 648 | * MCB firmware version 60 649 | * Updated wrist flex joint limits to match URDF 650 | * Disabled flash write when motor is running 651 | * Gripper firmware version 60 652 | * Charger firmware version 60 653 | * Add state of charge estimation 654 | * Fix occasional POWER_NOT_GOOD issue on breakers after reboot 655 | * Mainboard firmware version 50 656 | * LogPRO now logs calibration_date, mainboard voltage and dock usage info 657 | * Make sure mainboard breakers are enabled after updating mainboard 658 | * Publish current/temperature limits to ROS messages 659 | * Support for rev2 robot hardware 660 | * Contributors: Derek King, Michael Ferguson, Griswald Brooks, Eric Relson 661 | 662 | 0.6.3 (2015-07-21) 663 | ------------------ 664 | * Update build 665 | * Contributors: Michael Ferguson 666 | 667 | 0.6.2 (2015-07-21) 668 | ------------------ 669 | * MCB firmware version 50 670 | * Better diagnostics for torso sensor values 671 | * Contributors: Michael Ferguson 672 | 673 | 0.6.1 (2015-07-09) 674 | ------------------ 675 | * Charger firmware version 34 676 | * state of charge improvements 677 | * Update names of motors/boards in diagnostics and robot_state message 678 | * Contributors: Derek King, Michael Ferguson 679 | 680 | 0.6.0 (2015-06-28) 681 | ------------------ 682 | * MCB firmware version 49 683 | * Various small improvements 684 | * Charger firmware version 32 685 | * Audible noise fixes when charging hard 686 | * Disable charging before rebooting board 687 | * Contributors: Derek King, Michael Ferguson 688 | * never publish NaNs to robot_state, diagnostics 689 | * Add ability to disable gripper torque 690 | * Contributors: Derek King, Michael Ferguson 691 | 692 | 0.5.3 (2015-06-09) 693 | ------------------ 694 | * Gripper firmware version 48 695 | * Increase torque limit for gripper 696 | * Charger firmware version 30 697 | * Multiple improvements to charging and diagnostics 698 | * Disable fan dc/dc when battery breaker is disabled 699 | * Contributors: Derek King, Michael Ferguson 700 | 701 | 0.5.2 (2015-06-08) 702 | ------------------ 703 | * Gripper firmware version 47 704 | * update opening amount 705 | * Charger firmware version 28 706 | * increase charging current 707 | * Contributors: Derek King, Michael Ferguson 708 | 709 | 0.5.1 (2015-06-06) 710 | ------------------ 711 | * MCB firmware version 47 712 | * Reduce friction compensation settings in arm. 713 | * Lock the gains/limits for production robots 714 | * Fix shoulder_lift_motor gains 715 | * Contributors: Derek King, Michael Ferguson 716 | 717 | 0.5.0 (2015-06-05) 718 | ------------------ 719 | * move messages into fetch_driver_msgs package 720 | * MCB firmware version 46 721 | * Wrap position around velocity pid, update gains 722 | * Charger firmware version 27 723 | * Add power mismatch check 724 | * Fill in charger information in messages 725 | * Mainboard firmware version 27 726 | * Gripper firmware version 46 727 | * Contributors: Derek King, Michael Ferguson 728 | 729 | 0.4.0 (2015-05-24) 730 | ------------------ 731 | * MCB firmware version 44 732 | * fix intermittent head pan range issue on startup 733 | * Charger firmware version 24 734 | * additional table entries for new diagnostics 735 | * Improved diagnostics for charger 736 | * Improved diagnostics for common error conditions 737 | * NOTE: RobotState message has changed, MD5 breaks from 0.3.14 738 | * Contributors: Derek King, Michael Ferguson 739 | 740 | 0.3.14 (2015-05-22) 741 | ------------------- 742 | * MCB firmware version 40 743 | * Supply current limit settings for arm motors 744 | * Overcurrent fault fix 745 | * Adds motor friction feed forward 746 | * Adjust arm motor ratios 747 | * reset controllers when faulted/runstopped 748 | * Contributors: Derek King, Mark Medonis, Michael Ferguson 749 | 750 | 0.3.13 (2015-05-10) 751 | ------------------- 752 | * add filter that removes shadow points from TIM571 753 | * update mainboard even if stuck in bootloader 754 | * update charger firmware if needed 755 | * Contributors: Michael Ferguson 756 | 757 | 0.3.12 (2015-05-06) 758 | ------------------- 759 | * update firmware build 760 | * Contributors: Derek King, Michael Ferguson 761 | 762 | 0.3.11 (2015-05-06) 763 | ------------------- 764 | * updates to build 765 | * Contributors: Derek King, Michael Ferguson 766 | 767 | 0.3.10 (2015-05-06) 768 | ------------------- 769 | * updates to build 770 | * Contributors: Michael Ferguson 771 | 772 | 0.3.9 (2015-05-06) 773 | ------------------ 774 | * MCB firmware version 40 775 | * increase mcb max temperature to 80C. 776 | * Change keys for rev C. mainboard, charger, and freight mcbs. 777 | * Contributors: Derek King, Michael Ferguson 778 | 779 | 0.3.8 (2015-05-03) 780 | ------------------ 781 | * Gripper/MCB firmware version 39 782 | * adds motor trace interface 783 | * init velocity filter before using motor angle 784 | * gripper_driver now updates gripper firmware automatically 785 | 786 | 0.3.7 (2015-04-24) 787 | ------------------ 788 | * install update tool 789 | * Contributors: Michael Ferguson 790 | 791 | 0.3.6 (2015-04-22) 792 | ------------------ 793 | * Gripper firmware version 23 794 | * implement gripper position control 795 | * report consistent id for gripper 796 | * MCB firmware version 37 797 | * set NOT_READY flag when position is invalid 798 | * wait for breaker to update before responding 799 | * new update tool for firmware 800 | * Contributors: Michael Ferguson, Derek King 801 | 802 | 0.3.5 (2015-04-20) 803 | ------------------ 804 | * MCB firmware version 36 805 | * New velocity filter for base, head 806 | * Updated shoulder lift limits 807 | * Adds torso initialization 808 | * Adds support for charger revision C 809 | * Publish correct breaker state 810 | * Contributors: Derek King, Michael Ferguson 811 | 812 | 0.3.4 (2015-04-07) 813 | ------------------ 814 | * Charger firmware version 20 815 | * Fix potential race condition in packet recieve 816 | * make joints/motors of robot_state same order 817 | * continue read-only during a fault 818 | * Contributors: Derek King, Michael Ferguson 819 | 820 | 0.3.3 (2015-04-04) 821 | ------------------ 822 | * limit standard log update retry rate 823 | * Contributors: Michael Ferguson 824 | 825 | 0.3.2 (2015-04-01) 826 | ------------------ 827 | * MCB firmware version 32 828 | * New threading model with thread pool 829 | * Fix breakers returning wrong state when DISABLED 830 | * Disable robot if a breaker trippers 831 | * Support for revision C mainboard 832 | * Contributors: Aaron Blasdel, Derek King, Michael Ferguson 833 | 834 | 0.3.1 (2015-03-28) 835 | ------------------ 836 | * MCB firmware version 31 837 | * Do not wind up base motor position 838 | * Set version/serial ROS params 839 | * Contributors: Derek King, Michael Ferguson 840 | 841 | 0.3.0 (2015-03-23) 842 | ------------------ 843 | * MCB firmware version 29 844 | * Update how we handle continuous joints 845 | * Add stall detection to gripper driver 846 | * Contributors: Derek King, Michael Ferguson 847 | 848 | 0.2.1 (2015-03-17) 849 | ------------------ 850 | * MCB firmware version 28 851 | * Fix for motor alignment 852 | * Contributors: Derek King, Michael Ferguson 853 | 854 | 0.2.0 (2015-03-16) 855 | ------------------ 856 | * MCB firmware version 27 857 | * Load position/velocity limits from URDF 858 | * Gripper is now fully functional 859 | * Contributors: Derek King, Michael Ferguson 860 | 861 | 0.1.3 (2015-03-13) 862 | ------------------ 863 | * Signifigant improvements to firmware and drivers 864 | * Contributors: Derek King, Michael Ferguson 865 | 866 | 0.1.2 (2015-01-26) 867 | ------------------ 868 | * Build and install firmware 869 | * Add support for breakers, IMU 870 | * Contributors: Derek King, Michael Ferguson 871 | 872 | 0.1.1 (2015-01-07) 873 | ------------------ 874 | * Initial Release 875 | * Contributors: Derek King, Michael Ferguson 876 | -------------------------------------------------------------------------------- /fetch_binary_drivers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | project(fetch_drivers) 3 | 4 | ### 5 | # 6 | # This is the public version of fetch_drivers. 7 | # 8 | # This is a binary only release of our drivers and firmware. 9 | # The drivers and firmware have been compiled for our research robots, inside of Docker containers on our TeamCity build servers. 10 | # 11 | # The resulting output of that build job is a .tar.gz, where the build job should only copy in what is required for the research robots. 12 | # This public repository simply pulls in that .tar.gz and extracts/installs it into ROS/catkin paths. 13 | ## 14 | 15 | find_package(catkin REQUIRED 16 | COMPONENTS 17 | mk 18 | ) 19 | 20 | ## System dependencies are found with CMake's conventions 21 | find_package(Boost REQUIRED 22 | COMPONENTS 23 | chrono 24 | filesystem 25 | program_options 26 | regex 27 | system 28 | thread 29 | ) 30 | find_package(CURL REQUIRED) 31 | find_package(PythonLibs REQUIRED) 32 | find_package(yaml-cpp REQUIRED) 33 | 34 | add_custom_target( 35 | binary_driver ALL 36 | COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} $(MAKE) -f Makefile.tarball 37 | COMMAND cmake -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/${PROJECT_NAME} 38 | COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/lib/libfetch_drivers.so ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/libfetch_drivers.so 39 | COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/lib/libfetch_drivers_odva.so ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/libfetch_drivers_odva.so 40 | COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/lib/liblaser_filter_plugins.so ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/liblaser_filter_plugins.so 41 | COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/lib/liblaser_self_filter.so ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/liblaser_self_filter.so 42 | COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/build/output/lib/${PROJECT_NAME}/* ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/${PROJECT_NAME}/ 43 | COMMAND cmake -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME} 44 | COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/share/${PROJECT_NAME}/firmware.tar.gz ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}/ 45 | COMMAND cmake -E copy_if_different ${PROJECT_SOURCE_DIR}/build/output/share/${PROJECT_NAME}/laser_filters.xml ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/${PROJECT_NAME}/ 46 | ) 47 | 48 | ################################### 49 | ## catkin specific configuration ## 50 | ################################### 51 | ## The catkin_package macro generates cmake config files for your package 52 | ## Declare things to be passed to dependent projects 53 | ## LIBRARIES: libraries you create in this project that dependent projects also need 54 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 55 | ## DEPENDS: system dependencies of this project that dependent projects also need 56 | catkin_package( 57 | LIBRARIES fetch_drivers 58 | CATKIN_DEPENDS 59 | actionlib 60 | actionlib_msgs 61 | diagnostic_msgs 62 | fetch_driver_msgs 63 | fetch_auto_dock_msgs 64 | nav_msgs 65 | power_msgs 66 | robot_calibration_msgs 67 | roscpp 68 | sensor_msgs 69 | DEPENDS 70 | Boost 71 | CURL 72 | PYTHON 73 | YAML_CPP 74 | ) 75 | 76 | ########### 77 | ## Build ## 78 | ########### 79 | 80 | ############# 81 | ## Install ## 82 | ############# 83 | 84 | install( 85 | FILES 86 | build/output/lib/libfetch_drivers.so 87 | build/output/lib/libfetch_drivers_odva.so 88 | build/output/lib/liblaser_filter_plugins.so 89 | build/output/lib/liblaser_self_filter.so 90 | DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 91 | ) 92 | 93 | install( 94 | DIRECTORY build/output/lib/fetch_drivers 95 | DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 96 | PATTERN "build/output/lib/fetch_drivers/*" 97 | PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ 98 | GROUP_EXECUTE GROUP_READ 99 | WORLD_EXECUTE WORLD_READ 100 | ) 101 | 102 | install( 103 | FILES build/output/share/${PROJECT_NAME}/firmware.tar.gz build/output/share/${PROJECT_NAME}/laser_filters.xml 104 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 105 | ) 106 | -------------------------------------------------------------------------------- /fetch_binary_drivers/Makefile.tarball: -------------------------------------------------------------------------------- 1 | all: binary_driver 2 | 3 | # TODO: There are some more things to automate. 4 | DRIVER_VERSION = 0.9.3 5 | TARBALL = build/fetch-drivers-0.9.3.tar.gz 6 | TARBALL_URL = http://packages.fetchrobotics.com/binaries/fetch-drivers-0.9.3.tar.gz 7 | SOURCE_DIR = build/output 8 | MD5SUM_FILE = fetch-drivers-0.9.3.tar.gz.md5sum 9 | UNPACK_CMD = tar zxvf 10 | include $(shell rospack find mk)/download_unpack_build.mk 11 | 12 | binary_driver: $(SOURCE_DIR)/unpacked 13 | echo "binary driver built in: " $(SOURCE_DIR) 14 | 15 | clean: 16 | -rm -rf $(SOURCE_DIR) 17 | 18 | wipe: clean 19 | -rm -rf build 20 | -------------------------------------------------------------------------------- /fetch_binary_drivers/README.md: -------------------------------------------------------------------------------- 1 | # Fetch Binary Drivers 2 | 3 | This is a public binary version of our drivers and firmware for the Fetch Research Platforms. 4 | 5 | We have two Fetch Research Platforms. Commonly known as Fetch and Freight. Fetch is the one with the arm. 6 | The drivers and firmware in this package are for both. 7 | 8 | https://docs.fetchrobotics.com/ 9 | 10 | # Fetch Drivers 11 | 12 | The catkin package inside of this folder is called `fetch_drivers`, not `fetch_binary_drivers`. 13 | This is because we've previously been releasing packages which depend on `fetch_drivers`. 14 | We're just changing how we distribute our drivers. 15 | 16 | # About 17 | 18 | This package should only be needed if you're using one of the Fetch Research Platforms. 19 | 20 | Our goal is to better support our our Fetch Research Platform customers through an improved, more automated build and release process. This will get enable us to get updates out faster. 21 | 22 | We discussed at [ROSCon 2018](https://roscon.ros.org/2018/) in a talk "Hermetic Robot Deployment Using Multi-Stage Dockers" 23 | by @levavakian & @bluryi some of our internal way of doing build/test/deployment using Docker: 24 | [Video](https://vimeo.com/293626218), 25 | [Slides](https://roscon.ros.org/2018/presentations/ROSCon2018_multistage_docker_for_robot_deployment.pdf). 26 | 27 | This public repository, is designed to consume the output of our private `fetch_drivers` repository and enable 28 | Fetch Research Platform users access to the drivers/firmware faster via the official ros packages. 29 | 30 | To create the output of our private package, we have a special build job which runs inside of a docker container to ensure we don't accidentally 31 | pull in any private dependencies, and also doesn't output any of the additional commercial robot drivers. 32 | 33 | Previously, we built our drivers on a private buildbot, and hosted them on our own packages site. 34 | We also had a manually synced mirror of the ros packages. This allowed us to ensure we tested the versions of dependancies which were on our mirror. 35 | The old process was not as automated as we would like. 36 | 37 | See https://docs.fetchrobotics.com for more information. 38 | -------------------------------------------------------------------------------- /fetch_binary_drivers/fetch-drivers-0.9.3.tar.gz.md5sum: -------------------------------------------------------------------------------- 1 | db21c0730207150ffee11b593272d686 /tmp/output.tar.gz 2 | -------------------------------------------------------------------------------- /fetch_binary_drivers/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | fetch_drivers 4 | 0.9.3 5 | 6 | The public fetch_drivers package is a binary only release. 7 | 8 | fetch_drivers contains both the drivers and firmware for the fetch and freight research robots. 9 | There should be no reason to use these drivers unless you're running on a fetch or a freight research robot. 10 | This package, is a cmake/make only package which installs the binaries for the drivers and firmware. 11 | 12 | 13 | 14 | Carl Saldanha 15 | Eric Relson 16 | Sarah Elliott 17 | Fetch Robotics Open Source Team 18 | 19 | 20 | Proprietary 21 | 22 | 23 | 24 | https://wiki.ros.org/fetch_drivers 25 | https://docs.fetchrobotics.com 26 | https://fetchrobotics.com/robotics-platforms/ 27 | 28 | 29 | 30 | Alexander Moriarty 31 | 32 | 33 | catkin 34 | 35 | 36 | mk 37 | rospack 38 | 39 | 40 | boost 41 | curl 42 | python3 43 | yaml-cpp 44 | 45 | 46 | actionlib_msgs 47 | diagnostic_msgs 48 | fetch_driver_msgs 49 | fetch_auto_dock_msgs 50 | nav_msgs 51 | power_msgs 52 | robot_calibration_msgs 53 | sensor_msgs 54 | 55 | 56 | actionlib 57 | robot_controllers 58 | robot_controllers_interface 59 | rosconsole 60 | roscpp_serialization 61 | roscpp 62 | rostime 63 | urdf 64 | liburdfdom-dev 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /fetch_bringup/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package fetch_bringup 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 0.9.3 (2021-04-25) 6 | ------------------ 7 | 8 | 0.9.2 (2021-03-12) 9 | ------------------ 10 | 11 | 0.9.1 (2021-03-05) 12 | ------------------ 13 | * Changes for Noetic/Py3 (`#61 `_) 14 | 15 | * Remove some ps3 controller references (no longer supported) 16 | * Update state_publisher -> robot_state_publisher 17 | * Changes for compatibility with new drivers: 18 | Drivers primarily load some params from a json file which 19 | end-users shouldn't need to modify. This file will live in 20 | /opt/ros/noetic or the catkin workspace for 99% of usecases. 21 | * Add explicit setting for fetch teleop param. 22 | * Point to a new drivers binary release (0.9.0) 23 | * Respawn tuck_arm node on shutdown [OPEN-48] 24 | 25 | * Add soundplay ROS node as systemd service (`#53 `_) 26 | Functionality existed in 14.04/indigo, and was initially left out. 27 | * Contributors: Eric Relson 28 | 29 | 0.8.8 (2019-08-21) 30 | ------------------ 31 | 32 | 0.8.7 (2019-08-06) 33 | ------------------ 34 | * Move ds4drv dep from package.xml to sys-config deb (`#48 `_) 35 | ROS buildfarm doesn't support pip dependencies. 36 | Also removed outdated sixad line. We don't install sixad at all in 18.04. 37 | * Update launch files to support PS4 teleop w/ds4drv 38 | - Teleop: Change default /joy/dev param to /dev/fetch_joy to match 39 | udev rules 40 | - Add ps4 flag/arg to default fetch.launch and freight.launch 41 | - As workaround to a weird bug, renamed 'joy' node to 'joy_node' 42 | * remove respawn in fetch_bringup/launch/include/teleop.launch.xml (`#44 `_) 43 | We want to enable launching the teleop node and it's components separately, without duplicate nodes continually respawning. 44 | * Merge pull request `#37 `_ from 708yamaguchi/melodic-devel 45 | Add params for selecting teleop part for melodic 46 | * add joystick deadzone parameter (`#42 `_) 47 | * Add argument to select launching teleop (`#40 `_) 48 | - add argument to select launching teleop for Fetch 49 | - add argument to select launching teleop for freight 50 | * add params for selecting teleop part 51 | * Contributors: Andrew Parker, Carl Saldanha, Eric Relson, Naoya Yamaguchi, Shingo Kitagawa 52 | 53 | 0.8.6 (2019-02-28) 54 | ------------------ 55 | 56 | 0.8.5 (2019-02-26) 57 | ------------------ 58 | 59 | 0.8.4 (2019-02-21) 60 | ------------------ 61 | * Add additional convenience packages as deps (`#33 `_) 62 | * Add additional convenience packages as deps 63 | * system config deb pulls in rest of debs 64 | * Fix netplan configuration approach 65 | * Contributors: Eric Relson 66 | 67 | 0.8.3 (2019-02-15) 68 | ------------------ 69 | 70 | 0.8.2 (2019-02-15) 71 | ------------------ 72 | * Merge pull request `#30 `_ from moriarty/rebased-pr-26 73 | [bringup] package format v2 (originally `#26 `_) 74 | * Add ps3joy exec dep; update to package.xml 2.0 75 | Also removed robot_controllers_msgs for fetch_bringup. This dependency 76 | is part of fetch_drivers package already. 77 | * Contributors: Alex Moriarty, Eric Relson 78 | 79 | 0.8.1 (2019-02-15) 80 | ------------------ 81 | 82 | 0.8.0 (2019-02-13) 83 | ------------------ 84 | * Add autodocking to default robot launch (`#28 `_) 85 | Also update package.xml 86 | * sixad depend not needed anymore on bionic (`#24 `_) 87 | * sixad depend not needed anymore on bionic 88 | * remove sixad from fetch_bringup 89 | * [ros param] adds robot/name robot/type (`#22 `_) 90 | add robot specific information on rosparam, see https://github.com/ros-infrastructure/rep/pull/104 91 | Related to: `ros-infrastructure/rep#104 `_ 92 | * Contributors: Eric Relson, Kei Okada, Steffen Fuchs 93 | 94 | 0.7.5 (2017-06-12) 95 | ------------------ 96 | * Add diagnostics aggregator launch and config 97 | * add cartesian twist controller to arm defaults 98 | * Contributors: Eric Relson, Hanjun Song, Michael Ferguson 99 | 100 | 0.7.4 (2017-03-28) 101 | ------------------ 102 | * Updates for research robots 103 | * Contributors: Michael Ferguson 104 | 105 | 0.7.3 (2016-08-26) 106 | ------------------ 107 | * Add install rule for software runstop 108 | * Software runstop support via controller and topics 109 | * Contributors: Eric Relson 110 | 111 | 0.7.2 (2016-06-14) 112 | ------------------ 113 | 114 | 0.7.1 (2016-05-05) 115 | ------------------ 116 | * update to use /dev/ps3joy 117 | * Contributors: Michael Ferguson 118 | 119 | 0.7.0 (2016-03-28) 120 | ------------------ 121 | * fix dependency issue with sixad 122 | * Contributors: Michael Ferguson 123 | 124 | 0.6.1 (2016-03-22) 125 | ------------------ 126 | * require latest sixad 127 | * Add autorepeat_rate parameter to teleop launch 128 | * Contributors: Michael Ferguson, Michael Hwang 129 | 130 | 0.6.0 (2015-06-23) 131 | ------------------ 132 | * start tuck_arm.py as joystick teleop 133 | * disable gripper when resetting controllers 134 | * Contributors: Michael Ferguson 135 | 136 | 0.5.5 (2015-05-21) 137 | ------------------ 138 | * use no_delay parameter with graft 139 | * Contributors: Michael Ferguson 140 | 141 | 0.5.4 (2015-05-10) 142 | ------------------ 143 | * filter shadow points from laser 144 | * reorganize launch files for easier updating of calibrated robots 145 | * Contributors: Michael Ferguson 146 | 147 | 0.5.3 (2015-05-03) 148 | ------------------ 149 | * use new laser safety feature of base controller 150 | * add firmware param for gripper 151 | * Contributors: Michael Ferguson 152 | 153 | 0.5.2 (2015-04-19) 154 | ------------------ 155 | * hold position when stopped 156 | * add default calibration_date 157 | * Contributors: Michael Ferguson 158 | 159 | 0.5.1 (2015-04-09) 160 | ------------------ 161 | * add controller reset script 162 | * gas spring replaces gravity comp 163 | * added debug flag for fetch drivers 164 | * Contributors: Aaron Blasdel, Michael Ferguson 165 | 166 | 0.5.0 (2015-04-04) 167 | ------------------ 168 | 169 | 0.4.2 (2015-03-23) 170 | ------------------ 171 | * add depend on joy 172 | * Contributors: Michael Ferguson 173 | 174 | 0.4.1 (2015-03-23) 175 | ------------------ 176 | 177 | 0.4.0 (2015-03-22) 178 | ------------------ 179 | * update to use fetch_teleop 180 | * Contributors: Michael Ferguson 181 | 182 | 0.3.2 (2015-03-21) 183 | ------------------ 184 | * specify minimum version of laser drivers 185 | * fix graft launch file include 186 | * add head camera calibration 187 | * update laser parameters 188 | * Contributors: Michael Ferguson 189 | 190 | 0.3.1 (2015-03-13 19:53) 191 | ------------------------ 192 | 193 | 0.3.0 (2015-03-13 18:59) 194 | ------------------------ 195 | * first release 196 | * Contributors: Michael Ferguson 197 | -------------------------------------------------------------------------------- /fetch_bringup/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(fetch_bringup) 3 | 4 | find_package(catkin) 5 | catkin_package() 6 | 7 | install( 8 | DIRECTORY config 9 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 10 | ) 11 | 12 | install( 13 | DIRECTORY launch 14 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 15 | ) 16 | 17 | install( 18 | PROGRAMS scripts/controller_reset.py 19 | DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 20 | ) 21 | 22 | install( 23 | PROGRAMS scripts/software_runstop.py 24 | DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 25 | ) 26 | -------------------------------------------------------------------------------- /fetch_bringup/config/analyzers.yaml: -------------------------------------------------------------------------------- 1 | pub_rate: 1.0 2 | base_path: '' # Optional, prepended to all diagnostic output 3 | analyzers: 4 | sound_play: 5 | type: diagnostic_aggregator/GenericAnalyzer 6 | path: SoundPlay 7 | startswith: sound_play 8 | breakers: 9 | type: diagnostic_aggregator/AnalyzerGroup 10 | path: Breakers 11 | analyzers: 12 | base_breaker: 13 | type: diagnostic_aggregator/GenericAnalyzer 14 | path: Base Breaker 15 | startswith: base_breaker 16 | battery_breaker: 17 | type: diagnostic_aggregator/GenericAnalyzer 18 | path: Battery Breaker 19 | startswith: battery_breaker 20 | computer_breaker: 21 | type: diagnostic_aggregator/GenericAnalyzer 22 | path: Computer Breaker 23 | startswith: computer_breaker 24 | supply_breaker: 25 | type: diagnostic_aggregator/GenericAnalyzer 26 | path: Supply Breaker 27 | startswith: supply_breaker 28 | arm_breaker: 29 | type: diagnostic_aggregator/GenericAnalyzer 30 | path: Arm Breaker 31 | startswith: arm_breaker 32 | gripper_breaker: 33 | type: diagnostic_aggregator/GenericAnalyzer 34 | path: Gripper Breaker 35 | startswith: gripper_breaker 36 | motors: 37 | type: diagnostic_aggregator/AnalyzerGroup 38 | path: Motor Control Boards 39 | analyzers: 40 | l_wheel: 41 | type: diagnostic_aggregator/GenericAnalyzer 42 | path: Left Wheel 43 | startswith: l_wheel 44 | r_wheel: 45 | type: diagnostic_aggregator/GenericAnalyzer 46 | path: Right Wheel 47 | startswith: r_wheel 48 | shoulder_pan: 49 | type: diagnostic_aggregator/GenericAnalyzer 50 | path: Shoulder Pan Joint 51 | startswith: shoulder_pan 52 | shoulder_lift: 53 | type: diagnostic_aggregator/GenericAnalyzer 54 | path: Shoulder Lift Joint 55 | startswith: shoulder_lift 56 | upperarm_roll: 57 | type: diagnostic_aggregator/GenericAnalyzer 58 | path: Upperarm Roll Joint 59 | startswith: upperarm_roll 60 | elbow_flex: 61 | type: diagnostic_aggregator/GenericAnalyzer 62 | path: Elbow Flex Joint 63 | startswith: elbow_flex 64 | forearm_roll: 65 | type: diagnostic_aggregator/GenericAnalyzer 66 | path: Forearm Roll Joint 67 | startswith: forearm_roll 68 | wrist_flex: 69 | type: diagnostic_aggregator/GenericAnalyzer 70 | path: Wrist Flex Joint 71 | startswith: wrist_flex 72 | wrist_roll: 73 | type: diagnostic_aggregator/GenericAnalyzer 74 | path: Wrist Roll Joint 75 | startswith: wrist_roll 76 | head_tilt: 77 | type: diagnostic_aggregator/GenericAnalyzer 78 | path: Head Tilt Joint 79 | startswith: head_tilt 80 | head_pan: 81 | type: diagnostic_aggregator/GenericAnalyzer 82 | path: Head Pan Joint 83 | startswith: head_pan 84 | torso_lift: 85 | type: diagnostic_aggregator/GenericAnalyzer 86 | path: Torso Lift Joint 87 | startswith: torso_lift 88 | sensors: 89 | type: diagnostic_aggregator/AnalyzerGroup 90 | path: Sensors 91 | analyzers: 92 | base_breaker: 93 | type: diagnostic_aggregator/GenericAnalyzer 94 | path: Sick TIM551 Laser 95 | startswith: sick_tim 96 | #head_camera: 97 | # type: diagnostic_aggregator/GenericAnalyzer 98 | # path: 99 | # startswith: 100 | peripherals: 101 | type: diagnostic_aggregator/AnalyzerGroup 102 | path: Peripherals 103 | analyzers: 104 | joy: 105 | type: diagnostic_aggregator/GenericAnalyzer 106 | path: PS3 Controller 107 | find_and_remove_prefix: "joy:" 108 | system: 109 | type: diagnostic_aggregator/AnalyzerGroup 110 | path: System 111 | analyzers: 112 | mainboard: 113 | type: diagnostic_aggregator/GenericAnalyzer 114 | path: Mainboard 115 | startswith: Mainboard 116 | charger: 117 | type: diagnostic_aggregator/GenericAnalyzer 118 | path: Charger 119 | startswith: Charger 120 | -------------------------------------------------------------------------------- /fetch_bringup/config/default_controllers.yaml: -------------------------------------------------------------------------------- 1 | arm_controller: 2 | follow_joint_trajectory: 3 | type: "robot_controllers/FollowJointTrajectoryController" 4 | joints: 5 | - shoulder_pan_joint 6 | - shoulder_lift_joint 7 | - upperarm_roll_joint 8 | - elbow_flex_joint 9 | - forearm_roll_joint 10 | - wrist_flex_joint 11 | - wrist_roll_joint 12 | gravity_compensation: 13 | type: "robot_controllers/GravityCompensation" 14 | root: "torso_lift_link" 15 | tip: "gripper_link" 16 | autostart: true 17 | cartesian_twist: 18 | type: "robot_controllers/CartesianTwistController" 19 | root_name: torso_lift_link 20 | tip_name: wrist_roll_link 21 | 22 | arm_with_torso_controller: 23 | follow_joint_trajectory: 24 | type: "robot_controllers/FollowJointTrajectoryController" 25 | joints: 26 | - torso_lift_joint 27 | - shoulder_pan_joint 28 | - shoulder_lift_joint 29 | - upperarm_roll_joint 30 | - elbow_flex_joint 31 | - forearm_roll_joint 32 | - wrist_flex_joint 33 | - wrist_roll_joint 34 | 35 | torso_controller: 36 | follow_joint_trajectory: 37 | type: "robot_controllers/FollowJointTrajectoryController" 38 | joints: 39 | - torso_lift_joint 40 | 41 | head_controller: 42 | point_head: 43 | type: "robot_controllers/PointHeadController" 44 | follow_joint_trajectory: 45 | type: "robot_controllers/FollowJointTrajectoryController" 46 | joints: 47 | - head_pan_joint 48 | - head_tilt_joint 49 | 50 | base_controller: 51 | type: "robot_controllers/DiffDriveBaseController" 52 | max_velocity_x: 1.0 53 | max_acceleration_x: 0.75 54 | # hold position 55 | moving_threshold: -0.01 56 | rotating_threshold: -0.01 57 | # autostart to get odom 58 | autostart: true 59 | # use laser to only slowly collide with things 60 | laser_safety_dist: 1.0 61 | 62 | robot_driver: 63 | default_controllers: 64 | - "arm_controller/follow_joint_trajectory" 65 | - "arm_controller/gravity_compensation" 66 | - "arm_controller/cartesian_twist" 67 | - "arm_with_torso_controller/follow_joint_trajectory" 68 | - "base_controller" 69 | - "head_controller/follow_joint_trajectory" 70 | - "head_controller/point_head" 71 | - "torso_controller/follow_joint_trajectory" 72 | -------------------------------------------------------------------------------- /fetch_bringup/config/fetch_driver_params.json: -------------------------------------------------------------------------------- 1 | { 2 | "calibration_date": "uncalibrated", 3 | "charger_extra_table_age": 0.5, 4 | "csv_logger": { 5 | "csv_logger_period": 10.0, 6 | "log_filename": "/var/log/ros/robot_log.csv" 7 | }, 8 | "default_logger_level": 2, 9 | "has_fetch_arm": true, 10 | "mainboard_ip": "10.42.42.42", 11 | "max_acceptable_table_age": 0.96, 12 | "port": 2067, 13 | "ros_spinner_threads": 1, 14 | "watchdog_period": 0.1 15 | } 16 | -------------------------------------------------------------------------------- /fetch_bringup/config/graft.yaml: -------------------------------------------------------------------------------- 1 | planar_output: True # Output only x, y, and rotation about z 2 | 3 | output_frame: odom # TF frame id, param name ported from robot_pose_ekf 4 | parent_frame_id: odom # TF frame id, override output_frame if set 5 | child_frame_id: base_link #TF frame id 6 | publish_tf: true 7 | 8 | update_rate: 50.0 9 | update_topic: odom 10 | 11 | queue_size: 1 12 | 13 | # Filter parameters 14 | alpha: 0.001 15 | kappa: 0.0 16 | beta: 2.0 17 | 18 | # Process noise covariance 2x2 for velocites, 5x5 for 2d position 19 | process_noise: [1e6, 0, 0, 20 | 0, 1e6, 0, 21 | 0, 0, 1e6] 22 | 23 | # Inputs 24 | topics: { 25 | odom: { 26 | topic: /odom, 27 | type: nav_msgs/Odometry, 28 | absolute_pose: False, 29 | use_velocities: True, 30 | timeout: 1.0, 31 | no_delay: True, 32 | override_twist_covariance: [1e-3, 0, 0, 0, 0, 0, 33 | 0, 1e-3, 0, 0, 0, 0, 34 | 0, 0, 1e-6, 0, 0, 0, 35 | 0, 0, 0, 1e-6, 0, 0, 36 | 0, 0, 0, 0, 1e-6, 0, 37 | 0, 0, 0, 0, 0, 1e-3], 38 | }, 39 | 40 | imu: { 41 | topic: /imu, 42 | type: sensor_msgs/Imu, 43 | absolute_orientation: False, 44 | use_velocities: True, 45 | use_accelerations: False, 46 | timeout: 1.0, 47 | no_delay: True, 48 | override_angular_velocity_covariance: [0, 0, 0, 49 | 0, 0, 0, 50 | 0, 0, 0.000004], 51 | }, 52 | } 53 | -------------------------------------------------------------------------------- /fetch_bringup/launch/fetch.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /fetch_bringup/launch/include/aggregator.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /fetch_bringup/launch/include/graft.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /fetch_bringup/launch/include/head_camera.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /fetch_bringup/launch/include/laser.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /fetch_bringup/launch/include/runstop.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /fetch_bringup/launch/include/teleop.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /fetch_bringup/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | fetch_bringup 4 | 0.9.3 5 | 6 | Bringup for fetch 7 | 8 | 9 | Michael Ferguson 10 | Eric Relson 11 | Fetch Robotics Open Source Team 12 | 13 | Proprietary 14 | 15 | catkin 16 | depth_image_proc 17 | diagnostic_aggregator 18 | fetch_description 19 | fetch_drivers 20 | fetch_moveit_config 21 | fetch_navigation 22 | fetch_open_auto_dock 23 | fetch_teleop 24 | graft 25 | image_proc 26 | joy 27 | openni2_launch 28 | robot_state_publisher 29 | sensor_msgs 30 | sick_tim 31 | sound_play 32 | 33 | 34 | -------------------------------------------------------------------------------- /fetch_bringup/scripts/controller_reset.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2015-2020, Fetch Robotics Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the Fetch Robotics Inc. nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL FETCH ROBOTICS INC. BE LIABLE FOR ANY 22 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | # Author: Michael Ferguson 30 | 31 | import rospy 32 | import actionlib 33 | from control_msgs.msg import GripperCommandAction, GripperCommandGoal 34 | from sensor_msgs.msg import Joy 35 | from robot_controllers_msgs.msg import QueryControllerStatesAction, \ 36 | QueryControllerStatesGoal, \ 37 | ControllerState 38 | 39 | # Listen to joy messages, when button held, reset controllers 40 | class ControllerResetTeleop: 41 | CONTROLLER_ACTION_NAME = "/query_controller_states" 42 | GRIPPER_ACTION_NAME = "/gripper_controller/gripper_action" 43 | 44 | def __init__(self): 45 | rospy.loginfo("Connecting to %s..." % self.CONTROLLER_ACTION_NAME) 46 | self.controller_client = actionlib.SimpleActionClient(self.CONTROLLER_ACTION_NAME, QueryControllerStatesAction) 47 | self.controller_client.wait_for_server() 48 | rospy.loginfo("Done.") 49 | 50 | rospy.loginfo("Connecting to %s..." % self.GRIPPER_ACTION_NAME) 51 | self.gripper_client = actionlib.SimpleActionClient(self.GRIPPER_ACTION_NAME, GripperCommandAction) 52 | 53 | self.start = list() 54 | self.start.append("arm_controller/gravity_compensation") 55 | 56 | self.stop = list() 57 | self.stop.append("arm_controller/follow_joint_trajectory") 58 | self.stop.append("arm_with_torso_controller/follow_joint_trajectory") 59 | self.stop.append("torso_controller/follow_joint_trajectory") 60 | self.stop.append("head_controller/follow_joint_trajectory") 61 | self.stop.append("head_controller/point_head") 62 | 63 | self.reset_button = rospy.get_param("~reset_button", 4) # default button is the up button 64 | 65 | self.pressed = False 66 | self.pressed_last = None 67 | 68 | self.joy_sub = rospy.Subscriber("joy", Joy, self.joy_callback) 69 | 70 | def joy_callback(self, msg): 71 | try: 72 | if msg.buttons[self.reset_button] > 0: 73 | if not self.pressed: 74 | self.pressed_last = rospy.Time.now() 75 | self.pressed = True 76 | elif self.pressed_last and rospy.Time.now() > self.pressed_last + rospy.Duration(1.0): 77 | self.reset() 78 | self.pressed_last = None 79 | else: 80 | self.pressed = False 81 | except KeyError: 82 | rospy.logwarn("reset_button is out of range") 83 | 84 | def reset(self): 85 | # Reset controllers 86 | goal = QueryControllerStatesGoal() 87 | 88 | for controller in self.start: 89 | state = ControllerState() 90 | state.name = controller 91 | state.state = state.RUNNING 92 | goal.updates.append(state) 93 | 94 | for controller in self.stop: 95 | state = ControllerState() 96 | state.name = controller 97 | state.state = state.STOPPED 98 | goal.updates.append(state) 99 | 100 | self.controller_client.send_goal(goal) 101 | 102 | # Disable gripper torque 103 | goal = GripperCommandGoal() 104 | goal.command.max_effort = -1.0 105 | self.gripper_client.send_goal(goal) 106 | 107 | if __name__ == "__main__": 108 | rospy.init_node("controller_reset") 109 | c = ControllerResetTeleop() 110 | rospy.spin() 111 | -------------------------------------------------------------------------------- /fetch_bringup/scripts/software_runstop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2016, Fetch Robotics Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the Fetch Robotics Inc. nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL FETCH ROBOTICS INC. BE LIABLE FOR ANY 22 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | # Author: Eric Relson 30 | 31 | # Script launches a ROS node which can disable breakers. Node can be 32 | # controlled via the /enable_software_runstop topic. 33 | # Script is launched via e.g. teleop.launch.xml (or can be run by itself.) 34 | # 35 | # With the tele option the right two trigger buttons simultaneously pressed 36 | # will cause breakers to be disabled on the robot. 37 | # Software runstop is canceled by toggling the physical runstop (assuming the 38 | # controller buttons have been released). 39 | # 40 | # Note that if script is ended while software runstop is enabled, script 41 | # will need to be run again and controller buttons pressed again before 42 | # physical runstop will disable software runstop, due to breaker states set via 43 | # power_msgs persisting. 44 | 45 | # Standard Library 46 | from argparse import ArgumentParser 47 | 48 | # Third Party 49 | import rospy 50 | from sensor_msgs.msg import Joy 51 | from std_msgs.msg import Bool 52 | 53 | # Fetch 54 | from fetch_driver_msgs.msg import RobotState 55 | from power_msgs.srv import BreakerCommand 56 | 57 | 58 | # Listen to joy messages, when button held, reset controllers 59 | class SoftwareRunstop(object): 60 | """Monitor /Joy and /RobotState to implement a software runstop. 61 | 62 | Parameters 63 | ---------- 64 | arm, base, gripper : bools 65 | If True, corresponding breaker will be disabled by software runstop. 66 | tele : bool 67 | If True, will create a subscriber to /Joy which will monitor for 68 | button presses triggering the software runstop. 69 | 70 | Attributes 71 | ---------- 72 | hw_runstop_has_been_pressed : bool 73 | Records if hardware runstop has been pressed while software runstop 74 | was enabled. Set by update(). 75 | sw_runstop_enabled : bool 76 | If True, then the software runstop is enabled. 77 | Set by update(). 78 | hw_runstop_state : bool 79 | True = hardware runstop is pressed. 80 | Set by /robot_state callback. 81 | enable_breakers : bool 82 | If True, will disable software runstop and re-power breakers. 83 | Set by update() or by callback for /enable_software_runstop. 84 | disable_breakers : bool 85 | If True, will enable software runstop and disable the breakers. 86 | Set by update() based on /Joy and /enable_software_runstop callback 87 | methods. 88 | disable_breakers_tele : bool 89 | Indicates that controller wants breakers to be disabled (i.e. 90 | enable the software runstop). 91 | Requires the --tele option for related subscriber to be created. 92 | Set by joy_callback; disabled by update(). 93 | disable_breakers_ext : bool 94 | Indicates that /enable_software_runstop topic wants the breakers to be 95 | disabled (i.e. enable the software runstop). 96 | Set by /enable_topic_callback; disabled by update(). 97 | desired_breaker_states : dict of bools 98 | Stores the desired breaker state (True = on) for all breakers being 99 | controlled. 100 | """ 101 | def __init__(self, arm, base, gripper, tele): 102 | if not any([arm, base, gripper]): 103 | raise ValueError("SoftwareRunstop invoked without any " 104 | "breakers to be controlled.") 105 | 106 | self._check_robot_components() 107 | 108 | self.desired_breaker_states = {} 109 | if arm and self._has_arm: 110 | self.desired_breaker_states["/arm_breaker"] = True 111 | if base and self._has_base: 112 | self.desired_breaker_states["/base_breaker"] = True 113 | # Gripper requiring arm is same assumption used in drivers 114 | if gripper and self._has_arm: 115 | self.desired_breaker_states["/gripper_breaker"] = True 116 | self.tele = tele 117 | 118 | # Booleans; See class docstring 119 | self.hw_runstop_has_been_pressed = False 120 | self.sw_runstop_enabled = False 121 | self.hw_runstop_state = False 122 | # These two store whether we want to enable/disable breakers 123 | self.enable_breakers = False 124 | self.disable_breakers = False 125 | self.disable_breakers_tele = False 126 | self.disable_breakers_ext = False 127 | 128 | def _check_robot_components(self): 129 | """Check ROS params""" 130 | self._has_arm = rospy.get_param('robot_driver/has_arm', False) 131 | self._has_base = rospy.get_param('robot_driver/has_base', False) 132 | 133 | def setup_and_run(self): 134 | """Connect to topics and start running software runstop""" 135 | # Buttons 136 | self.deadman_button_a = rospy.get_param( 137 | "~deadman_button_a", 11) # default is top right trigger 138 | self.deadman_button_b = rospy.get_param( 139 | "~deadman_button_b", 9) # default is bottom right trigger 140 | 141 | # Subscribers 142 | self.robot_state_sub = rospy.Subscriber( 143 | "/robot_state", RobotState, self.robot_state_callback) 144 | self.enable_sub = rospy.Subscriber( 145 | "/enable_software_runstop", Bool, self.enable_topic_callback) 146 | if self.tele: 147 | self.joy_sub = rospy.Subscriber("/joy", Joy, self.joy_callback) 148 | 149 | # Publisher to topic /software_runstop_enabled 150 | self.pub = rospy.Publisher( 151 | "/software_runstop_enabled", Bool, queue_size=1) 152 | 153 | # Run 154 | self.r = rospy.Rate(10) 155 | self.run_node() 156 | 157 | 158 | def joy_callback(self, msg): 159 | """Callback for Joy messages published by teleop""" 160 | try: 161 | if (msg.buttons[self.deadman_button_a] > 0 and 162 | msg.buttons[self.deadman_button_b] > 0): 163 | self.disable_breakers_tele = True 164 | else: 165 | self.disable_breakers_tele = False 166 | except KeyError: 167 | rospy.logwarn("deadman_button values may be out of range") 168 | 169 | 170 | def enable_topic_callback(self, msg): 171 | """Callback for requests to enable software runstop""" 172 | if msg.data: 173 | self.disable_breakers_ext = True 174 | else: 175 | self.enable_breakers = True 176 | 177 | 178 | def robot_state_callback(self, msg): 179 | """Check hardware runstop status if software runstop is enabled""" 180 | if msg.runstopped: 181 | self.hw_runstop_state = True 182 | else: 183 | self.hw_runstop_state = False 184 | 185 | 186 | def update(self): 187 | """Primary logic for enabling/disabling software runstop 188 | 189 | Logic uses five booleans to track controller and runstop and the 190 | next step to take. In normal operation, everything is False: 191 | 192 | - self.hw_runstop_has_been_pressed 193 | - self.sw_runstop_enabled 194 | - self.hw_runstop_state 195 | - self.enable_breakers 196 | - self.disable_breakers 197 | """ 198 | # Handle external inputs that can disable breakers 199 | if self.disable_breakers_ext or self.disable_breakers_tele: 200 | self.disable_breakers = True 201 | self.disable_breakers_ext = False 202 | self.disable_breakers_tele = False 203 | # Want to disable breakers 204 | for breaker in self.desired_breaker_states: 205 | self.desired_breaker_states[breaker] = False 206 | else: 207 | # Want to enable breakers 208 | for breaker in self.desired_breaker_states: 209 | self.desired_breaker_states[breaker] = True 210 | 211 | # If want to disable breakers and sw runstop not already active 212 | if self.disable_breakers and not self.sw_runstop_enabled: 213 | # Disable the breakers; software runstop is active 214 | if all(self.set_breaker(breaker, val) for breaker, val in 215 | self.desired_breaker_states.items()): 216 | self.disable_breakers = False 217 | self.sw_runstop_enabled = True 218 | # If receive disable signal and software runstop is already active, 219 | elif self.disable_breakers and self.sw_runstop_enabled: 220 | # Clear disable_breakers and also enable_breakers 221 | self.disable_breakers = False 222 | self.enable_breakers = False 223 | # Elif want to enable breakers and software runstop is enabled 224 | # and hw runstop is not currently engaged 225 | elif self.enable_breakers and self.sw_runstop_enabled and \ 226 | not self.hw_runstop_state: 227 | # No longer want software runstop; turn breakers back on 228 | if all(self.set_breaker(breaker, val) for breaker, val in 229 | self.desired_breaker_states.items()): 230 | self.enable_breakers = False 231 | self.sw_runstop_enabled = False 232 | # If software runstopped, and waiting for hw runstop to be toggled 233 | elif self.sw_runstop_enabled: 234 | # If hw runstop is currently pressed 235 | if self.hw_runstop_state: 236 | self.hw_runstop_has_been_pressed = True 237 | # Else if hw runstop is released and was previously pressed since 238 | # software runstop was activated 239 | elif self.hw_runstop_has_been_pressed: 240 | self.enable_breakers = True 241 | self.hw_runstop_has_been_pressed = False 242 | # Else continue waiting for hw runstop action 243 | # Clear enable_breakers if software runstop already disabled 244 | elif not self.sw_runstop_enabled and self.enable_breakers: 245 | self.enable_breakers = False 246 | # Not actively disabling or enabling breaker, or waiting for hw runstop 247 | else: 248 | pass 249 | 250 | 251 | def run_node(self): 252 | """Run update function and publish software runstop state""" 253 | while not rospy.is_shutdown(): 254 | self.update() 255 | self.pub.publish(self.sw_runstop_enabled) 256 | # For debugging if issues arise with an invalid state, etc. 257 | #print("{}\t{}\t{}\t{}\t{}".format(self.enable_breakers, self.disable_breakers, self.sw_runstop_enabled, self.hw_runstop_state, self.hw_runstop_has_been_pressed)) 258 | self.r.sleep() 259 | 260 | 261 | def set_breaker(self, service_name, enable): 262 | """Toggle a breaker via power_msgs service 263 | 264 | Returns 265 | ------- 266 | bool 267 | False if a service call failed. Otherwise True. 268 | """ 269 | rospy.loginfo("Software runstop waiting for %s service...", service_name) 270 | rospy.wait_for_service(service_name) 271 | try: 272 | breaker = rospy.ServiceProxy(service_name, BreakerCommand) 273 | resp = breaker(enable) 274 | rospy.loginfo("Server sent response : \n" + str(resp)) 275 | except rospy.ServiceException as e: 276 | rospy.logerr("Service call failed: %s" % e) 277 | return False 278 | return True 279 | 280 | 281 | if __name__ == "__main__": 282 | parser = ArgumentParser() 283 | parser.add_argument("-a", "--arm", action="store_true", 284 | help="Software runstop will disable arm breaker.") 285 | parser.add_argument("-b", "--base", action="store_true", 286 | help="Software runstop will disable base breaker.") 287 | parser.add_argument("-g", "--gripper", action="store_true", 288 | help="Software runstop will disable gripper breaker.") 289 | parser.add_argument("-t", "--tele", action="store_true", help="Allow " 290 | "controller to trigger software runstop.") 291 | 292 | args, unknown = parser.parse_known_args() 293 | 294 | rospy.init_node("software_runstop") 295 | c = SoftwareRunstop(args.arm, args.base, args.gripper, args.tele) 296 | c.setup_and_run() 297 | 298 | rospy.spin() 299 | -------------------------------------------------------------------------------- /fetch_bringup/scripts/test/test_software_runstop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Copyright (c) 2016, Fetch Robotics Inc. 4 | # All rights reserved. 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the Fetch Robotics Inc. nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL FETCH ROBOTICS INC. BE LIABLE FOR ANY 22 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | # Author: Eric Relson 30 | 31 | # Primarily unit tests logic of the update function. Run tests with nosetests 32 | # from the scripts/ directory. 33 | 34 | # Standard Library 35 | import unittest 36 | 37 | # Fetch 38 | from software_runstop import SoftwareRunstop 39 | 40 | 41 | def stub_set_breaker(*args): 42 | # For current tests, assume breaker was set successfully 43 | return True 44 | # Use stub to replace set_breaker() 45 | SoftwareRunstop.set_breaker = stub_set_breaker 46 | 47 | def stub_check_robot_components(self): 48 | # Current tests of init don't test robot components configuration 49 | self._has_arm = True 50 | self._has_base = True 51 | # Use stub to replace _check_robot_components() 52 | SoftwareRunstop._check_robot_components = stub_check_robot_components 53 | 54 | 55 | class TestInit(unittest.TestCase): 56 | 57 | def test_no_breakers(self): 58 | self.assertRaises(ValueError, SoftwareRunstop, 59 | False, False, False, True) 60 | 61 | def test_arg_arm(self): 62 | c = SoftwareRunstop(True, False, False, False) 63 | self.assertEqual(c.desired_breaker_states, 64 | {"/arm_breaker": True}) 65 | 66 | def test_arg_base(self): 67 | c = SoftwareRunstop(False, True, False, False) 68 | self.assertEqual(c.desired_breaker_states, 69 | {"/base_breaker": True}) 70 | 71 | def test_arg_gripper(self): 72 | c = SoftwareRunstop(False, False, True, False) 73 | self.assertEqual(c.desired_breaker_states, 74 | {"/gripper_breaker": True}) 75 | 76 | 77 | class TestUpdate(unittest.TestCase): 78 | 79 | def setUp(self): 80 | self.c = SoftwareRunstop(True, True, True, True) 81 | 82 | def assert_default_state(self): 83 | self.assertFalse(self.c.hw_runstop_has_been_pressed) 84 | self.assertFalse(self.c.hw_runstop_state) 85 | self.assertFalse(self.c.sw_runstop_enabled) 86 | self.assertFalse(self.c.enable_breakers) 87 | self.assertFalse(self.c.disable_breakers) 88 | self.assertFalse(self.c.disable_breakers_tele) 89 | self.assertFalse(self.c.disable_breakers_ext) 90 | 91 | def test_all_params_false(self): 92 | # Make sure params used in TestUpdate are initially False as expected 93 | self.assert_default_state() 94 | 95 | def test_tele_pressed_released_pressed(self): 96 | # Receive disable request, process and 97 | self.c.disable_breakers_tele = True 98 | self.c.update() 99 | self.assertFalse(self.c.disable_breakers) 100 | self.assertTrue(self.c.sw_runstop_enabled) 101 | # Next pass: no new disable signal from tele, expect no change 102 | self.c.update() 103 | self.assertFalse(self.c.disable_breakers) 104 | self.assertTrue(self.c.sw_runstop_enabled) 105 | # Next pass: button pressed again, but still no change 106 | self.c.disable_breakers_tele = True 107 | self.c.update() 108 | self.assertFalse(self.c.disable_breakers) 109 | self.assertTrue(self.c.sw_runstop_enabled) 110 | 111 | def test_disable_breaker_topic_received(self): 112 | # Receive disable request, process and 113 | self.c.disable_breakers_ext = True 114 | self.c.update() 115 | self.assertFalse(self.c.disable_breakers) 116 | self.assertTrue(self.c.sw_runstop_enabled) 117 | # Next pass: no new disable signal from tele, expect no change 118 | self.c.update() 119 | self.assertFalse(self.c.disable_breakers) 120 | self.assertTrue(self.c.sw_runstop_enabled) 121 | # Next pass: button pressed again, but still no change 122 | self.c.disable_breakers_tele = True 123 | self.c.update() 124 | self.assertFalse(self.c.disable_breakers) 125 | self.assertTrue(self.c.sw_runstop_enabled) 126 | 127 | def test_sw_runstop_released_by_hw_runstop(self): 128 | self.c.sw_runstop_enabled = True 129 | # Hardware runstop gets pressed 130 | self.c.hw_runstop_state = True 131 | self.c.update() 132 | self.assertTrue(self.c.hw_runstop_has_been_pressed) 133 | self.assertTrue(self.c.hw_runstop_state) 134 | self.assertTrue(self.c.sw_runstop_enabled) 135 | # and then released. Takes two updates before breakers re-enabled 136 | self.c.hw_runstop_state = False 137 | self.c.update() 138 | self.assertFalse(self.c.hw_runstop_has_been_pressed) 139 | self.assertFalse(self.c.hw_runstop_state) 140 | self.assertTrue(self.c.sw_runstop_enabled) 141 | self.assertTrue(self.c.enable_breakers) 142 | # The second update will enable breakers 143 | self.c.update() 144 | self.assert_default_state() 145 | 146 | def test_default_state_hw_runstop_no_effect(self): 147 | self.c.hw_runstop_state = True 148 | self.c.update() 149 | self.assertTrue(self.c.hw_runstop_state) 150 | self.assertFalse(self.c.hw_runstop_has_been_pressed) 151 | self.assertFalse(self.c.sw_runstop_enabled) 152 | self.assertFalse(self.c.enable_breakers) 153 | self.assertFalse(self.c.disable_breakers) 154 | 155 | def test_activate_sw_runstop_when_hw_runstopped(self): 156 | # We allow the sw runstop to be enabled while hardware runstop 157 | # This allows user to holde sw runstop button(s) on controller 158 | # while releasing the hw runstop, and then enable the breakers 159 | # after e.g. moving away from robot. 160 | self.c.hw_runstop_state = True 161 | self.c.disable_breakers = True 162 | self.c.update() 163 | self.assertTrue(self.c.hw_runstop_state) 164 | self.assertTrue(self.c.sw_runstop_enabled) 165 | self.assertFalse(self.c.hw_runstop_has_been_pressed) 166 | self.assertFalse(self.c.disable_breakers) 167 | # next update will count the hw runstop as having been pressed 168 | self.c.update() 169 | self.assertTrue(self.c.hw_runstop_state) 170 | self.assertTrue(self.c.hw_runstop_has_been_pressed) 171 | self.assertTrue(self.c.sw_runstop_enabled) 172 | 173 | def test_enable_breakers_works(self): 174 | # This test is currently redundant 175 | self.c.sw_runstop_enabled = True 176 | self.c.enable_breakers = True # set e.g. by enable_topic_callback 177 | # Go back to default state after software runstop is no longer active 178 | self.c.update() 179 | self.assert_default_state() 180 | 181 | -------------------------------------------------------------------------------- /fetch_system_config/README.md: -------------------------------------------------------------------------------- 1 | # Fetch System Config 2 | 3 | This is the Git Build Package (GBP) folder the OS-level config package 4 | for research versions of Fetch/Freight. 5 | 6 | The latest tested fetch and freight system config debians are available from: 7 | 8 | - http://packages.fetchrobotics.com/binaries/fetch-noetic-config.deb 9 | - http://packages.fetchrobotics.com/binaries/freight-noetic-config.deb 10 | 11 | However, for best results in upgrading, please follow 12 | http://docs.fetchrobotics.com/care_and_feeding.html#updating-your-robot 13 | 14 | # How the .debs are generated (but please use the .debs above) 15 | 16 | ```bash 17 | git clone git@github.com:fetchrobotics/fetch_robots.git -b ros1 18 | cd fetch_robots/fetch_system_config 19 | # If preparing for a new release, update changelog 20 | dch 21 | # Bump version 22 | dch --release 23 | # Commit changelog 24 | # Build the debian (which we upload to packages.fetchrobotics.com, per above) 25 | dpkg-buildpackage -us -uc 26 | # Debians are placed in the parent directory 27 | cd .. 28 | ls *system*.deb 29 | ``` 30 | 31 | # TODO: catkin/standardize 32 | 33 | In the future we might opt to not have this package downloaded from 34 | packages.fetchrobotics.com and instead have it published to: 35 | 36 | https://github.com/fetchrobotics-gbp/fetch_robots-release 37 | -------------------------------------------------------------------------------- /fetch_system_config/debian/changelog: -------------------------------------------------------------------------------- 1 | fetch-system-config (0.3-0ubuntu5) focal; urgency=medium 2 | 3 | * Fix pip3 installation 4 | 5 | -- Eric Relson Thu, 24 Mar 2022 09:39:00 -0700 6 | 7 | fetch-system-config (0.3-0ubuntu4) focal; urgency=medium 8 | 9 | * Fix ps4joy service installation 10 | 11 | -- Eric Relson Wed, 01 Dec 2021 14:54:09 -0800 12 | 13 | fetch-system-config (0.3-0ubuntu3) focal; urgency=medium 14 | 15 | * Fix freight-noetic-config postinstall bug 16 | * Quieter postinstall script output 17 | 18 | -- Eric Relson Fri, 19 Nov 2021 11:11:01 -0800 19 | 20 | fetch-system-config (0.3-0ubuntu2) focal; urgency=medium 21 | 22 | * Set PS4 service enabled by default; remove ps3joy service 23 | * Cleanup systemd logging approach thanks to newer systemd version in 20.04 24 | 25 | -- Eric Relson Sun, 25 Apr 2021 21:40:20 -0700 26 | 27 | fetch-system-config (0.3-0ubuntu1) focal; urgency=medium 28 | 29 | * Tweaks for Ubuntu 20.04 and ROS Noetic 30 | * Removes PS3 controller support 31 | 32 | -- Eric Relson Wed, 24 Mar 2021 21:07:09 -0700 33 | 34 | fetch-system-config (0.2-0ubuntu2) trusty; urgency=medium 35 | 36 | * Add soundplay node systemd service for Fetch and Freight 37 | 38 | -- Eric Relson Thu, 29 Aug 2019 17:52:35 -0700 39 | 40 | fetch-system-config (0.2-0ubuntu1) bionic; urgency=medium 41 | 42 | * Add PS4 support via ds4drv (via pip installation) 43 | * Fix PS3 controller udev rule so that /dev/ps3joy is generated 44 | * Modify logging by systemd services, due to limitations of v237 45 | * Remove ethernet gateway specification 46 | * Custom grub settings no long directly added to /etc/default/grub 47 | * Modify grub to bypass Plymouth splash screen 48 | * Set power button behavior so that computer shuts down properly 49 | 50 | -- Eric Relson Fri, 26 Jul 2019 09:25:50 -0700 51 | 52 | fetch-system-config (0.1-0) bionic; urgency=medium 53 | 54 | * initial release of melodic packages 55 | 56 | -- Eric Relson Fri, 01 Feb 2019 10:50:25 -0800 57 | -------------------------------------------------------------------------------- /fetch_system_config/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /fetch_system_config/debian/control: -------------------------------------------------------------------------------- 1 | Source: fetch-system-config 2 | Section: main 3 | Priority: optional 4 | Maintainer: Eric Relson 5 | Build-Depends: debhelper (>= 9.0.0), 6 | dh-systemd (>= 1.5) 7 | Standards-Version: 3.9.4 8 | Homepage: https://docs.fetchrobotics.com 9 | 10 | Package: fetch-noetic-config 11 | Architecture: any 12 | Depends: ${misc:Depends}, 13 | adduser, 14 | chrony, 15 | openssh-server, 16 | ros-noetic-fetch-bringup, 17 | ros-noetic-ros 18 | Description: Configuration for Fetch on Noetic 19 | This package will start ROS Noetic at bootup 20 | Conflicts: fetch-system-config, 21 | freight-noetic-config, 22 | freight-system-config 23 | 24 | Package: freight-noetic-config 25 | Architecture: any 26 | Depends: ${misc:Depends}, 27 | adduser, 28 | chrony, 29 | openssh-server, 30 | ros-noetic-freight-bringup, 31 | ros-noetic-ros 32 | Description: Configuration for Freight on Noetic 33 | This package will start ROS Noetic at bootup 34 | Conflicts: fetch-noetic-config, 35 | fetch-system-config, 36 | freight-system-config 37 | -------------------------------------------------------------------------------- /fetch_system_config/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | 3 | Files: * 4 | Copyright: 2015-2021 Fetch Robotics Inc 5 | 2013 I Heart Engineering 6 | License: BSD-3-clause 7 | Copyright (c) 2015-2021, Fetch Robotics Inc. 8 | Copyright (c) 2013, I Heart Engineering 9 | All rights reserved. 10 | . 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted provided that the following conditions 13 | are met: 14 | . 15 | * Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | * Redistributions in binary form must reproduce the above 18 | copyright notice, this list of conditions and the following 19 | disclaimer in the documentation and/or other materials provided 20 | with the distribution. 21 | * Neither the name of the I Heart Engineering nor the names of its 22 | contributors may be used to endorse or promote products derived 23 | from this software without specific prior written permission. 24 | . 25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 28 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 29 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 30 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 31 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 32 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 33 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | POSSIBILITY OF SUCH DAMAGE. 37 | -------------------------------------------------------------------------------- /fetch_system_config/debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.install: -------------------------------------------------------------------------------- 1 | root/* . -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.postinst: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | set -e 4 | 5 | case "$1" in 6 | "configure") 7 | # Add ROS user, give access to audio/hardware 8 | if ! getent passwd ros >/dev/null; then 9 | adduser --disabled-password --quiet --system \ 10 | --no-create-home --home=/var/lib/ros --shell /bin/bash \ 11 | --gecos "ROS system user" --group ros 12 | fi 13 | adduser --quiet ros audio 14 | adduser --quiet ros dialout 15 | adduser --quiet ros plugdev 16 | if ! getent group ros > /dev/null 2>&1; then 17 | addgroup --system ros --quiet 18 | fi 19 | if [ "$(id -gn ros)" = "nogroup" ]; then 20 | usermod -g ros ros 21 | fi 22 | 23 | # Setup /var/lib/ros as home directory 24 | if [ ! -e "/var/lib/ros" ]; then 25 | mkdir /var/lib/ros 26 | fi 27 | chown -R ros:ros /var/lib/ros 28 | chmod 2775 /var/lib/ros 29 | 30 | # Setup /var/log/ros for logging 31 | if [ ! -e "/var/log/ros" ]; then 32 | mkdir /var/log/ros 33 | fi 34 | touch /var/log/ros/robot.log # Otherwise systemd will make this file root:ros 35 | # with 755 instead of ros:ros with 775 36 | chown -R ros:ros /var/log/ros 37 | chmod 2775 /var/log/ros 38 | 39 | # Copy the robot.launch if not already existent 40 | if [ ! -e "/etc/ros/noetic/robot.launch" ]; then 41 | mkdir -p /etc/ros/noetic 42 | cp /opt/ros/noetic/share/fetch_bringup/launch/fetch.launch /etc/ros/noetic/robot.launch 43 | fi 44 | 45 | # Workaround for gnome-settings-daemon not enabling immediate shutdown 46 | # https://unix.stackexchange.com/a/416569 47 | hostnamectl set-chassis vm 48 | 49 | # Apply the combination of /etc/default/grub and /etc/default/grub.d/50-fetch.cfg 50 | update-grub 51 | 52 | # Disable apport 53 | if [ -e "/etc/default/apport" ]; then 54 | sed -i "s/enabled=1/enabled=0/g" /etc/default/apport 55 | fi 56 | 57 | # Run logrotation cron job hourly 58 | if [ ! -e "/etc/cron.hourly/logrotate" ]; then 59 | cp /etc/cron.daily/logrotate /etc/cron.hourly/logrotate 60 | fi 61 | 62 | # For PS4 controller support, install ds4drv with pip, presuming that pip is installed already 63 | /usr/bin/pip3 install ds4drv 64 | 65 | ### Set up ethernet to ensure static network for internal robot communications. 66 | # Reboot required for changes to take effect. 67 | # Determine which device to map to eth0 and eth1 and update /etc/udev/rules.d/70-persistent-net.rules 68 | declare -a x=() 69 | lines=$(udevadm info -e | grep -e "ID_NET_NAME_MAC=e.*[a-f0-9]\{12\}$") 70 | regexmac="ID_NET_NAME_MAC=e.*([a-f0-9]{12})$" 71 | for f in $lines 72 | do 73 | if [[ $f =~ $regexmac ]]; then 74 | macs+="$(echo ${BASH_REMATCH[1]} | sed -r 's/.{2}/&:/g' | sed -r 's/://g6') " 75 | fi 76 | done 77 | 78 | # Make a backup, then remove any existing entries for eth0, eth1 from udev rules 79 | if [[ -f /etc/udev/rules.d/70-persistent-net.rules ]]; then 80 | if [[ ! -f /etc/udev/rules.d/70-persistent-net.rules.bak ]]; then 81 | cp -n /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.bak 82 | fi 83 | cp -f /etc/udev/rules.d/70-persistent-net.rules /tmp/70-persistent-net.rules 84 | grep -v -E "eth0|eth1" /tmp/70-persistent-net.rules > /etc/udev/rules.d/70-persistent-net.rules | true 85 | fi 86 | 87 | # Add our new udev rules for eth0, eth1 88 | mac_array=($macs) 89 | udev_line='SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC_ADDRESS", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME=' 90 | if [[ ${mac_array[0]} > ${mac_array[1]} ]]; then 91 | echo ${udev_line/MAC_ADDRESS/${mac_array[0]}}'"eth0"' >> /etc/udev/rules.d/70-persistent-net.rules 92 | echo ${udev_line/MAC_ADDRESS/${mac_array[1]}}'"eth1"' >> /etc/udev/rules.d/70-persistent-net.rules 93 | else 94 | echo ${udev_line/MAC_ADDRESS/${mac_array[1]}}'"eth0"' >> /etc/udev/rules.d/70-persistent-net.rules 95 | echo ${udev_line/MAC_ADDRESS/${mac_array[0]}}'"eth1"' >> /etc/udev/rules.d/70-persistent-net.rules 96 | fi 97 | 98 | # Add netplan to set static ethernet IPs; don't clobber existing modifications 99 | cp -n /etc/netplan/99-fetch-ethernet.yaml.default /etc/netplan/99-fetch-ethernet.yaml 100 | 101 | # With 18.04+, we have a grub config to not use new-style network-device naming. With 20.04 we 102 | # need to remove the interface specifications in the wifi network connection info. Otherwise, 103 | # after reboot, when the wifi device has a different name, the computer will fail to get online. 104 | if ls /etc/NetworkManager/system-connections/* &> /dev/null; then 105 | sed -i '/^interface-name/d' /etc/NetworkManager/system-connections/* 106 | fi 107 | 108 | # Setup chrony to allow time jumps on start 109 | if [ ! `grep makestep /etc/chrony/chrony.conf >/dev/null && echo $?` ]; then 110 | echo ' 111 | # This lets the time jump at startup 112 | makestep 1.0 100' >> /etc/chrony/chrony.conf 113 | fi 114 | 115 | # Disable wifi power management in 18.04 116 | # https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55 117 | sed -i "s/wifi.powersave = 3/wifi.powersave = 2/" /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf 118 | 119 | ;; 120 | 121 | abort-upgrade|abort-remove|abort-deconfigure) 122 | ;; 123 | 124 | *) 125 | echo "postinst called with unknown argument \`$1'" >&2 126 | exit 1 127 | ;; 128 | esac 129 | 130 | #DEBHELPER# 131 | 132 | exit 0 133 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.ps4joy.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Job that launches the ds4drv PS4 driver 3 | Requires=bluetooth.service 4 | After=bluetooth.service 5 | 6 | [Install] 7 | WantedBy=bluetooth.target 8 | 9 | [Service] 10 | Restart=on-abort 11 | ExecStart=/usr/bin/bash -c "ds4drv --hidraw" 12 | 13 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.robot.logrotate: -------------------------------------------------------------------------------- 1 | /var/log/ros/robot.log { 2 | su ros ros 3 | maxsize=50M 4 | rotate 7 5 | missingok 6 | delaycompress 7 | copytruncate 8 | } 9 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.robot.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Job that launches the robot drivers once roscore has started 3 | After=roscore.service 4 | BindsTo=roscore.service 5 | 6 | [Install] 7 | WantedBy=roscore.service 8 | 9 | [Service] 10 | Environment="ROS_LOG_DIR=/var/log/ros" 11 | Restart=on-failure 12 | StandardOutput=append:/var/log/ros/robot.log 13 | StandardError=append:/var/log/ros/robot.log 14 | 15 | User=ros 16 | ExecStart=/usr/bin/bash -c ". /opt/ros/noetic/setup.bash && roslaunch /etc/ros/noetic/robot.launch --wait" 17 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.ros.logrotate: -------------------------------------------------------------------------------- 1 | compress 2 | 3 | /var/log/ros/*/*.log { 4 | # Run scripts once per set of logs 5 | sharedscripts 6 | firstaction 7 | . /opt/ros/noetic/setup.sh 8 | # get run_id of ROS if it is running 9 | RUN_ID=`rosparam get /run_id 2>/dev/null` 10 | # Create a tarball if ROS is no longer using a given log subdirectory 11 | for i in $( ls /var/log/ros | grep -v \.gz$ ); do 12 | if [ $i != "$RUN_ID" ] && [ -d $i ]; then 13 | cd /var/log/ros && tar -zpcf $i.tar.gz $i 14 | fi 15 | done 16 | endscript 17 | postrotate 18 | . /opt/ros/noetic/setup.sh 19 | RUN_ID=`rosparam get /run_id 2>/dev/null` 20 | # Remove log subdirectory after tarball has been created 21 | for i in $( ls /var/log/ros | grep -v \.gz$ ); do 22 | if [ $i != "$RUN_ID" ] && [ -e /var/log/ros/$i.tar.gz ]; then 23 | rm -r /var/log/ros/$i 24 | fi 25 | done 26 | # Delete tarballs after a week 27 | for i in $( find /var/log/ros -mtime 7 | grep \.gz$ ); do 28 | rm $i 29 | done 30 | endscript 31 | # Do not report errors if ROS has not created logs 32 | missingok 33 | # Rotate logs daily 34 | daily 35 | # Keep 1 weeks worth of logs for active processes 36 | rotate 6 37 | # ROS continues to write to the old log 38 | # 01 Jan 2013 - BUG: Sending SIGHUP to the ROS does not cause it to write to a new log. 39 | copytruncate 40 | # Compress old logs 41 | delaycompress 42 | } 43 | 44 | /var/log/ros/robot_log.csv { 45 | maxsize 100M 46 | weekly 47 | rotate 8 48 | missingok 49 | compress 50 | } 51 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.roscore.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Job that launches roscore once the system has started 3 | After=multi-user.target 4 | 5 | [Install] 6 | WantedBy=multi-user.target 7 | 8 | [Service] 9 | Environment="ROS_LOG_DIR=/var/log/ros" 10 | Restart=on-failure 11 | 12 | ExecStartPre=/usr/bin/bash /opt/ros/roscore_prestart.bash 13 | ExecStartPost=/usr/bin/bash /opt/ros/roscore_poststart.bash 14 | User=ros 15 | ExecStart=/usr/bin/bash -c ". /opt/ros/noetic/setup.bash && roscore" 16 | 17 | -------------------------------------------------------------------------------- /fetch_system_config/debian/fetch-noetic-config.soundplay.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Job that launches the soundplay node once roscore has started 3 | After=roscore.service 4 | BindsTo=roscore.service 5 | 6 | [Install] 7 | WantedBy=roscore.service 8 | 9 | [Service] 10 | Environment="ROS_LOG_DIR=/var/log/ros" 11 | Restart=on-failure 12 | 13 | User=ros 14 | ExecStart=/usr/bin/bash -c ". /opt/ros/noetic/setup.bash && rosrun sound_play soundplay_node.py" 15 | 16 | -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.install: -------------------------------------------------------------------------------- 1 | root/* . -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | case "$1" in 6 | "configure") 7 | # Add ROS user, give access to audio/hardware 8 | if ! getent passwd ros >/dev/null; then 9 | adduser --disabled-password --quiet --system \ 10 | --no-create-home --home=/var/lib/ros --shell /bin/bash \ 11 | --gecos "ROS system user" --group ros 12 | fi 13 | adduser --quiet ros audio 14 | adduser --quiet ros dialout 15 | adduser --quiet ros plugdev 16 | if ! getent group ros > /dev/null 2>&1; then 17 | addgroup --system ros --quiet 18 | fi 19 | if [ "$(id -gn ros)" = "nogroup" ]; then 20 | usermod -g ros ros 21 | fi 22 | 23 | # Setup /var/lib/ros as home directory 24 | if [ ! -e "/var/lib/ros" ]; then 25 | mkdir /var/lib/ros 26 | fi 27 | chown -R ros:ros /var/lib/ros 28 | chmod 2775 /var/lib/ros 29 | 30 | # Setup /var/log/ros for logging 31 | if [ ! -e "/var/log/ros" ]; then 32 | mkdir /var/log/ros 33 | fi 34 | touch /var/log/ros/robot.log # Otherwise systemd will make this file root:ros 35 | # with 755 instead of ros:ros with 775 36 | chown -R ros:ros /var/log/ros 37 | chmod 2775 /var/log/ros 38 | 39 | # Copy the robot.launch if not already existent 40 | if [ ! -e "/etc/ros/noetic/robot.launch" ]; then 41 | mkdir -p /etc/ros/noetic 42 | cp /opt/ros/noetic/share/freight_bringup/launch/freight.launch /etc/ros/noetic/robot.launch 43 | fi 44 | 45 | # Workaround for gnome-settings-daemon not enabling immediate shutdown 46 | # https://unix.stackexchange.com/a/416569 47 | hostnamectl set-chassis vm 48 | 49 | # Apply the combination of /etc/default/grub and /etc/default/grub.d/50-fetch.cfg 50 | update-grub 51 | 52 | # Disable apport 53 | if [ -e "/etc/default/apport" ]; then 54 | sed -i "s/enabled=1/enabled=0/g" /etc/default/apport 55 | fi 56 | 57 | # Run logrotation cron job hourly 58 | if [ ! -e "/etc/cron.hourly/logrotate" ]; then 59 | cp /etc/cron.daily/logrotate /etc/cron.hourly/logrotate 60 | fi 61 | 62 | # For PS4 controller support, install ds4drv with pip, presuming that pip is installed already 63 | /usr/local/bin/pip install ds4drv 64 | 65 | ### Set up ethernet to ensure static network for internal robot communications. 66 | # Reboot required for changes to take effect. 67 | # Determine which device to map to eth0 and eth1 and update /etc/udev/rules.d/70-persistent-net.rules 68 | declare -a x=() 69 | lines=$(udevadm info -e | grep -e "ID_NET_NAME_MAC=e.*[a-f0-9]\{12\}$") 70 | regexmac="ID_NET_NAME_MAC=e.*([a-f0-9]{12})$" 71 | for f in $lines 72 | do 73 | if [[ $f =~ $regexmac ]]; then 74 | macs+="$(echo ${BASH_REMATCH[1]} | sed -r 's/.{2}/&:/g' | sed -r 's/://g6') " 75 | fi 76 | done 77 | 78 | # Make a backup, then remove any existing entries for eth0, eth1 from udev rules 79 | if [[ -f /etc/udev/rules.d/70-persistent-net.rules ]]; then 80 | if [[ ! -f /etc/udev/rules.d/70-persistent-net.rules.bak ]]; then 81 | cp -n /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.bak 82 | fi 83 | cp -f /etc/udev/rules.d/70-persistent-net.rules /tmp/70-persistent-net.rules 84 | grep -v -E "eth0|eth1" /tmp/70-persistent-net.rules > /etc/udev/rules.d/70-persistent-net.rules | true 85 | fi 86 | 87 | # Add our new udev rules for eth0, eth1 88 | mac_array=($macs) 89 | udev_line='SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC_ADDRESS", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME=' 90 | if [[ ${mac_array[0]} > ${mac_array[1]} ]]; then 91 | echo ${udev_line/MAC_ADDRESS/${mac_array[0]}}'"eth0"' >> /etc/udev/rules.d/70-persistent-net.rules 92 | echo ${udev_line/MAC_ADDRESS/${mac_array[1]}}'"eth1"' >> /etc/udev/rules.d/70-persistent-net.rules 93 | else 94 | echo ${udev_line/MAC_ADDRESS/${mac_array[1]}}'"eth0"' >> /etc/udev/rules.d/70-persistent-net.rules 95 | echo ${udev_line/MAC_ADDRESS/${mac_array[0]}}'"eth1"' >> /etc/udev/rules.d/70-persistent-net.rules 96 | fi 97 | 98 | # Add netplan to set static ethernet IPs; don't clobber existing modifications 99 | cp -n /etc/netplan/99-fetch-ethernet.yaml.default /etc/netplan/99-fetch-ethernet.yaml 100 | 101 | # With 18.04+, we have a grub config to not use new-style network-device naming. With 20.04 we 102 | # need to remove the interface specifications in the wifi network connection info. Otherwise, 103 | # after reboot, when the wifi device has a different name, the computer will fail to get online. 104 | if ls /etc/NetworkManager/system-connections/* &> /dev/null; then 105 | sed -i '/^interface-name/d' /etc/NetworkManager/system-connections/* 106 | fi 107 | 108 | # Setup chrony to allow time jumps on start 109 | if [ ! `grep makestep /etc/chrony/chrony.conf >/dev/null && echo $?` ]; then 110 | echo ' 111 | # This lets the time jump at startup 112 | makestep 1.0 100' >> /etc/chrony/chrony.conf 113 | fi 114 | 115 | # Disable wifi power management in 18.04 116 | # https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55 117 | sed -i "s/wifi.powersave = 3/wifi.powersave = 2/" /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf 118 | 119 | ;; 120 | 121 | abort-upgrade|abort-remove|abort-deconfigure) 122 | ;; 123 | 124 | *) 125 | echo "postinst called with unknown argument \`$1'" >&2 126 | exit 1 127 | ;; 128 | esac 129 | 130 | #DEBHELPER# 131 | 132 | exit 0 133 | -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.ps3joy.service: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.ps3joy.service -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.ps4joy.service: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.ps4joy.service -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.robot.logrotate: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.robot.logrotate -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.robot.service: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.robot.service -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.ros.logrotate: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.ros.logrotate -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.roscore.service: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.roscore.service -------------------------------------------------------------------------------- /fetch_system_config/debian/freight-noetic-config.soundplay.service: -------------------------------------------------------------------------------- 1 | fetch-noetic-config.soundplay.service -------------------------------------------------------------------------------- /fetch_system_config/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | # Grab the following .service files 5 | override_dh_systemd_enable: 6 | dh_systemd_enable --name=roscore 7 | dh_systemd_enable --name=robot 8 | dh_systemd_enable --name=soundplay 9 | dh_systemd_enable --name=ps4joy 10 | 11 | override_dh_installlogrotate: 12 | dh_installlogrotate --name=ros 13 | dh_installlogrotate --name=robot 14 | 15 | %: 16 | dh $@ --with=systemd 17 | -------------------------------------------------------------------------------- /fetch_system_config/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /fetch_system_config/debian/triggers: -------------------------------------------------------------------------------- 1 | interest /var/lib/ros 2 | -------------------------------------------------------------------------------- /fetch_system_config/root/etc/acpi/events/powerbtn: -------------------------------------------------------------------------------- 1 | # /etc/acpi/events/powerbtn 2 | # This is called when the user presses the power button and calls 3 | # /etc/acpi/powerbtn.sh for further processing. 4 | 5 | # Optionally you can specify the placeholder %e. It will pass 6 | # through the whole kernel event message to the program you've 7 | # specified. 8 | 9 | # We need to react on "button power.*" and "button/power.*" because 10 | # of kernel changes. 11 | 12 | event=button[ /]power 13 | action=/etc/acpi/powerbtn.sh 14 | -------------------------------------------------------------------------------- /fetch_system_config/root/etc/acpi/powerbtn.sh: -------------------------------------------------------------------------------- 1 | # Just initiate a plain shutdown. 2 | /usr/sbin/shutdown -h now "Power button pressed or power-button signal received from mainboard...\n...shutting down now!" 3 | -------------------------------------------------------------------------------- /fetch_system_config/root/etc/asound.conf: -------------------------------------------------------------------------------- 1 | defaults.pcm.card 1 2 | defaults.pcm.device 0 3 | -------------------------------------------------------------------------------- /fetch_system_config/root/etc/default/grub.d/50-fetch.cfg: -------------------------------------------------------------------------------- 1 | # These will override/add to entries in /etc/default/grub 2 | # This file is an undocumented Ubuntu feature, described here: 3 | # https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/901600 4 | 5 | # Do not wait forever for GRUB (we're headless) 6 | GRUB_TIMEOUT=5 7 | # Additionally, in case of e.g. power cut in middle of boot, don't pause indefinitely at grub selection 8 | GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT 9 | # Disable plymouth splash screen; prevents sometimes getting stuck when headless. 10 | # We omit "splash" from the default line 11 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" 12 | # Do not use new-style network device naming; stick to eth0, wlan0, etc. 13 | GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" 14 | -------------------------------------------------------------------------------- /fetch_system_config/root/etc/modprobe.d/blacklist-intel-audio.conf: -------------------------------------------------------------------------------- 1 | # Blacklisting Intel sound devices to prevent those devices enumerating on top of 2 | # the audio device on the main board. 3 | blacklist snd_hda_intel 4 | -------------------------------------------------------------------------------- /fetch_system_config/root/etc/netplan/99-fetch-ethernet.yaml.default: -------------------------------------------------------------------------------- 1 | # Fetch research robots require the below configuration for eth1. 2 | # The configuration for eth0 is left to DHCP by default, but can be set to 3 | # another static IP by uncommenting the block below and running `sudo netplan apply`. 4 | network: 5 | version: 2 6 | ethernets: 7 | #eth0: 8 | # addresses: [172.42.42.1/24] 9 | eth1: 10 | addresses: [10.42.42.1/24] 11 | -------------------------------------------------------------------------------- /fetch_system_config/root/lib/udev/rules.d/40-libopenni2-0609.rules: -------------------------------------------------------------------------------- 1 | # Make primesense device mount with writing permissions (default is read only for unknown devices) 2 | SUBSYSTEM=="usb", ATTR{idProduct}=="0609", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video" -------------------------------------------------------------------------------- /fetch_system_config/root/lib/udev/rules.d/99-ds4drv.rules: -------------------------------------------------------------------------------- 1 | KERNEL=="uinput", MODE="0666" 2 | KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666" 3 | KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:05C4.*", MODE="0666" 4 | KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666" 5 | KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:09CC.*", MODE="0666" 6 | KERNEL=="js?", SUBSYSTEM=="input", ATTRS{name}=="Sony Computer Entertainment Wireless Controller", SYMLINK+="ps4joy" 7 | KERNEL=="js?", SUBSYSTEM=="input", ATTRS{name}=="Sony Computer Entertainment Wireless Controller", SYMLINK+="fetch_joy" 8 | -------------------------------------------------------------------------------- /fetch_system_config/root/opt/ros/roscore_poststart.bash: -------------------------------------------------------------------------------- 1 | # This script is used by the roscore systemd service unit 2 | echo "waiting for roscore to come up" 3 | . /opt/ros/noetic/setup.sh 4 | ret=`rosnode list` 5 | while [ "$ret" = '' ] 6 | do 7 | ret=`rosnode list` 8 | sleep 1; 9 | done 10 | -------------------------------------------------------------------------------- /fetch_system_config/root/opt/ros/roscore_prestart.bash: -------------------------------------------------------------------------------- 1 | # This script is used by the roscore systemd service unit 2 | mkdir -p /var/log/ros/ 3 | chown ros:ros /var/log/ros/ 4 | -------------------------------------------------------------------------------- /freight_bringup/CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package freight_bringup 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 0.9.3 (2021-04-25) 6 | ------------------ 7 | 8 | 0.9.2 (2021-03-12) 9 | ------------------ 10 | 11 | 0.9.1 (2021-03-05) 12 | ------------------ 13 | * Changes for Noetic/Py3 (`#61 `_) 14 | 15 | * Remove some ps3 controller references (no longer supported) 16 | * Update state_publisher -> robot_state_publisher 17 | * Changes for compatibility with new drivers: 18 | Drivers primarily load some params from a json file which 19 | end-users shouldn't need to modify. This file will live in 20 | /opt/ros/noetic or the catkin workspace for 99% of usecases. 21 | * Add explicit setting for fetch teleop param. 22 | 23 | * Add soundplay ROS node as systemd service (`#53 `_) 24 | Functionality existed in 14.04/indigo, and was initially left out. 25 | * Contributors: Eric Relson 26 | 27 | 0.8.8 (2019-08-21) 28 | ------------------ 29 | 30 | 0.8.7 (2019-08-06) 31 | ------------------ 32 | * Move ds4drv dep from package.xml to sys-config deb (`#48 `_) 33 | ROS buildfarm doesn't support pip dependencies. 34 | Also removed outdated sixad line. We don't install sixad at all in 18.04. 35 | * Update launch files to support PS4 teleop w/ds4drv 36 | - Teleop: Change default /joy/dev param to /dev/fetch_joy to match 37 | udev rules 38 | - Add ps4 flag/arg to default fetch.launch and freight.launch 39 | - As workaround to a weird bug, renamed 'joy' node to 'joy_node' 40 | * add joystick deadzone parameter (`#42 `_) 41 | * Add argument to select launching teleop (`#40 `_) 42 | - add argument to select launching teleop for Fetch 43 | - add argument to select launching teleop for freight 44 | * Contributors: Andrew Parker, Eric Relson, Naoya Yamaguchi 45 | 46 | 0.8.6 (2019-02-28) 47 | ------------------ 48 | 49 | 0.8.5 (2019-02-26) 50 | ------------------ 51 | 52 | 0.8.4 (2019-02-21) 53 | ------------------ 54 | * Add additional convenience packages as deps (`#33 `_) 55 | * Add additional convenience packages as deps 56 | * system config deb pulls in rest of debs 57 | * Fix netplan configuration approach 58 | * Contributors: Eric Relson 59 | 60 | 0.8.3 (2019-02-15) 61 | ------------------ 62 | 63 | 0.8.2 (2019-02-15) 64 | ------------------ 65 | * Merge pull request `#30 `_ from moriarty/rebased-pr-26 66 | [bringup] package format v2 (originally `#26 `_) 67 | * Remove unsupported PMD camera configuration 68 | * Add ps3joy exec dep; update to package.xml 2.0 69 | Also removed robot_controllers_msgs for fetch_bringup. This dependency 70 | is part of fetch_drivers package already. 71 | * Contributors: Alex Moriarty, Eric Relson 72 | 73 | 0.8.1 (2019-02-15) 74 | ------------------ 75 | 76 | 0.8.0 (2019-02-13) 77 | ------------------ 78 | * Add autodocking to default robot launch (`#28 `_) 79 | Also update package.xml 80 | * sixad depend not needed anymore on bionic (`#24 `_) 81 | * sixad depend not needed anymore on bionic 82 | * remove sixad from fetch_bringup 83 | * [ros param] adds robot/name robot/type (`#22 `_) 84 | add robot specific information on rosparam, see https://github.com/ros-infrastructure/rep/pull/104 85 | Related to: `ros-infrastructure/rep#104 `_ 86 | * Contributors: Eric Relson, Kei Okada, Steffen Fuchs 87 | 88 | 0.7.5 (2017-06-12) 89 | ------------------ 90 | * Add diagnostics aggregator launch and config 91 | * Contributors: Eric Relson, Michael Ferguson 92 | 93 | 0.7.4 (2017-03-28) 94 | ------------------ 95 | * Updates for research robots 96 | * Contributors: Michael Ferguson 97 | 98 | 0.7.3 (2016-08-26) 99 | ------------------ 100 | * added calibration_date param 101 | * remove extra nodelet manager 102 | * Contributors: Michael Ferguson, Niharika Arora 103 | 104 | 0.7.2 (2016-06-14) 105 | ------------------ 106 | * add launch_camera argument 107 | * Contributors: Michael Ferguson 108 | 109 | 0.7.1 (2016-05-05) 110 | ------------------ 111 | * update to use /dev/ps3joy 112 | * Contributors: Michael Ferguson 113 | 114 | 0.7.0 (2016-03-28) 115 | ------------------ 116 | * fix dependency issue with sixad 117 | * Added PMD to freight.launch 118 | * Contributors: Alex Henning, Michael Ferguson 119 | 120 | 0.6.1 (2016-03-22) 121 | ------------------ 122 | * require latest sixad 123 | * Raised acceleration limits to 2.0 124 | * Add autorepeat_rate parameter to teleop launch 125 | * Contributors: Alex Henning, Michael Ferguson, Michael Hwang 126 | 127 | 0.6.0 (2015-06-23) 128 | ------------------ 129 | 130 | 0.5.5 (2015-05-21) 131 | ------------------ 132 | * use no_delay parameter with graft 133 | * Contributors: Michael Ferguson 134 | 135 | 0.5.4 (2015-05-10) 136 | ------------------ 137 | * filter shadow points from laser 138 | * reorganize launch files for easier updating of calibrated robots 139 | * Contributors: Michael Ferguson 140 | 141 | 0.5.3 (2015-05-03) 142 | ------------------ 143 | * use new laser safety feature of base controller 144 | * Contributors: Michael Ferguson 145 | 146 | 0.5.2 (2015-04-19) 147 | ------------------ 148 | * hold position when stopped 149 | * Contributors: Michael Ferguson 150 | 151 | 0.5.1 (2015-04-09) 152 | ------------------ 153 | 154 | 0.5.0 (2015-04-04) 155 | ------------------ 156 | 157 | 0.4.2 (2015-03-23) 158 | ------------------ 159 | * add depend on joy 160 | * Contributors: Michael Ferguson 161 | 162 | 0.4.1 (2015-03-23) 163 | ------------------ 164 | 165 | 0.4.0 (2015-03-22) 166 | ------------------ 167 | * update to use fetch_teleop 168 | * Contributors: Michael Ferguson 169 | 170 | 0.3.2 (2015-03-21) 171 | ------------------ 172 | * specify minimum version of laser drivers 173 | * update laser parameters 174 | * Contributors: Michael Ferguson 175 | 176 | 0.3.1 (2015-03-13 19:53) 177 | ------------------------ 178 | 179 | 0.3.0 (2015-03-13 18:59) 180 | ------------------------ 181 | * initial release 182 | * Contributors: Michael Ferguson 183 | -------------------------------------------------------------------------------- /freight_bringup/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0.2) 2 | project(freight_bringup) 3 | 4 | find_package(catkin) 5 | catkin_package() 6 | 7 | install(DIRECTORY config 8 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 9 | ) 10 | 11 | install(DIRECTORY launch 12 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 13 | ) 14 | -------------------------------------------------------------------------------- /freight_bringup/config/analyzers.yaml: -------------------------------------------------------------------------------- 1 | pub_rate: 1.0 2 | base_path: '' # Optional, prepended to all diagnostic output 3 | analyzers: 4 | sound_play: 5 | type: diagnostic_aggregator/GenericAnalyzer 6 | path: SoundPlay 7 | startswith: sound_play 8 | breakers: 9 | type: diagnostic_aggregator/AnalyzerGroup 10 | path: Breakers 11 | analyzers: 12 | base_breaker: 13 | type: diagnostic_aggregator/GenericAnalyzer 14 | path: Base Breaker 15 | startswith: base_breaker 16 | battery_breaker: 17 | type: diagnostic_aggregator/GenericAnalyzer 18 | path: Battery Breaker 19 | startswith: battery_breaker 20 | computer_breaker: 21 | type: diagnostic_aggregator/GenericAnalyzer 22 | path: Computer Breaker 23 | startswith: computer_breaker 24 | supply_breaker: 25 | type: diagnostic_aggregator/GenericAnalyzer 26 | path: Supply Breaker 27 | startswith: supply_breaker 28 | motors: 29 | type: diagnostic_aggregator/AnalyzerGroup 30 | path: Motor Control Boards 31 | analyzers: 32 | l_wheel: 33 | type: diagnostic_aggregator/GenericAnalyzer 34 | path: Left Wheel 35 | startswith: l_wheel 36 | r_wheel: 37 | type: diagnostic_aggregator/GenericAnalyzer 38 | path: Right Wheel 39 | startswith: r_wheel 40 | sensors: 41 | type: diagnostic_aggregator/AnalyzerGroup 42 | path: Sensors 43 | analyzers: 44 | base_breaker: 45 | type: diagnostic_aggregator/GenericAnalyzer 46 | path: Sick TIM551 Laser 47 | startswith: sick_tim 48 | peripherals: 49 | type: diagnostic_aggregator/AnalyzerGroup 50 | path: Peripherals 51 | analyzers: 52 | joy: 53 | type: diagnostic_aggregator/GenericAnalyzer 54 | path: PS3 Controller 55 | find_and_remove_prefix: "joy:" 56 | system: 57 | type: diagnostic_aggregator/AnalyzerGroup 58 | path: System 59 | analyzers: 60 | mainboard: 61 | type: diagnostic_aggregator/GenericAnalyzer 62 | path: Mainboard 63 | startswith: Mainboard 64 | charger: 65 | type: diagnostic_aggregator/GenericAnalyzer 66 | path: Charger 67 | startswith: Charger 68 | -------------------------------------------------------------------------------- /freight_bringup/config/default_controllers.yaml: -------------------------------------------------------------------------------- 1 | base_controller: 2 | type: "robot_controllers/DiffDriveBaseController" 3 | max_velocity_x: 1.5 4 | max_acceleration_x: 2.0 5 | # hold position 6 | moving_threshold: -0.01 7 | rotating_threshold: -0.01 8 | # autostart to get odom 9 | autostart: true 10 | # use laser to only slowly collide with things 11 | laser_safety_dist: 1.5 12 | 13 | robot_driver: 14 | default_controllers: 15 | - "base_controller" 16 | -------------------------------------------------------------------------------- /freight_bringup/config/freight_driver_params.json: -------------------------------------------------------------------------------- 1 | { 2 | "calibration_date": "uncalibrated", 3 | "charger_extra_table_age": 0.5, 4 | "csv_logger": { 5 | "csv_logger_period": 10.0, 6 | "log_filename": "/var/log/ros/robot_log.csv" 7 | }, 8 | "default_logger_level": 2, 9 | "has_fetch_arm": false, 10 | "mainboard_ip": "10.42.42.42", 11 | "max_acceptable_table_age": 0.96, 12 | "port": 2067, 13 | "ros_spinner_threads": 1, 14 | "watchdog_period": 0.1 15 | } 16 | -------------------------------------------------------------------------------- /freight_bringup/config/graft.yaml: -------------------------------------------------------------------------------- 1 | planar_output: True # Output only x, y, and rotation about z 2 | 3 | output_frame: odom # TF frame id, param name ported from robot_pose_ekf 4 | parent_frame_id: odom # TF frame id, override output_frame if set 5 | child_frame_id: base_link #TF frame id 6 | publish_tf: true 7 | 8 | update_rate: 50.0 9 | update_topic: odom 10 | 11 | queue_size: 1 12 | 13 | # Filter parameters 14 | alpha: 0.001 15 | kappa: 0.0 16 | beta: 2.0 17 | 18 | # Process noise covariance 2x2 for velocites, 5x5 for 2d position 19 | process_noise: [1e6, 0, 0, 20 | 0, 1e6, 0, 21 | 0, 0, 1e6] 22 | 23 | # Inputs 24 | topics: { 25 | odom: { 26 | topic: /odom, 27 | type: nav_msgs/Odometry, 28 | absolute_pose: False, 29 | use_velocities: True, 30 | timeout: 1.0, 31 | no_delay: True, 32 | override_twist_covariance: [1e-3, 0, 0, 0, 0, 0, 33 | 0, 1e-3, 0, 0, 0, 0, 34 | 0, 0, 1e-6, 0, 0, 0, 35 | 0, 0, 0, 1e-6, 0, 0, 36 | 0, 0, 0, 0, 1e-6, 0, 37 | 0, 0, 0, 0, 0, 1e-3], 38 | }, 39 | 40 | imu: { 41 | topic: /imu, 42 | type: sensor_msgs/Imu, 43 | absolute_orientation: False, 44 | use_velocities: True, 45 | use_accelerations: False, 46 | timeout: 1.0, 47 | no_delay: True, 48 | override_angular_velocity_covariance: [0, 0, 0, 49 | 0, 0, 0, 50 | 0, 0, 0.000004], 51 | }, 52 | } 53 | -------------------------------------------------------------------------------- /freight_bringup/launch/freight.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /freight_bringup/launch/include/aggregator.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /freight_bringup/launch/include/graft.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /freight_bringup/launch/include/laser.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /freight_bringup/launch/include/teleop.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /freight_bringup/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | freight_bringup 4 | 0.9.3 5 | 6 | Bringup for freight 7 | 8 | 9 | Michael Ferguson 10 | Eric Relson 11 | Fetch Robotics Open Source Team 12 | 13 | Proprietary 14 | 15 | catkin 16 | diagnostic_aggregator 17 | fetch_description 18 | fetch_drivers 19 | fetch_navigation 20 | fetch_open_auto_dock 21 | fetch_teleop 22 | graft 23 | joy 24 | robot_state_publisher 25 | sick_tim 26 | sound_play 27 | 28 | 29 | --------------------------------------------------------------------------------