├── .gitignore ├── LICENSE ├── README.md ├── rrbot ├── CMakeLists.txt └── package.xml ├── rrbot_controllers ├── CMakeLists.txt ├── README.md └── package.xml ├── rrbot_description ├── CMakeLists.txt ├── config │ ├── controllers.yaml │ └── hardware.yaml ├── launch │ ├── rrbot.rviz │ └── rrbot_rviz.launch ├── model │ ├── materials.xacro │ ├── meshes │ │ └── hokuyo.dae │ ├── rrbot.gazebo.xacro │ └── rrbot.urdf.xacro ├── package.xml └── robots │ ├── single_rrbot.urdf │ ├── single_rrbot.urdf.xacro │ └── two_rrbots.urdf.xacro ├── rrbot_gazebo ├── CMakeLists.txt ├── launch │ └── rrbot_world.launch ├── package.xml └── worlds │ └── rrbot.world ├── rrbot_hw ├── CMakeLists.txt ├── LICENSE ├── README.md ├── include │ └── rrbot_hw │ │ ├── rrbot_hw.h │ │ ├── rrbot_hw_real.h │ │ ├── rrbot_hw_sim.h │ │ └── rrbot_hw_sim_plugin.h ├── launch │ ├── rrbot_hw.launch │ └── rrbot_visualize.launch ├── package.xml ├── rrbot_hw_sim_plugins.xml └── src │ ├── default_rrbot_hw_sim.cpp │ ├── rrbot_hw_real.cpp │ ├── rrbot_hw_real_node.cpp │ └── rrbot_hw_sim_plugin.cpp ├── rrbot_launch ├── CMakeLists.txt ├── README.md ├── launch │ └── bringupRRBOT.launch └── package.xml ├── rrbot_transmission ├── CMakeLists.txt ├── README.md └── package.xml └── single_rrbot_moveit_config ├── .setup_assistant ├── CMakeLists.txt ├── config ├── controllers.yaml ├── fake_controllers.yaml ├── joint_limits.yaml ├── kinematics.yaml ├── ompl_planning.yaml └── single_rrbot.srdf ├── launch ├── default_warehouse_db.launch ├── demo.launch ├── fake_moveit_controller_manager.launch.xml ├── joystick_control.launch ├── move_group.launch ├── moveit.rviz ├── moveit_rviz.launch ├── ompl_planning_pipeline.launch.xml ├── planning_context.launch ├── planning_pipeline.launch.xml ├── run_benchmark_ompl.launch ├── sensor_manager.launch.xml ├── setup_assistant.launch ├── single_rrbot_moveit_controller_manager.launch.xml ├── single_rrbot_moveit_sensor_manager.launch.xml ├── trajectory_execution.launch.xml ├── warehouse.launch └── warehouse_settings.launch.xml └── package.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rrbot 2 | Comprehensive example to show recent capabilities in ROS/Gazebo/MoveIt! 3 | 4 | ## Dependencies 5 | 6 | ## Uses 7 | 8 | * Bring up the __single_rrbot__ robot (it loads the simulated one by default): 9 | 10 | `roslaunch rrbot_launch bringupRRBOT.launch` 11 | 12 | * Move the __single_rrbot__ robot using `ros-controls` 13 | 14 | Launch `rqt`, and open Plugins->Robot Tools->Joint trajectory controller and move the robot with slides. 15 | 16 | * Move the __single_rrbot__ robot using MoveIt! 17 | 18 | Load the planning environment: 19 | 20 | `roslaunch single_rrbot_moveit_config move_group.launch` 21 | 22 | Open the pre-configured rviz and use the MoveIt! display: 23 | 24 | `roslaunch single_rrbot_moveit_config moveit_rviz.launch` 25 | -------------------------------------------------------------------------------- /rrbot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() -------------------------------------------------------------------------------- /rrbot/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rrbot 4 | 0.0.0 5 | The rrbot package 6 | 7 | Carlos Rosales 8 | 9 | GPLv2 10 | 11 | catkin 12 | 13 | 14 | rrbot_controllers 15 | rrbot_description 16 | rrbot_gazebo 17 | rrbot_hw 18 | rrbot_launch 19 | rrbot_transmission 20 | 21 | 22 | single_rrbot_moveit_config 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /rrbot_controllers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot_controllers) 3 | 4 | ## Find catkin macros and libraries 5 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 6 | ## is used, also find other catkin packages 7 | find_package(catkin REQUIRED) 8 | 9 | ## System dependencies are found with CMake's conventions 10 | # find_package(Boost REQUIRED COMPONENTS system) 11 | 12 | 13 | ## Uncomment this if the package has a setup.py. This macro ensures 14 | ## modules and global scripts declared therein get installed 15 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 16 | # catkin_python_setup() 17 | 18 | ################################################ 19 | ## Declare ROS messages, services and actions ## 20 | ################################################ 21 | 22 | ## To declare and build messages, services or actions from within this 23 | ## package, follow these steps: 24 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 25 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 26 | ## * In the file package.xml: 27 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 28 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been 29 | ## pulled in transitively but can be declared for certainty nonetheless: 30 | ## * add a build_depend tag for "message_generation" 31 | ## * add a run_depend tag for "message_runtime" 32 | ## * In this file (CMakeLists.txt): 33 | ## * add "message_generation" and every package in MSG_DEP_SET to 34 | ## find_package(catkin REQUIRED COMPONENTS ...) 35 | ## * add "message_runtime" and every package in MSG_DEP_SET to 36 | ## catkin_package(CATKIN_DEPENDS ...) 37 | ## * uncomment the add_*_files sections below as needed 38 | ## and list every .msg/.srv/.action file to be processed 39 | ## * uncomment the generate_messages entry below 40 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 41 | 42 | ## Generate messages in the 'msg' folder 43 | # add_message_files( 44 | # FILES 45 | # Message1.msg 46 | # Message2.msg 47 | # ) 48 | 49 | ## Generate services in the 'srv' folder 50 | # add_service_files( 51 | # FILES 52 | # Service1.srv 53 | # Service2.srv 54 | # ) 55 | 56 | ## Generate actions in the 'action' folder 57 | # add_action_files( 58 | # FILES 59 | # Action1.action 60 | # Action2.action 61 | # ) 62 | 63 | ## Generate added messages and services with any dependencies listed here 64 | # generate_messages( 65 | # DEPENDENCIES 66 | # std_msgs # Or other packages containing msgs 67 | # ) 68 | 69 | ################################### 70 | ## catkin specific configuration ## 71 | ################################### 72 | ## The catkin_package macro generates cmake config files for your package 73 | ## Declare things to be passed to dependent projects 74 | ## INCLUDE_DIRS: uncomment this if you package contains header files 75 | ## LIBRARIES: libraries you create in this project that dependent projects also need 76 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 77 | ## DEPENDS: system dependencies of this project that dependent projects also need 78 | catkin_package( 79 | # INCLUDE_DIRS include 80 | # LIBRARIES rrbot_controllers 81 | # CATKIN_DEPENDS other_catkin_pkg 82 | # DEPENDS system_lib 83 | ) 84 | 85 | ########### 86 | ## Build ## 87 | ########### 88 | 89 | ## Specify additional locations of header files 90 | ## Your package locations should be listed before other locations 91 | # include_directories(include) 92 | 93 | ## Declare a cpp library 94 | # add_library(rrbot_controllers 95 | # src/${PROJECT_NAME}/rrbot_controllers.cpp 96 | # ) 97 | 98 | ## Declare a cpp executable 99 | # add_executable(rrbot_controllers_node src/rrbot_controllers_node.cpp) 100 | 101 | ## Add cmake target dependencies of the executable/library 102 | ## as an example, message headers may need to be generated before nodes 103 | # add_dependencies(rrbot_controllers_node rrbot_controllers_generate_messages_cpp) 104 | 105 | ## Specify libraries to link a library or executable target against 106 | # target_link_libraries(rrbot_controllers_node 107 | # ${catkin_LIBRARIES} 108 | # ) 109 | 110 | ############# 111 | ## Install ## 112 | ############# 113 | 114 | # all install targets should use catkin DESTINATION variables 115 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 116 | 117 | ## Mark executable scripts (Python etc.) for installation 118 | ## in contrast to setup.py, you can choose the destination 119 | # install(PROGRAMS 120 | # scripts/my_python_script 121 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 122 | # ) 123 | 124 | ## Mark executables and/or libraries for installation 125 | # install(TARGETS rrbot_controllers rrbot_controllers_node 126 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 127 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 128 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 129 | # ) 130 | 131 | ## Mark cpp header files for installation 132 | # install(DIRECTORY include/${PROJECT_NAME}/ 133 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 134 | # FILES_MATCHING PATTERN "*.h" 135 | # PATTERN ".svn" EXCLUDE 136 | # ) 137 | 138 | ## Mark other files for installation (e.g. launch and bag files, etc.) 139 | # install(FILES 140 | # # myfile1 141 | # # myfile2 142 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 143 | # ) 144 | 145 | ############# 146 | ## Testing ## 147 | ############# 148 | 149 | ## Add gtest based cpp test target and link libraries 150 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_rrbot_controllers.cpp) 151 | # if(TARGET ${PROJECT_NAME}-test) 152 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 153 | # endif() 154 | 155 | ## Add folders to be run by python nosetests 156 | # catkin_add_nosetests(test) 157 | -------------------------------------------------------------------------------- /rrbot_controllers/README.md: -------------------------------------------------------------------------------- 1 | In case you want to develop custom controllers to extend what ros_controllers offers. -------------------------------------------------------------------------------- /rrbot_controllers/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rrbot_controllers 4 | 0.0.0 5 | The rrbot_controllers package 6 | 7 | 8 | 9 | 10 | crosales 11 | 12 | 13 | 14 | 15 | 16 | TODO 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 | catkin 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /rrbot_description/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot_description) 3 | 4 | find_package(catkin REQUIRED) 5 | 6 | catkin_package() 7 | 8 | install(DIRECTORY launch 9 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 10 | 11 | install(DIRECTORY meshes 12 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 13 | 14 | install(DIRECTORY urdf 15 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 16 | -------------------------------------------------------------------------------- /rrbot_description/config/controllers.yaml: -------------------------------------------------------------------------------- 1 | single_rrbot: 2 | # Publish all joint states ---------------------------------- 3 | joint_state_controller: 4 | type: joint_state_controller/JointStateController 5 | publish_rate: 50 6 | 7 | # Joint Trajectory Controller ------------------------------- 8 | position_trajectory_controller: 9 | type: position_controllers/JointTrajectoryController 10 | # CR: Here is my point, can the urdf/transmission specification be used for joint names? 11 | joints: 12 | - single_rrbot_joint1 13 | - single_rrbot_joint2 14 | constraints: 15 | goal_time: 5.0 16 | stopped_position_tolerance: 0.4 # Defaults to 0.01 17 | joint1: 18 | trajectory: 0.60 19 | goal: 0.15 20 | joint2: 21 | trajectory: 0.60 22 | goal: 0.15 23 | # gains: 24 | # joint1: {p: 2.0, i: 0.0, d: 0.01, i_clamp: 1} 25 | # joint2: {p: 2.0, i: 0.0, d: 0.01, i_clamp: 1} 26 | 27 | # state_publish_rate: 50 # Defaults to 50 28 | # action_monitor_rate: 20 # Defaults to 20 29 | #hold_trajectory_duration: 0 # Defaults to 0.5 -------------------------------------------------------------------------------- /rrbot_description/config/hardware.yaml: -------------------------------------------------------------------------------- 1 | single_rrbot: 2 | # Settings for ros_control hardware interface 3 | hardware_interface: 4 | loop_hz: 10 # hz 5 | # CR: Here is my point, can the urdf/transmission specification be used for joint names? 6 | joints: 7 | - single_rrbot_joint1 8 | - single_rrbot_joint2 -------------------------------------------------------------------------------- /rrbot_description/launch/rrbot.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz/Displays 3 | Help Height: 78 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /Global Options1 8 | - /Status1 9 | - /Camera1/Status1 10 | - /Camera1/Visibility1 11 | Splitter Ratio: 0.5 12 | Tree Height: 324 13 | - Class: rviz/Selection 14 | Name: Selection 15 | - Class: rviz/Tool Properties 16 | Expanded: 17 | - /2D Pose Estimate1 18 | - /2D Nav Goal1 19 | - /Publish Point1 20 | Name: Tool Properties 21 | Splitter Ratio: 0.588679 22 | - Class: rviz/Views 23 | Expanded: 24 | - /Current View1 25 | Name: Views 26 | Splitter Ratio: 0.5 27 | - Class: rviz/Time 28 | Experimental: false 29 | Name: Time 30 | SyncMode: 0 31 | SyncSource: "" 32 | Visualization Manager: 33 | Class: "" 34 | Displays: 35 | - Alpha: 0.5 36 | Cell Size: 1 37 | Class: rviz/Grid 38 | Color: 160; 160; 164 39 | Enabled: true 40 | Line Style: 41 | Line Width: 0.03 42 | Value: Lines 43 | Name: Grid 44 | Normal Cell Count: 0 45 | Offset: 46 | X: 0 47 | Y: 0 48 | Z: 0 49 | Plane: XY 50 | Plane Cell Count: 10 51 | Reference Frame: 52 | Value: true 53 | - Alpha: 1 54 | Class: rviz/RobotModel 55 | Collision Enabled: false 56 | Enabled: true 57 | Links: 58 | All Links Enabled: true 59 | Expand Joint Details: false 60 | Expand Link Details: false 61 | Expand Tree: false 62 | Link Tree Style: Links in Alphabetic Order 63 | my_rrbot_camera_link: 64 | Alpha: 1 65 | Show Axes: false 66 | Show Trail: false 67 | Value: true 68 | my_rrbot_hokuyo_link: 69 | Alpha: 1 70 | Show Axes: false 71 | Show Trail: false 72 | Value: true 73 | my_rrbot_link1: 74 | Alpha: 1 75 | Show Axes: false 76 | Show Trail: false 77 | Value: true 78 | my_rrbot_link2: 79 | Alpha: 1 80 | Show Axes: false 81 | Show Trail: false 82 | Value: true 83 | my_rrbot_link3: 84 | Alpha: 1 85 | Show Axes: false 86 | Show Trail: false 87 | Value: true 88 | world: 89 | Alpha: 1 90 | Show Axes: false 91 | Show Trail: false 92 | Name: RobotModel 93 | Robot Description: robot_description 94 | TF Prefix: "" 95 | Update Interval: 0 96 | Value: true 97 | Visual Enabled: true 98 | - Alpha: 1 99 | Autocompute Intensity Bounds: true 100 | Autocompute Value Bounds: 101 | Max Value: 10 102 | Min Value: -10 103 | Value: true 104 | Axis: Z 105 | Channel Name: intensity 106 | Class: rviz/LaserScan 107 | Color: 255; 255; 255 108 | Color Transformer: Intensity 109 | Decay Time: 0 110 | Enabled: true 111 | Invert Rainbow: false 112 | Max Color: 255; 255; 255 113 | Max Intensity: 0 114 | Min Color: 0; 0; 0 115 | Min Intensity: 0 116 | Name: LaserScan 117 | Position Transformer: XYZ 118 | Queue Size: 10 119 | Selectable: true 120 | Size (Pixels): 3 121 | Size (m): 0.01 122 | Style: Flat Squares 123 | Topic: /rrbot/laser/scan 124 | Use Fixed Frame: true 125 | Use rainbow: true 126 | Value: true 127 | - Class: rviz/Camera 128 | Enabled: true 129 | Image Rendering: background and overlay 130 | Image Topic: /rrbot/camera1/image_raw 131 | Name: Camera 132 | Overlay Alpha: 0.5 133 | Queue Size: 2 134 | Transport Hint: raw 135 | Value: true 136 | Visibility: 137 | Grid: true 138 | LaserScan: true 139 | RobotModel: true 140 | Value: true 141 | Zoom Factor: 1 142 | Enabled: true 143 | Global Options: 144 | Background Color: 48; 48; 48 145 | Fixed Frame: world 146 | Frame Rate: 30 147 | Name: root 148 | Tools: 149 | - Class: rviz/Interact 150 | Hide Inactive Objects: true 151 | - Class: rviz/MoveCamera 152 | - Class: rviz/Select 153 | - Class: rviz/FocusCamera 154 | - Class: rviz/Measure 155 | - Class: rviz/SetInitialPose 156 | Topic: /initialpose 157 | - Class: rviz/SetGoal 158 | Topic: /move_base_simple/goal 159 | - Class: rviz/PublishPoint 160 | Single click: true 161 | Topic: /clicked_point 162 | Value: true 163 | Views: 164 | Current: 165 | Class: rviz/Orbit 166 | Distance: 11.6221 167 | Enable Stereo Rendering: 168 | Stereo Eye Separation: 0.06 169 | Stereo Focal Distance: 1 170 | Swap Stereo Eyes: false 171 | Value: false 172 | Focal Point: 173 | X: 0.315895 174 | Y: -0.38219 175 | Z: 2.03499 176 | Name: Current View 177 | Near Clip Distance: 0.01 178 | Pitch: 0.650399 179 | Target Frame: 180 | Value: Orbit (rviz) 181 | Yaw: 2.42039 182 | Saved: ~ 183 | Window Geometry: 184 | Camera: 185 | collapsed: false 186 | Displays: 187 | collapsed: false 188 | Height: 744 189 | Hide Left Dock: false 190 | Hide Right Dock: false 191 | QMainWindow State: 000000ff00000000fd00000004000000000000028a0000025efc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000001d3000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d0065007200610100000201000000850000001600ffffff000000010000010f0000025efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007301000000280000025e000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000005150000003efc0100000002fb0000000800540069006d0065010000000000000515000002f600fffffffb0000000800540069006d00650100000000000004500000000000000000000001700000025e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 192 | Selection: 193 | collapsed: false 194 | Time: 195 | collapsed: false 196 | Tool Properties: 197 | collapsed: false 198 | Views: 199 | collapsed: false 200 | Width: 1301 201 | X: 65 202 | Y: 24 203 | -------------------------------------------------------------------------------- /rrbot_description/launch/rrbot_rviz.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /rrbot_description/model/materials.xacro: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /rrbot_description/model/rrbot.gazebo.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ${name} 13 | 14 | rrbot_hw/DefaultRRBOTHWSim 15 | 16 | 17 | 18 | 19 | 20 | Gazebo/Orange 21 | 22 | 23 | 24 | 25 | 0.2 26 | 0.2 27 | Gazebo/Black 28 | 29 | 30 | 31 | 32 | 0.2 33 | 0.2 34 | Gazebo/Orange 35 | 36 | 37 | 38 | 39 | 0.2 40 | 0.2 41 | Gazebo/Red 42 | 43 | 44 | 45 | 46 | 47 | 0 0 0 0 0 0 48 | false 49 | 40 50 | 51 | 52 | 53 | 720 54 | 1 55 | -1.570796 56 | 1.570796 57 | 58 | 59 | 60 | 0.10 61 | 30.0 62 | 0.01 63 | 64 | 65 | gaussian 66 | 70 | 0.0 71 | 0.01 72 | 73 | 74 | 75 | 76 | ${name} 77 | laser/scan 78 | ${name}_hokuyo_link 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 30.0 87 | 88 | 1.3962634 89 | 90 | 800 91 | 800 92 | R8G8B8 93 | 94 | 95 | 0.02 96 | 300 97 | 98 | 99 | gaussian 100 | 103 | 0.0 104 | 0.007 105 | 106 | 107 | 108 | true 109 | 0.0 110 | ${name} 111 | ${name}_camera1 112 | image_raw 113 | camera_info 114 | ${name}_camera_link 115 | 0.07 116 | 0.0 117 | 0.0 118 | 0.0 119 | 0.0 120 | 0.0 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /rrbot_description/model/rrbot.urdf.xacro: -------------------------------------------------------------------------------- 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 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | transmission_interface/SimpleTransmission 192 | ${name} 193 | 194 | PositionJointInterface 195 | 196 | 197 | 1 198 | 199 | 200 | 201 | 202 | transmission_interface/SimpleTransmission 203 | ${name} 204 | 205 | PositionJointInterface 206 | 207 | 208 | 1 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /rrbot_description/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rrbot_description 4 | 0.0.0 5 | The rrbot_description package 6 | 7 | Dave Coleman 8 | 9 | BSD 10 | 11 | http://http://gazebosim.org/w/index.php?title=Tutorials/1.9/Using_A_URDF_In_Gazebo 12 | https://github.com/osrf/gazebo_ros_demos/issues 13 | https://github.com/osrf/gazebo_ros_demos 14 | 15 | Dave Coleman 16 | 17 | catkin 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /rrbot_description/robots/single_rrbot.urdf: -------------------------------------------------------------------------------- 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 | true 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 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | transmission_interface/SimpleTransmission 169 | 170 | PositionJointInterface 171 | 172 | 173 | 1 174 | 175 | 176 | 177 | transmission_interface/SimpleTransmission 178 | 179 | PositionJointInterface 180 | 181 | 182 | 1 183 | 184 | 185 | 186 | 187 | single_rrbot 188 | 189 | rrbot_hw/DefaultRRBOTHWSim 190 | 191 | 192 | 193 | Gazebo/Orange 194 | 195 | 196 | 0.2 197 | 0.2 198 | Gazebo/Black 199 | 200 | 201 | 0.2 202 | 0.2 203 | Gazebo/Orange 204 | 205 | 206 | 0.2 207 | 0.2 208 | Gazebo/Red 209 | 210 | 211 | 212 | 0 0 0 0 0 0 213 | false 214 | 40 215 | 216 | 217 | 218 | 720 219 | 1 220 | -1.570796 221 | 1.570796 222 | 223 | 224 | 225 | 0.10 226 | 30.0 227 | 0.01 228 | 229 | 230 | gaussian 231 | 235 | 0.0 236 | 0.01 237 | 238 | 239 | 240 | 241 | single_rrbot 242 | laser/scan 243 | single_rrbot_hokuyo_link 244 | 245 | 246 | 247 | 248 | 249 | 30.0 250 | 251 | 1.3962634 252 | 253 | 800 254 | 800 255 | R8G8B8 256 | 257 | 258 | 0.02 259 | 300 260 | 261 | 262 | gaussian 263 | 266 | 0.0 267 | 0.007 268 | 269 | 270 | 271 | true 272 | 0.0 273 | single_rrbot 274 | single_rrbot_camera1 275 | image_raw 276 | camera_info 277 | single_rrbot_camera_link 278 | 0.07 279 | 0.0 280 | 0.0 281 | 0.0 282 | 0.0 283 | 0.0 284 | 285 | 286 | 287 | 288 | 289 | -------------------------------------------------------------------------------- /rrbot_description/robots/single_rrbot.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /rrbot_description/robots/two_rrbots.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /rrbot_gazebo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot_gazebo) 3 | 4 | find_package(catkin REQUIRED) 5 | 6 | catkin_package() 7 | 8 | install(DIRECTORY launch 9 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 10 | 11 | install(DIRECTORY worlds 12 | DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 13 | -------------------------------------------------------------------------------- /rrbot_gazebo/launch/rrbot_world.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /rrbot_gazebo/package.xml: -------------------------------------------------------------------------------- 1 | 2 | rrbot_gazebo 3 | 0.1.0 4 | rrbot_gazebo 5 | Dave Coleman 6 | 7 | BSD 8 | 9 | http://gazebosim.org/w/index.php?title=Tutorials/1.9/Using_A_URDF_In_Gazebo 10 | https://github.com/osrf/gazebo_ros_demos/issues 11 | https://github.com/osrf/gazebo_ros_demos 12 | 13 | Dave Coleman 14 | 15 | catkin 16 | 17 | rrbot_description 18 | rrbot_control 19 | gazebo_ros 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /rrbot_gazebo/worlds/rrbot.world: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | model://ground_plane 8 | 9 | 10 | 11 | 12 | model://sun 13 | 14 | 15 | 16 | 17 | 18 | 4.927360 -4.376610 3.740080 0.000000 0.275643 2.356190 19 | orbit 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /rrbot_hw/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot_hw) 3 | 4 | add_compile_options(-std=c++11) 5 | 6 | ## Find catkin macros and libraries 7 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 8 | ## is used, also find other catkin packages 9 | find_package(catkin REQUIRED COMPONENTS 10 | hardware_interface 11 | controller_manager 12 | roscpp 13 | control_msgs 14 | trajectory_msgs 15 | actionlib 16 | pluginlib 17 | transmission_interface 18 | urdf 19 | control_toolbox 20 | joint_limits_interface 21 | gazebo_ros 22 | ) 23 | 24 | ## System dependencies are found with CMake's conventions 25 | find_package(gazebo REQUIRED) 26 | 27 | catkin_package( 28 | INCLUDE_DIRS 29 | include 30 | CATKIN_DEPENDS 31 | hardware_interface 32 | controller_manager 33 | roscpp 34 | control_msgs 35 | trajectory_msgs 36 | pluginlib 37 | transmission_interface 38 | urdf 39 | control_toolbox 40 | joint_limits_interface 41 | gazebo_ros 42 | LIBRARIES 43 | rrbot_hw 44 | default_rrbot_hw_sim 45 | rrbot_hw_sim_plugin 46 | DEPENDS 47 | gazebo 48 | ) 49 | 50 | ########### 51 | ## Build ## 52 | ########### 53 | 54 | include_directories( 55 | include/ 56 | ${catkin_INCLUDE_DIRS} 57 | ${GAZEBO_INCLUDE_DIRS} 58 | ) 59 | 60 | link_directories(${GAZEBO_LIBRARY_DIRS}) 61 | 62 | # Hardware Interface Sim 63 | add_library(default_rrbot_hw_sim src/default_rrbot_hw_sim.cpp) 64 | target_link_libraries(default_rrbot_hw_sim 65 | ${GAZEBO_LIBRARIES} 66 | ${catkin_LIBRARIES} 67 | ) 68 | 69 | # Gazebo plugin for Hardware Interface Sim 70 | add_library(rrbot_hw_sim_plugin src/rrbot_hw_sim_plugin.cpp) 71 | add_dependencies(rrbot_hw_sim_plugin 72 | default_rrbot_hw_sim 73 | ) 74 | target_link_libraries(rrbot_hw_sim_plugin 75 | default_rrbot_hw_sim 76 | ${catkin_LIBRARIES} 77 | ${GAZEBO_LIBRARIES} 78 | ) 79 | 80 | # Hardware Interface Real 81 | add_library(rrbot_hw_real src/rrbot_hw_real.cpp) 82 | target_link_libraries(rrbot_hw_real 83 | ${catkin_LIBRARIES} 84 | ) 85 | 86 | # ROS Node for Hardware Interface Real 87 | add_executable(rrbot_hw_real_node src/rrbot_hw_real_node.cpp) 88 | add_dependencies(rrbot_hw_real_node 89 | rrbot_hw_real 90 | ) 91 | target_link_libraries(rrbot_hw_real_node 92 | rrbot_hw_real 93 | ${catkin_LIBRARIES} 94 | ) 95 | -------------------------------------------------------------------------------- /rrbot_hw/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dave Coleman 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of ros_control_boilerplate 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 ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /rrbot_hw/README.md: -------------------------------------------------------------------------------- 1 | In case you want to develop custom HW interfaces to extend the default ones in `hardware_interface` and in `gazebo_ros_control` -------------------------------------------------------------------------------- /rrbot_hw/include/rrbot_hw/rrbot_hw.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2015, University of Colorado, Boulder 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of the Univ of CO, Boulder nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | *********************************************************************/ 34 | 35 | /* Author: Dave Coleman 36 | Desc: Example ros_control hardware interface that performs a perfect control loop for simulation 37 | */ 38 | 39 | // This file is the base class that defines your hardware elements 40 | // Later, you need to implement a hardware real/sim interfaces. 41 | 42 | #ifndef ROS_CONTROL__RRBOT_HARDWARE_INTERFACE_H 43 | #define ROS_CONTROL__RRBOT_HARDWARE_INTERFACE_H 44 | 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | 56 | namespace rrbot_hw 57 | { 58 | 59 | /// \brief Hardware interface for a robot 60 | class RRBOTHardware : public hardware_interface::RobotHW 61 | { 62 | /*public: 63 | 64 | /// \brief Constructor. 65 | RRBOTHardware(); 66 | 67 | /// \brief Destructor. 68 | ~RRBOTHardware(); 69 | */ 70 | protected: 71 | 72 | // Interfaces 73 | hardware_interface::JointStateInterface joint_state_interface_; 74 | hardware_interface::PositionJointInterface position_joint_interface_; 75 | hardware_interface::VelocityJointInterface velocity_joint_interface_; 76 | hardware_interface::EffortJointInterface effort_joint_interface_; 77 | 78 | joint_limits_interface::EffortJointSaturationInterface effort_joint_saturation_interface_; 79 | joint_limits_interface::EffortJointSoftLimitsInterface effort_joint_limits_interface_; 80 | joint_limits_interface::PositionJointSaturationInterface position_joint_saturation_interface_; 81 | joint_limits_interface::PositionJointSoftLimitsInterface position_joint_limits_interface_; 82 | joint_limits_interface::VelocityJointSaturationInterface velocity_joint_saturation_interface_; 83 | joint_limits_interface::VelocityJointSoftLimitsInterface velocity_joint_limits_interface_; 84 | 85 | // Custom or available transmissions 86 | // transmission_interface::RRBOTTransmission rrbot_trans_; 87 | // std::vector simple_trans_; 88 | 89 | // Shared memory 90 | int num_joints_; 91 | int joint_mode_; // position, velocity, or effort 92 | std::vector joint_names_; 93 | std::vector joint_types_; 94 | std::vector joint_position_; 95 | std::vector joint_velocity_; 96 | std::vector joint_effort_; 97 | std::vector joint_position_command_; 98 | std::vector joint_velocity_command_; 99 | std::vector joint_effort_command_; 100 | std::vector joint_lower_limits_; 101 | std::vector joint_upper_limits_; 102 | std::vector joint_effort_limits_; 103 | 104 | }; // class 105 | 106 | } // namespace 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /rrbot_hw/include/rrbot_hw/rrbot_hw_real.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2015, University of Colorado, Boulder 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of the Univ of CO, Boulder nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | *********************************************************************/ 34 | 35 | /* Author: Dave Coleman 36 | Desc: Example ros_control hardware interface that performs a perfect control loop for simulation 37 | */ 38 | 39 | #ifndef ROS_CONTROL__RRBOT_HARDWARE_INTERFACE_REAL_H 40 | #define ROS_CONTROL__RRBOT_HARDWARE_INTERFACE_REAL_H 41 | 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | 49 | // RRBOT hardware base class 50 | #include 51 | 52 | namespace rrbot_hw 53 | { 54 | 55 | // For simulation only - determines how fast a trajectory is followed 56 | static const double POSITION_STEP_FACTOR = 10; 57 | static const double VELOCITY_STEP_FACTOR = 10; 58 | 59 | /// \brief Hardware interface for a robot 60 | class RRBOTHardwareInterface: public rrbot_hw::RRBOTHardware 61 | { 62 | public: 63 | 64 | /// \brief Constructor. 65 | /// 66 | /// \param nh Node handle for topics. 67 | RRBOTHardwareInterface(ros::NodeHandle& nh); 68 | 69 | /// \brief Destructor. 70 | ~RRBOTHardwareInterface(); 71 | 72 | /// \brief Initialize the hardware interface 73 | void init(); 74 | 75 | /// \brief Timer event 76 | void update(const ros::TimerEvent& e); 77 | 78 | /// \brief Read the state from the robot hardware. 79 | void read(); 80 | 81 | /// \brief write the command to the robot hardware. 82 | void write(ros::Duration elapsed_time); 83 | 84 | protected: 85 | 86 | ros::NodeHandle nh_; 87 | 88 | // This is now in the base class 89 | /* 90 | // Interfaces 91 | hardware_interface::JointStateInterface joint_state_interface_; 92 | hardware_interface::PositionJointInterface position_joint_interface_; 93 | hardware_interface::VelocityJointInterface velocity_joint_interface_; 94 | hardware_interface::EffortJointInterface effort_joint_interface_; 95 | */ 96 | 97 | // Timing 98 | ros::Timer non_realtime_loop_; 99 | ros::Duration control_period_; 100 | ros::Duration elapsed_time_; 101 | double loop_hz_; 102 | 103 | // This is now in the base class 104 | /* 105 | // Shared memory 106 | std::vector joint_names_; 107 | std::vector joint_position_; 108 | std::vector joint_velocity_; 109 | std::vector joint_effort_; 110 | std::vector joint_position_command_; 111 | std::vector joint_velocity_command_; 112 | std::vector joint_effort_command_; 113 | int num_joints_; 114 | int joint_mode_; // position, velocity, or effort 115 | */ 116 | 117 | boost::shared_ptr controller_manager_; 118 | 119 | // Simulated controller 120 | double p_error_, v_error_, e_error_; 121 | 122 | }; // class 123 | 124 | } // namespace 125 | 126 | #endif 127 | -------------------------------------------------------------------------------- /rrbot_hw/include/rrbot_hw/rrbot_hw_sim.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2013, Open Source Robotics Foundation 5 | * Copyright (c) 2013, The Johns Hopkins University 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * * Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * * Neither the name of the Open Source Robotics Foundation 19 | * nor the names of its contributors may be 20 | * used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 26 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 27 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 29 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 33 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | * POSSIBILITY OF SUCH DAMAGE. 35 | *********************************************************************/ 36 | 37 | /* 38 | Author: Jonathon Brohen, Dave Coleman 39 | Desc: Plugin template for hardware interfaces for ros_control and Gazebo 40 | */ 41 | 42 | #ifndef __ROS_CONTROL_GAZEBO_RRBOT_HW_SIM_H 43 | #define __ROS_CONTROL_GAZEBO_RRBOT_HW_SIM_H 44 | 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | // RRBOT hardware base class 52 | #include 53 | 54 | namespace rrbot_hw { 55 | 56 | // Struct for passing loaded joint data 57 | struct JointData 58 | { 59 | std::string name_; 60 | std::string hardware_interface_; 61 | 62 | JointData(const std::string& name, const std::string& hardware_interface) : 63 | name_(name), 64 | hardware_interface_(hardware_interface) 65 | {} 66 | }; 67 | 68 | // Gazebo plugin version of RRBOTHardware 69 | class RRBOTHWSim : public rrbot_hw::RRBOTHardware 70 | { 71 | public: 72 | 73 | virtual ~RRBOTHWSim() { } 74 | 75 | virtual bool initSim( 76 | const std::string& robot_namespace, 77 | ros::NodeHandle model_nh, 78 | gazebo::physics::ModelPtr parent_model, 79 | const urdf::Model *const urdf_model, 80 | std::vector transmissions) = 0; 81 | 82 | virtual void readSim(ros::Time time, ros::Duration period) = 0; 83 | 84 | virtual void writeSim(ros::Time time, ros::Duration period) = 0; 85 | 86 | }; 87 | 88 | } 89 | 90 | #endif // ifndef __ROS_CONTROL_GAZEBO_RRBOT_HW_SIM_H 91 | -------------------------------------------------------------------------------- /rrbot_hw/include/rrbot_hw/rrbot_hw_sim_plugin.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2013, Open Source Robotics Foundation 5 | * Copyright (c) 2013, The Johns Hopkins University 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * * Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * * Neither the name of the Open Source Robotics Foundation 19 | * nor the names of its contributors may be 20 | * used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 26 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 27 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 29 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 33 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | * POSSIBILITY OF SUCH DAMAGE. 35 | *********************************************************************/ 36 | 37 | /* Author: Dave Coleman, Jonathan Bohren 38 | Desc: Gazebo plugin for ros_control that allows 'hardware_interfaces' to be plugged in 39 | using pluginlib 40 | */ 41 | 42 | // Boost 43 | #include 44 | #include 45 | 46 | // ROS 47 | #include 48 | #include 49 | 50 | // Gazebo 51 | #include 52 | #include 53 | #include 54 | 55 | // ros_control 56 | #include 57 | #include 58 | 59 | // Your model definition in simulation 60 | #include 61 | 62 | namespace rrbot_hw 63 | { 64 | 65 | class RRBOTGazeboPlugin : public gazebo::ModelPlugin 66 | { 67 | public: 68 | 69 | virtual ~RRBOTGazeboPlugin(); 70 | 71 | // Overloaded Gazebo entry point 72 | virtual void Load(gazebo::physics::ModelPtr parent, sdf::ElementPtr sdf); 73 | 74 | // Called by the world update start event 75 | void Update(); 76 | 77 | // Called on world reset 78 | virtual void Reset(); 79 | 80 | // Get the URDF XML from the parameter server 81 | std::string getURDF(std::string param_name) const; 82 | 83 | // Get Transmissions from the URDF 84 | bool parseTransmissionsFromURDF(const std::string& urdf_string); 85 | 86 | protected: 87 | 88 | // Node Handles 89 | ros::NodeHandle model_nh_; // namespaces to robot name 90 | 91 | // Pointer to the model 92 | gazebo::physics::ModelPtr parent_model_; 93 | sdf::ElementPtr sdf_; 94 | 95 | // deferred load in case ros is blocking 96 | boost::thread deferred_load_thread_; 97 | 98 | // Pointer to the update event connection 99 | gazebo::event::ConnectionPtr update_connection_; 100 | 101 | // Interface loader 102 | boost::shared_ptr > rrbot_hw_sim_loader_; 103 | void load_rrbot_hw_sim_srv(); // not used 104 | 105 | // Strings 106 | std::string robot_namespace_; 107 | std::string robot_description_; 108 | 109 | // Transmissions in this plugin's scope 110 | std::vector transmissions_; 111 | 112 | // Robot simulator interface 113 | std::string rrbot_hw_sim_type_str_; 114 | boost::shared_ptr rrbot_hw_sim_; 115 | 116 | // Controller manager 117 | boost::shared_ptr controller_manager_; 118 | 119 | // Timing 120 | ros::Duration control_period_; 121 | ros::Time last_update_sim_time_ros_; 122 | ros::Time last_write_sim_time_ros_; 123 | 124 | }; 125 | 126 | 127 | } 128 | -------------------------------------------------------------------------------- /rrbot_hw/launch/rrbot_hw.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /rrbot_hw/launch/rrbot_visualize.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /rrbot_hw/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rrbot_hw 4 | 0.0.1 5 | Provides the hardware definition and interfaces to real/sim devices 6 | 7 | 8 | 9 | Dave Coleman 10 | 11 | BSD 12 | 13 | https://github.com/davetcoleman/ros_control_boilerplate 14 | https://github.com/davetcoleman/ros_control_boilerplate/issues 15 | https://github.com/davetcoleman/ros_control_boilerplate/ 16 | 17 | Dave Coleman 18 | 19 | catkin 20 | 21 | hardware_interface 22 | controller_manager 23 | roscpp 24 | control_msgs 25 | trajectory_msgs 26 | actionlib 27 | pluginlib 28 | transmission_interface 29 | urdf 30 | control_toolbox 31 | joint_limits_interface 32 | gazebo_ros 33 | 34 | hardware_interface 35 | controller_manager 36 | ros_controllers 37 | rrbot_description 38 | roscpp 39 | control_msgs 40 | trajectory_msgs 41 | actionlib 42 | pluginlib 43 | transmission_interface 44 | urdf 45 | control_toolbox 46 | joint_limits_interface 47 | gazebo_ros 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /rrbot_hw/rrbot_hw_sim_plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | A default custom RRBOT simulation interface. 9 | 10 | 11 | -------------------------------------------------------------------------------- /rrbot_hw/src/default_rrbot_hw_sim.cpp: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2013, Open Source Robotics Foundation 5 | * Copyright (c) 2013, The Johns Hopkins University 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * * Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * * Neither the name of the Open Source Robotics Foundation 19 | * nor the names of its contributors may be 20 | * used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 26 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 27 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 29 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 33 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | * POSSIBILITY OF SUCH DAMAGE. 35 | *********************************************************************/ 36 | 37 | /* Author: Dave Coleman, Johnathan Bohren 38 | Desc: Hardware Interface for any simulated robot in Gazebo 39 | */ 40 | 41 | #ifndef _RRBOT_HW___DEFAULT_RRBOT_HW_SIM_H_ 42 | #define _RRBOT_HW___DEFAULT_RRBOT_HW_SIM_H_ 43 | 44 | // ros_control 45 | #include 46 | #include 47 | #include 48 | 49 | // Gazebo 50 | #include 51 | #include 52 | #include 53 | 54 | // ROS 55 | #include 56 | #include 57 | #include 58 | 59 | // URDF 60 | #include 61 | 62 | // RRBOT definition in simulation 63 | #include 64 | 65 | namespace 66 | { 67 | 68 | double clamp(const double val, const double min_val, const double max_val) 69 | { 70 | return std::min(std::max(val, min_val), max_val); 71 | } 72 | 73 | } 74 | 75 | namespace rrbot_hw 76 | { 77 | 78 | class DefaultRRBOTHWSim : public rrbot_hw::RRBOTHWSim 79 | { 80 | public: 81 | 82 | bool initSim( 83 | const std::string& robot_namespace, 84 | ros::NodeHandle model_nh, 85 | gazebo::physics::ModelPtr parent_model, 86 | const urdf::Model *const urdf_model, 87 | std::vector transmissions) 88 | { 89 | // getJointLimits() searches joint_limit_nh for joint limit parameters. The format of each 90 | // parameter's name is "joint_limits/". An example is "joint_limits/axle_joint". 91 | const ros::NodeHandle joint_limit_nh(model_nh, robot_namespace); 92 | 93 | // Resize vectors to our DOF 94 | num_joints_ = transmissions.size(); 95 | joint_names_.resize(num_joints_); 96 | joint_types_.resize(num_joints_); 97 | joint_lower_limits_.resize(num_joints_); 98 | joint_upper_limits_.resize(num_joints_); 99 | joint_effort_limits_.resize(num_joints_); 100 | joint_control_methods_.resize(num_joints_); 101 | pid_controllers_.resize(num_joints_); 102 | joint_position_.resize(num_joints_); 103 | joint_velocity_.resize(num_joints_); 104 | joint_effort_.resize(num_joints_); 105 | joint_effort_command_.resize(num_joints_); 106 | joint_position_command_.resize(num_joints_); 107 | joint_velocity_command_.resize(num_joints_); 108 | 109 | // Initialize values 110 | for(unsigned int j=0; j < num_joints_; j++) 111 | { 112 | // Check that this transmission has one joint 113 | if(transmissions[j].joints_.size() == 0) 114 | { 115 | ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim","Transmission " << transmissions[j].name_ 116 | << " has no associated joints."); 117 | continue; 118 | } 119 | else if(transmissions[j].joints_.size() > 1) 120 | { 121 | ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim","Transmission " << transmissions[j].name_ 122 | << " has more than one joint. Currently the default robot hardware simulation " 123 | << " interface only supports one."); 124 | continue; 125 | } 126 | 127 | std::vector joint_interfaces = transmissions[j].joints_[0].hardware_interfaces_; 128 | if (joint_interfaces.empty() && 129 | !(transmissions[j].actuators_.empty()) && 130 | !(transmissions[j].actuators_[0].hardware_interfaces_.empty())) 131 | { 132 | // TODO: Deprecate HW interface specification in actuators in ROS J 133 | joint_interfaces = transmissions[j].actuators_[0].hardware_interfaces_; 134 | ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim", "The element of tranmission " << 135 | transmissions[j].name_ << " should be nested inside the element, not . " << 136 | "The transmission will be properly loaded, but please update " << 137 | "your robot model to remain compatible with future versions of the plugin."); 138 | } 139 | if (joint_interfaces.empty()) 140 | { 141 | ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim", "Joint " << transmissions[j].joints_[0].name_ << 142 | " of transmission " << transmissions[j].name_ << " does not specify any hardware interface. " << 143 | "Not adding it to the robot hardware simulation."); 144 | continue; 145 | } 146 | else if (joint_interfaces.size() > 1) 147 | { 148 | ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim", "Joint " << transmissions[j].joints_[0].name_ << 149 | " of transmission " << transmissions[j].name_ << " specifies multiple hardware interfaces. " << 150 | "Currently the default robot hardware simulation interface only supports one."); 151 | continue; 152 | } 153 | 154 | // Add data from transmission 155 | joint_names_[j] = transmissions[j].joints_[0].name_; 156 | joint_position_[j] = 1.0; 157 | joint_velocity_[j] = 0.0; 158 | joint_effort_[j] = 1.0; // N/m for continuous joints 159 | joint_effort_command_[j] = 0.0; 160 | joint_position_command_[j] = 0.0; 161 | joint_velocity_command_[j] = 0.0; 162 | 163 | const std::string& hardware_interface = joint_interfaces.front(); 164 | 165 | // Debug 166 | // ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim","Loading joint '" << joint_names_[j] 167 | // << "' of type '" << hardware_interface << "'"); 168 | 169 | // Create joint state interface for all joints 170 | joint_state_interface_.registerHandle(hardware_interface::JointStateHandle( 171 | joint_names_[j], &joint_position_[j], &joint_velocity_[j], &joint_effort_[j])); 172 | 173 | // Decide what kind of command interface this actuator/joint has 174 | hardware_interface::JointHandle joint_handle; 175 | if(hardware_interface == "EffortJointInterface") 176 | { 177 | // Create effort joint interface 178 | joint_control_methods_[j] = EFFORT; 179 | joint_handle = hardware_interface::JointHandle(joint_state_interface_.getHandle(joint_names_[j]), 180 | &joint_effort_command_[j]); 181 | effort_joint_interface_.registerHandle(joint_handle); 182 | } 183 | else if(hardware_interface == "PositionJointInterface") 184 | { 185 | // Create position joint interface 186 | joint_control_methods_[j] = POSITION; 187 | joint_handle = hardware_interface::JointHandle(joint_state_interface_.getHandle(joint_names_[j]), 188 | &joint_position_command_[j]); 189 | position_joint_interface_.registerHandle(joint_handle); 190 | } 191 | else if(hardware_interface == "VelocityJointInterface") 192 | { 193 | // Create velocity joint interface 194 | joint_control_methods_[j] = VELOCITY; 195 | joint_handle = hardware_interface::JointHandle(joint_state_interface_.getHandle(joint_names_[j]), 196 | &joint_velocity_command_[j]); 197 | velocity_joint_interface_.registerHandle(joint_handle); 198 | } 199 | else 200 | { 201 | ROS_FATAL_STREAM_NAMED("default_rrbot_hw_sim","No matching hardware interface found for '" 202 | << hardware_interface ); 203 | return false; 204 | } 205 | 206 | // Get the gazebo joint that corresponds to the robot joint. 207 | // ROS_WARN_STREAM_NAMED("default_rrbot_hw_sim", "Getting pointer to gazebo joint: " 208 | // << joint_names_[j]); 209 | 210 | gazebo::physics::JointPtr joint = parent_model->GetJoint(joint_names_[j]); 211 | if (!joint) 212 | { 213 | ROS_ERROR_STREAM("This robot has a joint named \"" << joint_names_[j] 214 | << "\" which is not in the gazebo model."); 215 | return false; 216 | } 217 | sim_joints_.push_back(joint); 218 | 219 | registerJointLimits(joint_names_[j], joint_handle, joint_control_methods_[j], 220 | joint_limit_nh, urdf_model, 221 | &joint_types_[j], &joint_lower_limits_[j], &joint_upper_limits_[j], 222 | &joint_effort_limits_[j]); 223 | if (joint_control_methods_[j] != EFFORT) 224 | { 225 | // Initialize the PID controller. If no PID gain values are found, use joint->SetPosition() or 226 | // joint->SetVelocity() to control the joint. 227 | const ros::NodeHandle nh(model_nh, robot_namespace + "/rrbot_hw/pid_gains/" + 228 | joint_names_[j]); 229 | if (pid_controllers_[j].init(nh, true)) 230 | { 231 | switch (joint_control_methods_[j]) 232 | { 233 | case POSITION: 234 | joint_control_methods_[j] = POSITION_PID; 235 | break; 236 | case VELOCITY: 237 | joint_control_methods_[j] = VELOCITY_PID; 238 | break; 239 | } 240 | } 241 | else 242 | { 243 | // joint->SetMaxForce() must be called if joint->SetPosition() or joint->SetVelocity() are 244 | // going to be called. joint->SetMaxForce() must *not* be called if joint->SetForce() is 245 | // going to be called. 246 | joint->SetParam("fmax", 0, joint_effort_limits_[j]); 247 | } 248 | } 249 | } 250 | 251 | // Register interfaces 252 | registerInterface(&joint_state_interface_); 253 | registerInterface(&effort_joint_interface_); 254 | registerInterface(&position_joint_interface_); 255 | registerInterface(&velocity_joint_interface_); 256 | 257 | return true; 258 | } 259 | 260 | void readSim(ros::Time time, ros::Duration period) 261 | { 262 | for(unsigned int j=0; j < num_joints_; j++) 263 | { 264 | // Gazebo has an interesting API... 265 | if (joint_types_[j] == urdf::Joint::PRISMATIC) 266 | { 267 | joint_position_[j] = sim_joints_[j]->GetAngle(0).Radian(); 268 | } 269 | else 270 | { 271 | joint_position_[j] += angles::shortest_angular_distance(joint_position_[j], 272 | sim_joints_[j]->GetAngle(0).Radian()); 273 | } 274 | joint_velocity_[j] = sim_joints_[j]->GetVelocity(0); 275 | joint_effort_[j] = sim_joints_[j]->GetForce((unsigned int)(0)); 276 | } 277 | } 278 | 279 | void writeSim(ros::Time time, ros::Duration period) 280 | { 281 | effort_joint_saturation_interface_.enforceLimits(period); 282 | effort_joint_limits_interface_.enforceLimits(period); 283 | position_joint_saturation_interface_.enforceLimits(period); 284 | position_joint_limits_interface_.enforceLimits(period); 285 | velocity_joint_saturation_interface_.enforceLimits(period); 286 | velocity_joint_limits_interface_.enforceLimits(period); 287 | 288 | for(unsigned int j=0; j < num_joints_; j++) 289 | { 290 | switch (joint_control_methods_[j]) 291 | { 292 | case EFFORT: 293 | { 294 | const double effort = joint_effort_command_[j]; 295 | sim_joints_[j]->SetForce(0, effort); 296 | } 297 | break; 298 | 299 | case POSITION: 300 | #if GAZEBO_MAJOR_VERSION > 2 301 | sim_joints_[j]->SetPosition(0, joint_position_command_[j]); 302 | #else 303 | sim_joints_[j]->SetAngle(0, joint_position_command_[j]); 304 | #endif 305 | break; 306 | 307 | case POSITION_PID: 308 | { 309 | double error; 310 | switch (joint_types_[j]) 311 | { 312 | case urdf::Joint::REVOLUTE: 313 | angles::shortest_angular_distance_with_limits(joint_position_[j], 314 | joint_position_command_[j], 315 | joint_lower_limits_[j], 316 | joint_upper_limits_[j], 317 | error); 318 | break; 319 | case urdf::Joint::CONTINUOUS: 320 | error = angles::shortest_angular_distance(joint_position_[j], 321 | joint_position_command_[j]); 322 | break; 323 | default: 324 | error = joint_position_command_[j] - joint_position_[j]; 325 | } 326 | 327 | const double effort_limit = joint_effort_limits_[j]; 328 | const double effort = clamp(pid_controllers_[j].computeCommand(error, period), 329 | -effort_limit, effort_limit); 330 | sim_joints_[j]->SetForce(0, effort); 331 | } 332 | break; 333 | 334 | case VELOCITY: 335 | sim_joints_[j]->SetVelocity(0, joint_velocity_command_[j]); 336 | break; 337 | 338 | case VELOCITY_PID: 339 | const double error = joint_velocity_command_[j] - joint_velocity_[j]; 340 | const double effort_limit = joint_effort_limits_[j]; 341 | const double effort = clamp(pid_controllers_[j].computeCommand(error, period), 342 | -effort_limit, effort_limit); 343 | sim_joints_[j]->SetForce(0, effort); 344 | break; 345 | } 346 | } 347 | } 348 | 349 | private: 350 | // Methods used to control a joint. 351 | enum ControlMethod {EFFORT, POSITION, POSITION_PID, VELOCITY, VELOCITY_PID}; 352 | 353 | // Register the limits of the joint specified by joint_name and joint_handle. The limits are 354 | // retrieved from joint_limit_nh. If urdf_model is not NULL, limits are retrieved from it also. 355 | // Return the joint's type, lower position limit, upper position limit, and effort limit. 356 | void registerJointLimits(const std::string& joint_name, 357 | const hardware_interface::JointHandle& joint_handle, 358 | const ControlMethod ctrl_method, 359 | const ros::NodeHandle& joint_limit_nh, 360 | const urdf::Model *const urdf_model, 361 | int *const joint_type, double *const lower_limit, 362 | double *const upper_limit, double *const effort_limit) 363 | { 364 | *joint_type = urdf::Joint::UNKNOWN; 365 | *lower_limit = -std::numeric_limits::max(); 366 | *upper_limit = std::numeric_limits::max(); 367 | *effort_limit = std::numeric_limits::max(); 368 | 369 | joint_limits_interface::JointLimits limits; 370 | bool has_limits = false; 371 | joint_limits_interface::SoftJointLimits soft_limits; 372 | bool has_soft_limits = false; 373 | 374 | if (urdf_model != NULL) 375 | { 376 | const boost::shared_ptr urdf_joint = urdf_model->getJoint(joint_name); 377 | if (urdf_joint != NULL) 378 | { 379 | *joint_type = urdf_joint->type; 380 | // Get limits from the URDF file. 381 | if (joint_limits_interface::getJointLimits(urdf_joint, limits)) 382 | has_limits = true; 383 | if (joint_limits_interface::getSoftJointLimits(urdf_joint, soft_limits)) 384 | has_soft_limits = true; 385 | } 386 | } 387 | // Get limits from the parameter server. 388 | if (joint_limits_interface::getJointLimits(joint_name, joint_limit_nh, limits)) 389 | has_limits = true; 390 | 391 | if (!has_limits) 392 | return; 393 | 394 | if (*joint_type == urdf::Joint::UNKNOWN) 395 | { 396 | // Infer the joint type. 397 | 398 | if (limits.has_position_limits) 399 | { 400 | *joint_type = urdf::Joint::REVOLUTE; 401 | } 402 | else 403 | { 404 | if (limits.angle_wraparound) 405 | *joint_type = urdf::Joint::CONTINUOUS; 406 | else 407 | *joint_type = urdf::Joint::PRISMATIC; 408 | } 409 | } 410 | 411 | if (limits.has_position_limits) 412 | { 413 | *lower_limit = limits.min_position; 414 | *upper_limit = limits.max_position; 415 | } 416 | if (limits.has_effort_limits) 417 | *effort_limit = limits.max_effort; 418 | 419 | if (has_soft_limits) 420 | { 421 | switch (ctrl_method) 422 | { 423 | case EFFORT: 424 | { 425 | const joint_limits_interface::EffortJointSoftLimitsHandle 426 | limits_handle(joint_handle, limits, soft_limits); 427 | effort_joint_limits_interface_.registerHandle(limits_handle); 428 | } 429 | break; 430 | case POSITION: 431 | { 432 | const joint_limits_interface::PositionJointSoftLimitsHandle 433 | limits_handle(joint_handle, limits, soft_limits); 434 | position_joint_limits_interface_.registerHandle(limits_handle); 435 | } 436 | break; 437 | case VELOCITY: 438 | { 439 | const joint_limits_interface::VelocityJointSoftLimitsHandle 440 | limits_handle(joint_handle, limits, soft_limits); 441 | velocity_joint_limits_interface_.registerHandle(limits_handle); 442 | } 443 | break; 444 | } 445 | } 446 | else 447 | { 448 | switch (ctrl_method) 449 | { 450 | case EFFORT: 451 | { 452 | const joint_limits_interface::EffortJointSaturationHandle 453 | sat_handle(joint_handle, limits); 454 | effort_joint_saturation_interface_.registerHandle(sat_handle); 455 | } 456 | break; 457 | case POSITION: 458 | { 459 | const joint_limits_interface::PositionJointSaturationHandle 460 | sat_handle(joint_handle, limits); 461 | position_joint_saturation_interface_.registerHandle(sat_handle); 462 | } 463 | break; 464 | case VELOCITY: 465 | { 466 | const joint_limits_interface::VelocityJointSaturationHandle 467 | sat_handle(joint_handle, limits); 468 | velocity_joint_saturation_interface_.registerHandle(sat_handle); 469 | } 470 | break; 471 | } 472 | } 473 | } 474 | 475 | /* 476 | This part is now in the base class since it is the same for real and sim interfaces 477 | unsigned int num_joints_; 478 | */ 479 | /* 480 | hardware_interface::JointStateInterface joint_state_interface_; 481 | hardware_interface::EffortJointInterface effort_joint_interface_; 482 | hardware_interface::PositionJointInterface position_joint_interface_; 483 | hardware_interface::VelocityJointInterface velocity_joint_interface_; 484 | 485 | joint_limits_interface::EffortJointSaturationInterface effort_joint_saturation_interface_; 486 | joint_limits_interface::EffortJointSoftLimitsInterface effort_joint_limits_interface_; 487 | joint_limits_interface::PositionJointSaturationInterface position_joint_saturation_interface_; 488 | joint_limits_interface::PositionJointSoftLimitsInterface position_joint_limits_interface_; 489 | joint_limits_interface::VelocityJointSaturationInterface velocity_joint_saturation_interface_; 490 | joint_limits_interface::VelocityJointSoftLimitsInterface velocity_joint_limits_interface_; 491 | 492 | std::vector joint_names_; 493 | std::vector joint_types_; 494 | std::vector joint_lower_limits_; 495 | std::vector joint_upper_limits_; 496 | std::vector joint_effort_limits_; 497 | std::vector joint_position_; 498 | std::vector joint_velocity_; 499 | std::vector joint_effort_; 500 | std::vector joint_effort_command_; 501 | std::vector joint_position_command_; 502 | std::vector joint_velocity_command_; 503 | */ 504 | 505 | // but this, eventhough it can be useful in a real interface as well 506 | // so it might be useful to have it in the base class 507 | std::vector joint_control_methods_; 508 | std::vector pid_controllers_; 509 | 510 | std::vector sim_joints_; 511 | 512 | }; 513 | 514 | typedef boost::shared_ptr DefaultRRBOTHWSimPtr; 515 | 516 | } 517 | 518 | PLUGINLIB_EXPORT_CLASS(rrbot_hw::DefaultRRBOTHWSim, rrbot_hw::RRBOTHWSim) 519 | 520 | #endif // #ifndef __RRBOT_HW____PLUGIN_DEFAULT_RRBOT_HW_SIM_H_ 521 | -------------------------------------------------------------------------------- /rrbot_hw/src/rrbot_hw_real.cpp: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2015, University of Colorado, Boulder 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of the Univ of CO, Boulder nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | *********************************************************************/ 34 | 35 | /* Author: Dave Coleman 36 | Desc: 37 | */ 38 | 39 | #include 40 | 41 | namespace rrbot_hw 42 | { 43 | 44 | RRBOTHardwareInterface::RRBOTHardwareInterface(ros::NodeHandle& nh) 45 | : nh_(nh) 46 | { 47 | // Initialize shared memory and interfaces 48 | init(); 49 | 50 | // Create the controller manager 51 | controller_manager_.reset(new controller_manager::ControllerManager(this, nh_)); 52 | 53 | // Get period and create timer 54 | nh_.param("hardware_interface/loop_hz", loop_hz_, 0.1); 55 | ROS_DEBUG_STREAM_NAMED("constructor","Using loop freqency of " << loop_hz_ << " hz"); 56 | ros::Duration update_freq = ros::Duration(1.0/loop_hz_); 57 | non_realtime_loop_ = nh_.createTimer(update_freq, &RRBOTHardwareInterface::update, this); 58 | 59 | ROS_INFO_NAMED("hardware_interface", "Loaded generic_hardware_interface."); 60 | } 61 | 62 | RRBOTHardwareInterface::~RRBOTHardwareInterface() 63 | { 64 | } 65 | 66 | void RRBOTHardwareInterface::init() 67 | { 68 | 69 | joint_mode_ = 1; // ONLY POSITION FOR NOW 70 | // Get joint names 71 | nh_.getParam("hardware_interface/joints", joint_names_); 72 | if (joint_names_.size() == 0) 73 | { 74 | ROS_FATAL_STREAM_NAMED("init","Not joints found on parameter server for controller, did you load the proper yaml file?"); 75 | } 76 | num_joints_ = joint_names_.size(); 77 | 78 | // Resize vectors 79 | joint_position_.resize(num_joints_); 80 | joint_velocity_.resize(num_joints_); 81 | joint_effort_.resize(num_joints_); 82 | joint_position_command_.resize(num_joints_); 83 | joint_velocity_command_.resize(num_joints_); 84 | joint_effort_command_.resize(num_joints_); 85 | 86 | // Initialize controller 87 | for (int i = 0; i < num_joints_; ++i) 88 | { 89 | ROS_DEBUG_STREAM_NAMED("constructor","Loading joint name: " << joint_names_[i]); 90 | 91 | // Create joint state interface 92 | joint_state_interface_.registerHandle(hardware_interface::JointStateHandle(joint_names_[i], &joint_position_[i], &joint_velocity_[i], &joint_effort_[i])); 93 | 94 | // Create position joint interface 95 | position_joint_interface_.registerHandle(hardware_interface::JointHandle( 96 | joint_state_interface_.getHandle(joint_names_[i]),&joint_position_command_[i])); 97 | 98 | // Create velocity joint interface 99 | //velocity_joint_interface_.registerHandle(hardware_interface::JointHandle( 100 | // joint_state_interface_.getHandle(joint_names_[i]),&joint_velocity_command_[i])); 101 | 102 | // Create effort joint interface 103 | //effort_joint_interface_.registerHandle(hardware_interface::JointHandle( 104 | // joint_state_interface_.getHandle(joint_names_[i]),&joint_effort_command_[i])); 105 | 106 | } 107 | registerInterface(&joint_state_interface_); // From RobotHW base class. 108 | registerInterface(&position_joint_interface_); // From RobotHW base class. 109 | registerInterface(&velocity_joint_interface_); // From RobotHW base class. 110 | registerInterface(&effort_joint_interface_); // From RobotHW base class. 111 | } 112 | 113 | void RRBOTHardwareInterface::update(const ros::TimerEvent& e) 114 | { 115 | elapsed_time_ = ros::Duration(e.current_real - e.last_real); 116 | 117 | // Input 118 | read(); 119 | 120 | // Control 121 | controller_manager_->update(ros::Time::now(), elapsed_time_); 122 | 123 | // Output 124 | write(elapsed_time_); 125 | } 126 | 127 | void RRBOTHardwareInterface::read() 128 | { 129 | // Read the joint states from your hardware here 130 | } 131 | 132 | void RRBOTHardwareInterface::write(ros::Duration elapsed_time) 133 | { 134 | // Send commands in different modes 135 | 136 | // Move all the states to the commanded set points slowly 137 | for (std::size_t i = 0; i < num_joints_; ++i) 138 | { 139 | switch (joint_mode_) 140 | { 141 | case 1: //hardware_interface::MODE_POSITION: 142 | // Position 143 | p_error_ = joint_position_command_[i] - joint_position_[i]; 144 | // scale the rate it takes to achieve position by a factor that is invariant to the feedback loop 145 | joint_position_[i] += p_error_ * POSITION_STEP_FACTOR / loop_hz_; 146 | break; 147 | 148 | case 2: //hardware_interface::MODE_VELOCITY: 149 | // Position 150 | joint_position_[i] += joint_velocity_[i] * elapsed_time.toSec(); 151 | 152 | // Velocity 153 | v_error_ = joint_velocity_command_[i] - joint_velocity_[i]; 154 | // scale the rate it takes to achieve velocity by a factor that is invariant to the feedback loop 155 | joint_velocity_[i] += v_error_ * VELOCITY_STEP_FACTOR / loop_hz_; 156 | break; 157 | 158 | case 3: //hardware_interface::MODE_EFFORT: 159 | ROS_ERROR_STREAM_NAMED("write","Effort not implemented yet"); 160 | break; 161 | } 162 | } 163 | } 164 | 165 | 166 | } // namespace 167 | -------------------------------------------------------------------------------- /rrbot_hw/src/rrbot_hw_real_node.cpp: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2015, University of Colorado, Boulder 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of the Univ of CO, Boulder nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | *********************************************************************/ 34 | 35 | /* Author: Dave Coleman 36 | Desc: Example ros_control hardware interface that performs a perfect control loop for simulation 37 | */ 38 | 39 | #include 40 | 41 | int main(int argc, char** argv) 42 | { 43 | ros::init(argc, argv, "rrbot_hw_real"); 44 | ros::NodeHandle nh; 45 | 46 | // NOTE: We run the ROS loop in a separate thread as external calls such 47 | // as service callbacks to load controllers can block the (main) control loop 48 | ros::AsyncSpinner spinner(1); 49 | spinner.start(); 50 | 51 | rrbot_hw::RRBOTHardwareInterface rrbot(nh); 52 | 53 | ros::spin(); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /rrbot_hw/src/rrbot_hw_sim_plugin.cpp: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2013, Open Source Robotics Foundation 5 | * Copyright (c) 2013, The Johns Hopkins University 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * * Redistributions in binary form must reproduce the above 15 | * copyright notice, this list of conditions and the following 16 | * disclaimer in the documentation and/or other materials provided 17 | * with the distribution. 18 | * * Neither the name of the Open Source Robotics Foundation 19 | * nor the names of its contributors may be 20 | * used to endorse or promote products derived 21 | * from this software without specific prior written permission. 22 | * 23 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 26 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 27 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 29 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 33 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | * POSSIBILITY OF SUCH DAMAGE. 35 | *********************************************************************/ 36 | 37 | /* Author: Dave Coleman, Jonathan Bohren 38 | Desc: Gazebo plugin for ros_control that allows 'hardware_interfaces' to be plugged in 39 | using pluginlib 40 | */ 41 | 42 | // Boost 43 | #include 44 | 45 | #include 46 | #include 47 | 48 | namespace rrbot_hw 49 | { 50 | 51 | RRBOTGazeboPlugin::~RRBOTGazeboPlugin() 52 | { 53 | // Disconnect from gazebo events 54 | gazebo::event::Events::DisconnectWorldUpdateBegin(update_connection_); 55 | } 56 | 57 | // Overloaded Gazebo entry point 58 | void RRBOTGazeboPlugin::Load(gazebo::physics::ModelPtr parent, sdf::ElementPtr sdf) 59 | { 60 | ROS_INFO_STREAM_NAMED("rrbot_hw","Loading rrbot_hw plugin"); 61 | 62 | 63 | // Save pointers to the model 64 | parent_model_ = parent; 65 | sdf_ = sdf; 66 | 67 | // Error message if the model couldn't be found 68 | if (!parent_model_) 69 | { 70 | ROS_ERROR_STREAM_NAMED("loadThread","parent model is NULL"); 71 | return; 72 | } 73 | 74 | // Check that ROS has been initialized 75 | if(!ros::isInitialized()) 76 | { 77 | ROS_FATAL_STREAM_NAMED("rrbot_hw","A ROS node for Gazebo has not been initialized, unable to load plugin. " 78 | << "Load the Gazebo system plugin 'libgazebo_ros_api_plugin.so' in the gazebo_ros package)"); 79 | return; 80 | } 81 | 82 | // Get namespace for nodehandle 83 | if(sdf_->HasElement("robotNamespace")) 84 | { 85 | robot_namespace_ = sdf_->GetElement("robotNamespace")->Get(); 86 | } 87 | else 88 | { 89 | robot_namespace_ = parent_model_->GetName(); // default 90 | } 91 | 92 | // Get robot_description ROS param name 93 | if (sdf_->HasElement("robotParam")) 94 | { 95 | robot_description_ = sdf_->GetElement("robotParam")->Get(); 96 | } 97 | else 98 | { 99 | robot_description_ = "robot_description"; // default 100 | } 101 | 102 | // Get the robot simulation interface type 103 | if(sdf_->HasElement("robotSimType")) 104 | { 105 | rrbot_hw_sim_type_str_ = sdf_->Get("robotSimType"); 106 | } 107 | else 108 | { 109 | rrbot_hw_sim_type_str_ = "rrbot_hw/DefaultRRBOTHWSim"; 110 | ROS_DEBUG_STREAM_NAMED("loadThread","Using default plugin for RRBOTHWSim (none specified in URDF/SDF)\""<GetWorld()->GetPhysicsEngine()->GetMaxStepSize()); 115 | 116 | // Decide the plugin control period 117 | if(sdf_->HasElement("controlPeriod")) 118 | { 119 | control_period_ = ros::Duration(sdf_->Get("controlPeriod")); 120 | 121 | // Check the period against the simulation period 122 | if( control_period_ < gazebo_period ) 123 | { 124 | ROS_ERROR_STREAM_NAMED("rrbot_hw","Desired controller update period ("< gazebo_period ) 128 | { 129 | ROS_WARN_STREAM_NAMED("rrbot_hw","Desired controller update period ("< 160 | ("rrbot_hw", 161 | "rrbot_hw::RRBOTHWSim")); 162 | 163 | rrbot_hw_sim_ = rrbot_hw_sim_loader_->createInstance(rrbot_hw_sim_type_str_); 164 | urdf::Model urdf_model; 165 | const urdf::Model *const urdf_model_ptr = urdf_model.initString(urdf_string) ? &urdf_model : NULL; 166 | 167 | if(!rrbot_hw_sim_->initSim(robot_namespace_, model_nh_, parent_model_, urdf_model_ptr, transmissions_)) 168 | { 169 | ROS_FATAL_NAMED("rrbot_hw","Could not initialize robot simulation interface"); 170 | return; 171 | } 172 | 173 | // Create the controller manager 174 | ROS_DEBUG_STREAM_NAMED("rrbot_hw_sim_plugin","Loading controller_manager"); 175 | controller_manager_.reset 176 | (new controller_manager::ControllerManager(rrbot_hw_sim_.get(), model_nh_)); 177 | 178 | // Listen to the update event. This event is broadcast every simulation iteration. 179 | update_connection_ = 180 | gazebo::event::Events::ConnectWorldUpdateBegin 181 | (boost::bind(&RRBOTGazeboPlugin::Update, this)); 182 | 183 | } 184 | catch(pluginlib::LibraryLoadException &ex) 185 | { 186 | ROS_FATAL_STREAM_NAMED("rrbot_hw","Failed to create robot simulation interface loader: "<GetWorld()->GetSimTime(); 197 | ros::Time sim_time_ros(gz_time_now.sec, gz_time_now.nsec); 198 | ros::Duration sim_period = sim_time_ros - last_update_sim_time_ros_; 199 | 200 | // Check if we should update the controllers 201 | if(sim_period >= control_period_) { 202 | // Store this simulation time 203 | last_update_sim_time_ros_ = sim_time_ros; 204 | 205 | // Update the robot simulation with the state of the gazebo model 206 | rrbot_hw_sim_->readSim(sim_time_ros, sim_period); 207 | 208 | // Compute the controller commands 209 | controller_manager_->update(sim_time_ros, sim_period); 210 | } 211 | 212 | // Update the gazebo model with the result of the controller 213 | // computation 214 | rrbot_hw_sim_->writeSim(sim_time_ros, sim_time_ros - last_write_sim_time_ros_); 215 | last_write_sim_time_ros_ = sim_time_ros; 216 | } 217 | 218 | // Called on world reset 219 | void RRBOTGazeboPlugin::Reset() 220 | { 221 | // Reset timing variables to not pass negative update periods to controllers on world reset 222 | last_update_sim_time_ros_ = ros::Time(); 223 | last_write_sim_time_ros_ = ros::Time(); 224 | } 225 | 226 | // Get the URDF XML from the parameter server 227 | std::string RRBOTGazeboPlugin::getURDF(std::string param_name) const 228 | { 229 | std::string urdf_string; 230 | 231 | // search and wait for robot_description on param server 232 | while (urdf_string.empty()) 233 | { 234 | std::string search_param_name; 235 | if (model_nh_.searchParam(param_name, search_param_name)) 236 | { 237 | ROS_INFO_ONCE_NAMED("rrbot_hw", "rrbot_hw plugin is waiting for model" 238 | " URDF in parameter [%s] on the ROS param server.", search_param_name.c_str()); 239 | 240 | model_nh_.getParam(search_param_name, urdf_string); 241 | } 242 | else 243 | { 244 | ROS_INFO_ONCE_NAMED("rrbot_hw", "rrbot_hw plugin is waiting for model" 245 | " URDF in parameter [%s] on the ROS param server.", robot_description_.c_str()); 246 | 247 | model_nh_.getParam(param_name, urdf_string); 248 | } 249 | 250 | usleep(100000); 251 | } 252 | ROS_DEBUG_STREAM_NAMED("rrbot_hw", "Recieved urdf from param server, parsing..."); 253 | 254 | return urdf_string; 255 | } 256 | 257 | // Get Transmissions from the URDF 258 | bool RRBOTGazeboPlugin::parseTransmissionsFromURDF(const std::string& urdf_string) 259 | { 260 | transmission_interface::TransmissionParser::parse(urdf_string, transmissions_); 261 | 262 | // This is my fix to allow multiple robots, it requires changes in the transmission_interface 263 | /* 264 | std::vector::iterator it = transmissions_.begin(); 265 | for(; it != transmissions_.end(); ) 266 | { 267 | if (robot_namespace_.compare(it->robot_namespace_) != 0) 268 | { 269 | ROS_WARN_STREAM_NAMED("rrbot_hw", "rrbot_hw plugin deleted transmission " 270 | << it->name_ 271 | << " because it is not in the same robotNamespace as this plugin. This might be normal in a multi-robot configuration though."); 272 | it = transmissions_.erase(it); 273 | } 274 | else 275 | { 276 | ++it; 277 | } 278 | } 279 | */ 280 | return true; 281 | } 282 | 283 | 284 | // Register this plugin with the simulator 285 | GZ_REGISTER_MODEL_PLUGIN(RRBOTGazeboPlugin); 286 | } // namespace 287 | -------------------------------------------------------------------------------- /rrbot_launch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot_launch) 3 | 4 | ## Find catkin macros and libraries 5 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 6 | ## is used, also find other catkin packages 7 | find_package(catkin REQUIRED) 8 | 9 | ## System dependencies are found with CMake's conventions 10 | # find_package(Boost REQUIRED COMPONENTS system) 11 | 12 | 13 | ## Uncomment this if the package has a setup.py. This macro ensures 14 | ## modules and global scripts declared therein get installed 15 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 16 | # catkin_python_setup() 17 | 18 | ################################################ 19 | ## Declare ROS messages, services and actions ## 20 | ################################################ 21 | 22 | ## To declare and build messages, services or actions from within this 23 | ## package, follow these steps: 24 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 25 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 26 | ## * In the file package.xml: 27 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 28 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been 29 | ## pulled in transitively but can be declared for certainty nonetheless: 30 | ## * add a build_depend tag for "message_generation" 31 | ## * add a run_depend tag for "message_runtime" 32 | ## * In this file (CMakeLists.txt): 33 | ## * add "message_generation" and every package in MSG_DEP_SET to 34 | ## find_package(catkin REQUIRED COMPONENTS ...) 35 | ## * add "message_runtime" and every package in MSG_DEP_SET to 36 | ## catkin_package(CATKIN_DEPENDS ...) 37 | ## * uncomment the add_*_files sections below as needed 38 | ## and list every .msg/.srv/.action file to be processed 39 | ## * uncomment the generate_messages entry below 40 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 41 | 42 | ## Generate messages in the 'msg' folder 43 | # add_message_files( 44 | # FILES 45 | # Message1.msg 46 | # Message2.msg 47 | # ) 48 | 49 | ## Generate services in the 'srv' folder 50 | # add_service_files( 51 | # FILES 52 | # Service1.srv 53 | # Service2.srv 54 | # ) 55 | 56 | ## Generate actions in the 'action' folder 57 | # add_action_files( 58 | # FILES 59 | # Action1.action 60 | # Action2.action 61 | # ) 62 | 63 | ## Generate added messages and services with any dependencies listed here 64 | # generate_messages( 65 | # DEPENDENCIES 66 | # std_msgs # Or other packages containing msgs 67 | # ) 68 | 69 | ################################### 70 | ## catkin specific configuration ## 71 | ################################### 72 | ## The catkin_package macro generates cmake config files for your package 73 | ## Declare things to be passed to dependent projects 74 | ## INCLUDE_DIRS: uncomment this if you package contains header files 75 | ## LIBRARIES: libraries you create in this project that dependent projects also need 76 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 77 | ## DEPENDS: system dependencies of this project that dependent projects also need 78 | catkin_package( 79 | # INCLUDE_DIRS include 80 | # LIBRARIES rrbot_launch 81 | # CATKIN_DEPENDS other_catkin_pkg 82 | # DEPENDS system_lib 83 | ) 84 | 85 | ########### 86 | ## Build ## 87 | ########### 88 | 89 | ## Specify additional locations of header files 90 | ## Your package locations should be listed before other locations 91 | # include_directories(include) 92 | 93 | ## Declare a cpp library 94 | # add_library(rrbot_launch 95 | # src/${PROJECT_NAME}/rrbot_launch.cpp 96 | # ) 97 | 98 | ## Declare a cpp executable 99 | # add_executable(rrbot_launch_node src/rrbot_launch_node.cpp) 100 | 101 | ## Add cmake target dependencies of the executable/library 102 | ## as an example, message headers may need to be generated before nodes 103 | # add_dependencies(rrbot_launch_node rrbot_launch_generate_messages_cpp) 104 | 105 | ## Specify libraries to link a library or executable target against 106 | # target_link_libraries(rrbot_launch_node 107 | # ${catkin_LIBRARIES} 108 | # ) 109 | 110 | ############# 111 | ## Install ## 112 | ############# 113 | 114 | # all install targets should use catkin DESTINATION variables 115 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 116 | 117 | ## Mark executable scripts (Python etc.) for installation 118 | ## in contrast to setup.py, you can choose the destination 119 | # install(PROGRAMS 120 | # scripts/my_python_script 121 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 122 | # ) 123 | 124 | ## Mark executables and/or libraries for installation 125 | # install(TARGETS rrbot_launch rrbot_launch_node 126 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 127 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 128 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 129 | # ) 130 | 131 | ## Mark cpp header files for installation 132 | # install(DIRECTORY include/${PROJECT_NAME}/ 133 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 134 | # FILES_MATCHING PATTERN "*.h" 135 | # PATTERN ".svn" EXCLUDE 136 | # ) 137 | 138 | ## Mark other files for installation (e.g. launch and bag files, etc.) 139 | # install(FILES 140 | # # myfile1 141 | # # myfile2 142 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 143 | # ) 144 | 145 | ############# 146 | ## Testing ## 147 | ############# 148 | 149 | ## Add gtest based cpp test target and link libraries 150 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_rrbot_launch.cpp) 151 | # if(TARGET ${PROJECT_NAME}-test) 152 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 153 | # endif() 154 | 155 | ## Add folders to be run by python nosetests 156 | # catkin_add_nosetests(test) 157 | -------------------------------------------------------------------------------- /rrbot_launch/README.md: -------------------------------------------------------------------------------- 1 | Just a launch-based package, something like the GUI of the meta-package, or the LUI (Launch User Inteface). -------------------------------------------------------------------------------- /rrbot_launch/launch/bringupRRBOT.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 | [single_rrbot/joint_states] 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 | 68 | 69 | 70 | 71 | 72 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /rrbot_launch/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rrbot_launch 4 | 0.0.0 5 | The rrbot_launch package 6 | 7 | 8 | 9 | 10 | crosales 11 | 12 | 13 | 14 | 15 | 16 | TODO 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 | catkin 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /rrbot_transmission/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(rrbot_transmission) 3 | 4 | ## Find catkin macros and libraries 5 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 6 | ## is used, also find other catkin packages 7 | find_package(catkin REQUIRED) 8 | 9 | ## System dependencies are found with CMake's conventions 10 | # find_package(Boost REQUIRED COMPONENTS system) 11 | 12 | 13 | ## Uncomment this if the package has a setup.py. This macro ensures 14 | ## modules and global scripts declared therein get installed 15 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 16 | # catkin_python_setup() 17 | 18 | ################################################ 19 | ## Declare ROS messages, services and actions ## 20 | ################################################ 21 | 22 | ## To declare and build messages, services or actions from within this 23 | ## package, follow these steps: 24 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 25 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 26 | ## * In the file package.xml: 27 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 28 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been 29 | ## pulled in transitively but can be declared for certainty nonetheless: 30 | ## * add a build_depend tag for "message_generation" 31 | ## * add a run_depend tag for "message_runtime" 32 | ## * In this file (CMakeLists.txt): 33 | ## * add "message_generation" and every package in MSG_DEP_SET to 34 | ## find_package(catkin REQUIRED COMPONENTS ...) 35 | ## * add "message_runtime" and every package in MSG_DEP_SET to 36 | ## catkin_package(CATKIN_DEPENDS ...) 37 | ## * uncomment the add_*_files sections below as needed 38 | ## and list every .msg/.srv/.action file to be processed 39 | ## * uncomment the generate_messages entry below 40 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 41 | 42 | ## Generate messages in the 'msg' folder 43 | # add_message_files( 44 | # FILES 45 | # Message1.msg 46 | # Message2.msg 47 | # ) 48 | 49 | ## Generate services in the 'srv' folder 50 | # add_service_files( 51 | # FILES 52 | # Service1.srv 53 | # Service2.srv 54 | # ) 55 | 56 | ## Generate actions in the 'action' folder 57 | # add_action_files( 58 | # FILES 59 | # Action1.action 60 | # Action2.action 61 | # ) 62 | 63 | ## Generate added messages and services with any dependencies listed here 64 | # generate_messages( 65 | # DEPENDENCIES 66 | # std_msgs # Or other packages containing msgs 67 | # ) 68 | 69 | ################################### 70 | ## catkin specific configuration ## 71 | ################################### 72 | ## The catkin_package macro generates cmake config files for your package 73 | ## Declare things to be passed to dependent projects 74 | ## INCLUDE_DIRS: uncomment this if you package contains header files 75 | ## LIBRARIES: libraries you create in this project that dependent projects also need 76 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 77 | ## DEPENDS: system dependencies of this project that dependent projects also need 78 | catkin_package( 79 | # INCLUDE_DIRS include 80 | # LIBRARIES rrbot_transmission 81 | # CATKIN_DEPENDS other_catkin_pkg 82 | # DEPENDS system_lib 83 | ) 84 | 85 | ########### 86 | ## Build ## 87 | ########### 88 | 89 | ## Specify additional locations of header files 90 | ## Your package locations should be listed before other locations 91 | # include_directories(include) 92 | 93 | ## Declare a cpp library 94 | # add_library(rrbot_transmission 95 | # src/${PROJECT_NAME}/rrbot_transmission.cpp 96 | # ) 97 | 98 | ## Declare a cpp executable 99 | # add_executable(rrbot_transmission_node src/rrbot_transmission_node.cpp) 100 | 101 | ## Add cmake target dependencies of the executable/library 102 | ## as an example, message headers may need to be generated before nodes 103 | # add_dependencies(rrbot_transmission_node rrbot_transmission_generate_messages_cpp) 104 | 105 | ## Specify libraries to link a library or executable target against 106 | # target_link_libraries(rrbot_transmission_node 107 | # ${catkin_LIBRARIES} 108 | # ) 109 | 110 | ############# 111 | ## Install ## 112 | ############# 113 | 114 | # all install targets should use catkin DESTINATION variables 115 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 116 | 117 | ## Mark executable scripts (Python etc.) for installation 118 | ## in contrast to setup.py, you can choose the destination 119 | # install(PROGRAMS 120 | # scripts/my_python_script 121 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 122 | # ) 123 | 124 | ## Mark executables and/or libraries for installation 125 | # install(TARGETS rrbot_transmission rrbot_transmission_node 126 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 127 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 128 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 129 | # ) 130 | 131 | ## Mark cpp header files for installation 132 | # install(DIRECTORY include/${PROJECT_NAME}/ 133 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 134 | # FILES_MATCHING PATTERN "*.h" 135 | # PATTERN ".svn" EXCLUDE 136 | # ) 137 | 138 | ## Mark other files for installation (e.g. launch and bag files, etc.) 139 | # install(FILES 140 | # # myfile1 141 | # # myfile2 142 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 143 | # ) 144 | 145 | ############# 146 | ## Testing ## 147 | ############# 148 | 149 | ## Add gtest based cpp test target and link libraries 150 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_rrbot_transmission.cpp) 151 | # if(TARGET ${PROJECT_NAME}-test) 152 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 153 | # endif() 154 | 155 | ## Add folders to be run by python nosetests 156 | # catkin_add_nosetests(test) 157 | -------------------------------------------------------------------------------- /rrbot_transmission/README.md: -------------------------------------------------------------------------------- 1 | In case you want to develop custom transmissions to extend what transmission_interface offers. -------------------------------------------------------------------------------- /rrbot_transmission/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rrbot_transmission 4 | 0.0.0 5 | The rrbot_transmission package 6 | 7 | 8 | 9 | 10 | crosales 11 | 12 | 13 | 14 | 15 | 16 | TODO 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 | catkin 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/.setup_assistant: -------------------------------------------------------------------------------- 1 | moveit_setup_assistant_config: 2 | URDF: 3 | package: rrbot_description 4 | relative_path: robots/single_rrbot.urdf.xacro 5 | SRDF: 6 | relative_path: config/single_rrbot.srdf 7 | CONFIG: 8 | generated_timestamp: 1426711673 -------------------------------------------------------------------------------- /single_rrbot_moveit_config/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(single_rrbot_moveit_config) 3 | 4 | find_package(catkin REQUIRED) 5 | 6 | catkin_package() 7 | 8 | install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 9 | install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) 10 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/config/controllers.yaml: -------------------------------------------------------------------------------- 1 | # this file is not generated by the setup assistant, 2 | # it is added manually according to the available controllers 3 | controller_list: 4 | - name: /single_rrbot/position_trajectory_controller 5 | action_ns: follow_joint_trajectory 6 | type: FollowJointTrajectory 7 | default: true 8 | joints: 9 | - single_rrbot_joint1 10 | - single_rrbot_joint2 -------------------------------------------------------------------------------- /single_rrbot_moveit_config/config/fake_controllers.yaml: -------------------------------------------------------------------------------- 1 | controller_list: 2 | - name: fake_rrbot_controller 3 | joints: 4 | - single_rrbot_joint1 5 | - single_rrbot_joint2 -------------------------------------------------------------------------------- /single_rrbot_moveit_config/config/joint_limits.yaml: -------------------------------------------------------------------------------- 1 | # joint_limits.yaml allows the dynamics properties specified in the URDF to be overwritten or augmented as needed 2 | # Specific joint properties can be changed with the keys [max_position, min_position, max_velocity, max_acceleration] 3 | # Joint limits can be turned off with [has_velocity_limits, has_acceleration_limits] 4 | joint_limits: 5 | single_rrbot_joint1: 6 | has_velocity_limits: true 7 | max_velocity: 0.5 8 | has_acceleration_limits: false 9 | max_acceleration: 0 10 | single_rrbot_joint2: 11 | has_velocity_limits: true 12 | max_velocity: 0.5 13 | has_acceleration_limits: false 14 | max_acceleration: 0 -------------------------------------------------------------------------------- /single_rrbot_moveit_config/config/kinematics.yaml: -------------------------------------------------------------------------------- 1 | rrbot: 2 | kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin 3 | kinematics_solver_search_resolution: 0.005 4 | kinematics_solver_timeout: 0.005 5 | kinematics_solver_attempts: 5 -------------------------------------------------------------------------------- /single_rrbot_moveit_config/config/ompl_planning.yaml: -------------------------------------------------------------------------------- 1 | planner_configs: 2 | SBLkConfigDefault: 3 | type: geometric::SBL 4 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 5 | ESTkConfigDefault: 6 | type: geometric::EST 7 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0 setup() 8 | goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 9 | LBKPIECEkConfigDefault: 10 | type: geometric::LBKPIECE 11 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 12 | border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 13 | min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 14 | BKPIECEkConfigDefault: 15 | type: geometric::BKPIECE 16 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 17 | border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 18 | failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 19 | min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 20 | KPIECEkConfigDefault: 21 | type: geometric::KPIECE 22 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 23 | goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 24 | border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 (0.0,1.] 25 | failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 26 | min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 27 | RRTkConfigDefault: 28 | type: geometric::RRT 29 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 30 | goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 31 | RRTConnectkConfigDefault: 32 | type: geometric::RRTConnect 33 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 34 | RRTstarkConfigDefault: 35 | type: geometric::RRTstar 36 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 37 | goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 38 | delay_collision_checking: 1 # Stop collision checking as soon as C-free parent found. default 1 39 | TRRTkConfigDefault: 40 | type: geometric::TRRT 41 | range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() 42 | goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 43 | max_states_failed: 10 # when to start increasing temp. default: 10 44 | temp_change_factor: 2.0 # how much to increase or decrease temp. default: 2.0 45 | min_temperature: 10e-10 # lower limit of temp change. default: 10e-10 46 | init_temperature: 10e-6 # initial temperature. default: 10e-6 47 | frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() 48 | frountierNodeRatio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 49 | k_constant: 0.0 # value used to normalize expresssion. default: 0.0 set in setup() 50 | PRMkConfigDefault: 51 | type: geometric::PRM 52 | max_nearest_neighbors: 10 # use k nearest neighbors. default: 10 53 | PRMstarkConfigDefault: 54 | type: geometric::PRMstar 55 | rrbot: 56 | planner_configs: 57 | - SBLkConfigDefault 58 | - ESTkConfigDefault 59 | - LBKPIECEkConfigDefault 60 | - BKPIECEkConfigDefault 61 | - KPIECEkConfigDefault 62 | - RRTkConfigDefault 63 | - RRTConnectkConfigDefault 64 | - RRTstarkConfigDefault 65 | - TRRTkConfigDefault 66 | - PRMkConfigDefault 67 | - PRMstarkConfigDefault -------------------------------------------------------------------------------- /single_rrbot_moveit_config/config/single_rrbot.srdf: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/default_warehouse_db.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/demo.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | [/move_group/fake_controller_joint_states] 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/fake_moveit_controller_manager.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/joystick_control.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/move_group.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 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 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/moveit.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz/Displays 3 | Help Height: 84 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /MotionPlanning1 8 | Splitter Ratio: 0.74256 9 | Tree Height: 664 10 | - Class: rviz/Help 11 | Name: Help 12 | - Class: rviz/Views 13 | Expanded: 14 | - /Current View1 15 | Name: Views 16 | Splitter Ratio: 0.5 17 | Visualization Manager: 18 | Class: "" 19 | Displays: 20 | - Alpha: 0.5 21 | Cell Size: 1 22 | Class: rviz/Grid 23 | Color: 160; 160; 164 24 | Enabled: true 25 | Line Style: 26 | Line Width: 0.03 27 | Value: Lines 28 | Name: Grid 29 | Normal Cell Count: 0 30 | Offset: 31 | X: 0 32 | Y: 0 33 | Z: 0 34 | Plane: XY 35 | Plane Cell Count: 10 36 | Reference Frame: 37 | Value: true 38 | - Class: moveit_rviz_plugin/MotionPlanning 39 | Enabled: true 40 | MoveIt_Goal_Tolerance: 0 41 | MoveIt_Planning_Time: 5 42 | MoveIt_Use_Constraint_Aware_IK: true 43 | MoveIt_Warehouse_Host: 127.0.0.1 44 | MoveIt_Warehouse_Port: 33829 45 | Name: MotionPlanning 46 | Planned Path: 47 | Links: 48 | base_bellow_link: 49 | Alpha: 1 50 | Show Axes: false 51 | Show Trail: false 52 | Value: true 53 | base_footprint: 54 | Alpha: 1 55 | Show Axes: false 56 | Show Trail: false 57 | Value: true 58 | base_link: 59 | Alpha: 1 60 | Show Axes: false 61 | Show Trail: false 62 | Value: true 63 | bl_caster_l_wheel_link: 64 | Alpha: 1 65 | Show Axes: false 66 | Show Trail: false 67 | Value: true 68 | bl_caster_r_wheel_link: 69 | Alpha: 1 70 | Show Axes: false 71 | Show Trail: false 72 | Value: true 73 | bl_caster_rotation_link: 74 | Alpha: 1 75 | Show Axes: false 76 | Show Trail: false 77 | Value: true 78 | br_caster_l_wheel_link: 79 | Alpha: 1 80 | Show Axes: false 81 | Show Trail: false 82 | Value: true 83 | br_caster_r_wheel_link: 84 | Alpha: 1 85 | Show Axes: false 86 | Show Trail: false 87 | Value: true 88 | br_caster_rotation_link: 89 | Alpha: 1 90 | Show Axes: false 91 | Show Trail: false 92 | Value: true 93 | double_stereo_link: 94 | Alpha: 1 95 | Show Axes: false 96 | Show Trail: false 97 | Value: true 98 | fl_caster_l_wheel_link: 99 | Alpha: 1 100 | Show Axes: false 101 | Show Trail: false 102 | Value: true 103 | fl_caster_r_wheel_link: 104 | Alpha: 1 105 | Show Axes: false 106 | Show Trail: false 107 | Value: true 108 | fl_caster_rotation_link: 109 | Alpha: 1 110 | Show Axes: false 111 | Show Trail: false 112 | Value: true 113 | fr_caster_l_wheel_link: 114 | Alpha: 1 115 | Show Axes: false 116 | Show Trail: false 117 | Value: true 118 | fr_caster_r_wheel_link: 119 | Alpha: 1 120 | Show Axes: false 121 | Show Trail: false 122 | Value: true 123 | fr_caster_rotation_link: 124 | Alpha: 1 125 | Show Axes: false 126 | Show Trail: false 127 | Value: true 128 | head_mount_kinect_ir_link: 129 | Alpha: 1 130 | Show Axes: false 131 | Show Trail: false 132 | Value: true 133 | head_mount_kinect_rgb_link: 134 | Alpha: 1 135 | Show Axes: false 136 | Show Trail: false 137 | Value: true 138 | head_mount_link: 139 | Alpha: 1 140 | Show Axes: false 141 | Show Trail: false 142 | Value: true 143 | head_mount_prosilica_link: 144 | Alpha: 1 145 | Show Axes: false 146 | Show Trail: false 147 | Value: true 148 | head_pan_link: 149 | Alpha: 1 150 | Show Axes: false 151 | Show Trail: false 152 | Value: true 153 | head_plate_frame: 154 | Alpha: 1 155 | Show Axes: false 156 | Show Trail: false 157 | Value: true 158 | head_tilt_link: 159 | Alpha: 1 160 | Show Axes: false 161 | Show Trail: false 162 | Value: true 163 | l_elbow_flex_link: 164 | Alpha: 1 165 | Show Axes: false 166 | Show Trail: false 167 | Value: true 168 | l_forearm_link: 169 | Alpha: 1 170 | Show Axes: false 171 | Show Trail: false 172 | Value: true 173 | l_forearm_roll_link: 174 | Alpha: 1 175 | Show Axes: false 176 | Show Trail: false 177 | Value: true 178 | l_gripper_l_finger_link: 179 | Alpha: 1 180 | Show Axes: false 181 | Show Trail: false 182 | Value: true 183 | l_gripper_l_finger_tip_link: 184 | Alpha: 1 185 | Show Axes: false 186 | Show Trail: false 187 | Value: true 188 | l_gripper_motor_accelerometer_link: 189 | Alpha: 1 190 | Show Axes: false 191 | Show Trail: false 192 | Value: true 193 | l_gripper_palm_link: 194 | Alpha: 1 195 | Show Axes: false 196 | Show Trail: false 197 | Value: true 198 | l_gripper_r_finger_link: 199 | Alpha: 1 200 | Show Axes: false 201 | Show Trail: false 202 | Value: true 203 | l_gripper_r_finger_tip_link: 204 | Alpha: 1 205 | Show Axes: false 206 | Show Trail: false 207 | Value: true 208 | l_shoulder_lift_link: 209 | Alpha: 1 210 | Show Axes: false 211 | Show Trail: false 212 | Value: true 213 | l_shoulder_pan_link: 214 | Alpha: 1 215 | Show Axes: false 216 | Show Trail: false 217 | Value: true 218 | l_upper_arm_link: 219 | Alpha: 1 220 | Show Axes: false 221 | Show Trail: false 222 | Value: true 223 | l_upper_arm_roll_link: 224 | Alpha: 1 225 | Show Axes: false 226 | Show Trail: false 227 | Value: true 228 | l_wrist_flex_link: 229 | Alpha: 1 230 | Show Axes: false 231 | Show Trail: false 232 | Value: true 233 | l_wrist_roll_link: 234 | Alpha: 1 235 | Show Axes: false 236 | Show Trail: false 237 | Value: true 238 | laser_tilt_mount_link: 239 | Alpha: 1 240 | Show Axes: false 241 | Show Trail: false 242 | Value: true 243 | r_elbow_flex_link: 244 | Alpha: 1 245 | Show Axes: false 246 | Show Trail: false 247 | Value: true 248 | r_forearm_link: 249 | Alpha: 1 250 | Show Axes: false 251 | Show Trail: false 252 | Value: true 253 | r_forearm_roll_link: 254 | Alpha: 1 255 | Show Axes: false 256 | Show Trail: false 257 | Value: true 258 | r_gripper_l_finger_link: 259 | Alpha: 1 260 | Show Axes: false 261 | Show Trail: false 262 | Value: true 263 | r_gripper_l_finger_tip_link: 264 | Alpha: 1 265 | Show Axes: false 266 | Show Trail: false 267 | Value: true 268 | r_gripper_motor_accelerometer_link: 269 | Alpha: 1 270 | Show Axes: false 271 | Show Trail: false 272 | Value: true 273 | r_gripper_palm_link: 274 | Alpha: 1 275 | Show Axes: false 276 | Show Trail: false 277 | Value: true 278 | r_gripper_r_finger_link: 279 | Alpha: 1 280 | Show Axes: false 281 | Show Trail: false 282 | Value: true 283 | r_gripper_r_finger_tip_link: 284 | Alpha: 1 285 | Show Axes: false 286 | Show Trail: false 287 | Value: true 288 | r_shoulder_lift_link: 289 | Alpha: 1 290 | Show Axes: false 291 | Show Trail: false 292 | Value: true 293 | r_shoulder_pan_link: 294 | Alpha: 1 295 | Show Axes: false 296 | Show Trail: false 297 | Value: true 298 | r_upper_arm_link: 299 | Alpha: 1 300 | Show Axes: false 301 | Show Trail: false 302 | Value: true 303 | r_upper_arm_roll_link: 304 | Alpha: 1 305 | Show Axes: false 306 | Show Trail: false 307 | Value: true 308 | r_wrist_flex_link: 309 | Alpha: 1 310 | Show Axes: false 311 | Show Trail: false 312 | Value: true 313 | r_wrist_roll_link: 314 | Alpha: 1 315 | Show Axes: false 316 | Show Trail: false 317 | Value: true 318 | sensor_mount_link: 319 | Alpha: 1 320 | Show Axes: false 321 | Show Trail: false 322 | Value: true 323 | torso_lift_link: 324 | Alpha: 1 325 | Show Axes: false 326 | Show Trail: false 327 | Value: true 328 | Loop Animation: true 329 | Robot Alpha: 0.5 330 | Show Robot Collision: false 331 | Show Robot Visual: true 332 | Show Trail: false 333 | State Display Time: 0.05 s 334 | Trajectory Topic: move_group/display_planned_path 335 | Planning Metrics: 336 | Payload: 1 337 | Show Joint Torques: false 338 | Show Manipulability: false 339 | Show Manipulability Index: false 340 | Show Weight Limit: false 341 | Planning Request: 342 | Colliding Link Color: 255; 0; 0 343 | Goal State Alpha: 1 344 | Goal State Color: 250; 128; 0 345 | Interactive Marker Size: 0 346 | Joint Violation Color: 255; 0; 255 347 | Planning Group: left_arm 348 | Query Goal State: true 349 | Query Start State: false 350 | Show Workspace: false 351 | Start State Alpha: 1 352 | Start State Color: 0; 255; 0 353 | Planning Scene Topic: move_group/monitored_planning_scene 354 | Robot Description: robot_description 355 | Scene Geometry: 356 | Scene Alpha: 1 357 | Scene Color: 50; 230; 50 358 | Scene Display Time: 0.2 359 | Show Scene Geometry: true 360 | Voxel Coloring: Z-Axis 361 | Voxel Rendering: Occupied Voxels 362 | Scene Robot: 363 | Attached Body Color: 150; 50; 150 364 | Links: 365 | base_bellow_link: 366 | Alpha: 1 367 | Show Axes: false 368 | Show Trail: false 369 | Value: true 370 | base_footprint: 371 | Alpha: 1 372 | Show Axes: false 373 | Show Trail: false 374 | Value: true 375 | base_link: 376 | Alpha: 1 377 | Show Axes: false 378 | Show Trail: false 379 | Value: true 380 | bl_caster_l_wheel_link: 381 | Alpha: 1 382 | Show Axes: false 383 | Show Trail: false 384 | Value: true 385 | bl_caster_r_wheel_link: 386 | Alpha: 1 387 | Show Axes: false 388 | Show Trail: false 389 | Value: true 390 | bl_caster_rotation_link: 391 | Alpha: 1 392 | Show Axes: false 393 | Show Trail: false 394 | Value: true 395 | br_caster_l_wheel_link: 396 | Alpha: 1 397 | Show Axes: false 398 | Show Trail: false 399 | Value: true 400 | br_caster_r_wheel_link: 401 | Alpha: 1 402 | Show Axes: false 403 | Show Trail: false 404 | Value: true 405 | br_caster_rotation_link: 406 | Alpha: 1 407 | Show Axes: false 408 | Show Trail: false 409 | Value: true 410 | double_stereo_link: 411 | Alpha: 1 412 | Show Axes: false 413 | Show Trail: false 414 | Value: true 415 | fl_caster_l_wheel_link: 416 | Alpha: 1 417 | Show Axes: false 418 | Show Trail: false 419 | Value: true 420 | fl_caster_r_wheel_link: 421 | Alpha: 1 422 | Show Axes: false 423 | Show Trail: false 424 | Value: true 425 | fl_caster_rotation_link: 426 | Alpha: 1 427 | Show Axes: false 428 | Show Trail: false 429 | Value: true 430 | fr_caster_l_wheel_link: 431 | Alpha: 1 432 | Show Axes: false 433 | Show Trail: false 434 | Value: true 435 | fr_caster_r_wheel_link: 436 | Alpha: 1 437 | Show Axes: false 438 | Show Trail: false 439 | Value: true 440 | fr_caster_rotation_link: 441 | Alpha: 1 442 | Show Axes: false 443 | Show Trail: false 444 | Value: true 445 | head_mount_kinect_ir_link: 446 | Alpha: 1 447 | Show Axes: false 448 | Show Trail: false 449 | Value: true 450 | head_mount_kinect_rgb_link: 451 | Alpha: 1 452 | Show Axes: false 453 | Show Trail: false 454 | Value: true 455 | head_mount_link: 456 | Alpha: 1 457 | Show Axes: false 458 | Show Trail: false 459 | Value: true 460 | head_mount_prosilica_link: 461 | Alpha: 1 462 | Show Axes: false 463 | Show Trail: false 464 | Value: true 465 | head_pan_link: 466 | Alpha: 1 467 | Show Axes: false 468 | Show Trail: false 469 | Value: true 470 | head_plate_frame: 471 | Alpha: 1 472 | Show Axes: false 473 | Show Trail: false 474 | Value: true 475 | head_tilt_link: 476 | Alpha: 1 477 | Show Axes: false 478 | Show Trail: false 479 | Value: true 480 | l_elbow_flex_link: 481 | Alpha: 1 482 | Show Axes: false 483 | Show Trail: false 484 | Value: true 485 | l_forearm_link: 486 | Alpha: 1 487 | Show Axes: false 488 | Show Trail: false 489 | Value: true 490 | l_forearm_roll_link: 491 | Alpha: 1 492 | Show Axes: false 493 | Show Trail: false 494 | Value: true 495 | l_gripper_l_finger_link: 496 | Alpha: 1 497 | Show Axes: false 498 | Show Trail: false 499 | Value: true 500 | l_gripper_l_finger_tip_link: 501 | Alpha: 1 502 | Show Axes: false 503 | Show Trail: false 504 | Value: true 505 | l_gripper_motor_accelerometer_link: 506 | Alpha: 1 507 | Show Axes: false 508 | Show Trail: false 509 | Value: true 510 | l_gripper_palm_link: 511 | Alpha: 1 512 | Show Axes: false 513 | Show Trail: false 514 | Value: true 515 | l_gripper_r_finger_link: 516 | Alpha: 1 517 | Show Axes: false 518 | Show Trail: false 519 | Value: true 520 | l_gripper_r_finger_tip_link: 521 | Alpha: 1 522 | Show Axes: false 523 | Show Trail: false 524 | Value: true 525 | l_shoulder_lift_link: 526 | Alpha: 1 527 | Show Axes: false 528 | Show Trail: false 529 | Value: true 530 | l_shoulder_pan_link: 531 | Alpha: 1 532 | Show Axes: false 533 | Show Trail: false 534 | Value: true 535 | l_upper_arm_link: 536 | Alpha: 1 537 | Show Axes: false 538 | Show Trail: false 539 | Value: true 540 | l_upper_arm_roll_link: 541 | Alpha: 1 542 | Show Axes: false 543 | Show Trail: false 544 | Value: true 545 | l_wrist_flex_link: 546 | Alpha: 1 547 | Show Axes: false 548 | Show Trail: false 549 | Value: true 550 | l_wrist_roll_link: 551 | Alpha: 1 552 | Show Axes: false 553 | Show Trail: false 554 | Value: true 555 | laser_tilt_mount_link: 556 | Alpha: 1 557 | Show Axes: false 558 | Show Trail: false 559 | Value: true 560 | r_elbow_flex_link: 561 | Alpha: 1 562 | Show Axes: false 563 | Show Trail: false 564 | Value: true 565 | r_forearm_link: 566 | Alpha: 1 567 | Show Axes: false 568 | Show Trail: false 569 | Value: true 570 | r_forearm_roll_link: 571 | Alpha: 1 572 | Show Axes: false 573 | Show Trail: false 574 | Value: true 575 | r_gripper_l_finger_link: 576 | Alpha: 1 577 | Show Axes: false 578 | Show Trail: false 579 | Value: true 580 | r_gripper_l_finger_tip_link: 581 | Alpha: 1 582 | Show Axes: false 583 | Show Trail: false 584 | Value: true 585 | r_gripper_motor_accelerometer_link: 586 | Alpha: 1 587 | Show Axes: false 588 | Show Trail: false 589 | Value: true 590 | r_gripper_palm_link: 591 | Alpha: 1 592 | Show Axes: false 593 | Show Trail: false 594 | Value: true 595 | r_gripper_r_finger_link: 596 | Alpha: 1 597 | Show Axes: false 598 | Show Trail: false 599 | Value: true 600 | r_gripper_r_finger_tip_link: 601 | Alpha: 1 602 | Show Axes: false 603 | Show Trail: false 604 | Value: true 605 | r_shoulder_lift_link: 606 | Alpha: 1 607 | Show Axes: false 608 | Show Trail: false 609 | Value: true 610 | r_shoulder_pan_link: 611 | Alpha: 1 612 | Show Axes: false 613 | Show Trail: false 614 | Value: true 615 | r_upper_arm_link: 616 | Alpha: 1 617 | Show Axes: false 618 | Show Trail: false 619 | Value: true 620 | r_upper_arm_roll_link: 621 | Alpha: 1 622 | Show Axes: false 623 | Show Trail: false 624 | Value: true 625 | r_wrist_flex_link: 626 | Alpha: 1 627 | Show Axes: false 628 | Show Trail: false 629 | Value: true 630 | r_wrist_roll_link: 631 | Alpha: 1 632 | Show Axes: false 633 | Show Trail: false 634 | Value: true 635 | sensor_mount_link: 636 | Alpha: 1 637 | Show Axes: false 638 | Show Trail: false 639 | Value: true 640 | torso_lift_link: 641 | Alpha: 1 642 | Show Axes: false 643 | Show Trail: false 644 | Value: true 645 | Robot Alpha: 0.5 646 | Show Scene Robot: true 647 | Value: true 648 | Enabled: true 649 | Global Options: 650 | Background Color: 48; 48; 48 651 | Fixed Frame: /world 652 | Name: root 653 | Tools: 654 | - Class: rviz/Interact 655 | Hide Inactive Objects: true 656 | - Class: rviz/MoveCamera 657 | - Class: rviz/Select 658 | Value: true 659 | Views: 660 | Current: 661 | Class: rviz/XYOrbit 662 | Distance: 2.9965 663 | Focal Point: 664 | X: 0.113567 665 | Y: 0.10592 666 | Z: 2.23518e-07 667 | Name: Current View 668 | Near Clip Distance: 0.01 669 | Pitch: 0.509797 670 | Target Frame: /world 671 | Value: XYOrbit (rviz) 672 | Yaw: 5.65995 673 | Saved: ~ 674 | Window Geometry: 675 | Displays: 676 | collapsed: false 677 | Height: 1337 678 | Help: 679 | collapsed: false 680 | Hide Left Dock: false 681 | Hide Right Dock: false 682 | Motion Planning: 683 | collapsed: false 684 | QMainWindow State: 000000ff00000000fd0000000100000000000002a2000004bcfc0200000005fb000000100044006900730070006c00610079007301000000410000032d000000dd00fffffffb0000000800480065006c00700000000342000000bb0000007600fffffffb0000000a0056006900650077007300000003b0000000b0000000b000fffffffb0000000c00430061006d00650072006100000002ff000001610000000000000000fb0000001e004d006f00740069006f006e00200050006c0061006e006e0069006e00670100000374000001890000017400ffffff0000047a000004bc00000001000000020000000100000002fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 685 | Views: 686 | collapsed: false 687 | Width: 1828 688 | X: 459 689 | Y: -243 690 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/moveit_rviz.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/ompl_planning_pipeline.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/planning_context.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 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/planning_pipeline.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/run_benchmark_ompl.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/sensor_manager.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/setup_assistant.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/single_rrbot_moveit_controller_manager.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/single_rrbot_moveit_sensor_manager.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/trajectory_execution.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/warehouse.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/launch/warehouse_settings.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /single_rrbot_moveit_config/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | single_rrbot_moveit_config 4 | 0.2.0 5 | 6 | An automatically generated package with all the configuration and launch files for using the single_rrbot with the MoveIt Motion Planning Framework 7 | 8 | MoveIt Setup Assistant 9 | MoveIt Setup Assistant 10 | 11 | BSD 12 | 13 | http://moveit.ros.org/ 14 | https://github.com/ros-planning/moveit_setup_assistant/issues 15 | https://github.com/ros-planning/moveit_setup_assistant 16 | 17 | moveit_ros_move_group 18 | moveit_planners_ompl 19 | moveit_ros_visualization 20 | joint_state_publisher 21 | robot_state_publisher 22 | xacro 23 | rrbot_description 24 | rrbot_description 25 | 26 | 27 | catkin 28 | 29 | 30 | --------------------------------------------------------------------------------