├── blue_simulator ├── CMakeLists.txt └── package.xml ├── .gitmodules ├── blue_gazebo ├── launch │ ├── full.launch │ ├── full_pickup.launch │ └── include │ │ ├── pickup_world_objects.launch │ │ ├── single_arm_gazebo.launch.xml │ │ └── run.launch.xml ├── package.xml ├── worlds │ └── empty_world.world ├── objects │ ├── simple_box.urdf │ ├── simple_cylinder.urdf │ └── table.urdf.xacro └── CMakeLists.txt ├── LICENSE └── README.md /blue_simulator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(blue_simulator) 3 | find_package(catkin REQUIRED) 4 | catkin_metapackage() 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "roboticsgroup_gazebo_plugins"] 2 | path = roboticsgroup_gazebo_plugins 3 | url = https://github.com/roboticsgroup/roboticsgroup_gazebo_plugins.git 4 | -------------------------------------------------------------------------------- /blue_gazebo/launch/full.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /blue_simulator/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | blue_simulator 4 | 0.0.0 5 | The blue simulator metapackage contains tools for simulating the Blue robot 6 | 7 | 8 | 9 | MIT 10 | 11 | Philipp Wu 12 | Brent Yi 13 | 14 | catkin 15 | 16 | -------------------------------------------------------------------------------- /blue_gazebo/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | blue_gazebo 4 | 0.0.0 5 | The blue_gazebo package 6 | 7 | Philipp Wu 8 | 9 | MIT 10 | 11 | Philipp Wu 12 | Brent Yi 13 | 14 | catkin 15 | 16 | gazebo_ros_control 17 | blue_core 18 | 19 | -------------------------------------------------------------------------------- /blue_gazebo/worlds/empty_world.world: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | model://sun 14 | 15 | 16 | 17 | model://ground_plane 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Berkeley Open Arms 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /blue_gazebo/objects/simple_box.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 | 0.6 25 | 0.6 26 | 27 | 28 | 29 | 30 | 31 | Gazebo/Blue 32 | false 33 | 34 | 35 | -------------------------------------------------------------------------------- /blue_gazebo/objects/simple_cylinder.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 | 0.6 25 | 0.6 26 | 27 | 28 | 29 | 30 | 31 | Gazebo/Blue 32 | false 33 | 34 | 35 | -------------------------------------------------------------------------------- /blue_gazebo/launch/full_pickup.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 13 | 14 | 20 | 21 | - blue_controllers/joint_trajectory_controller 22 | - blue_controllers/gripper_controller 23 | 24 | 25 | 31 | 32 | - blue_controllers/joint_trajectory_controller 33 | - blue_controllers/gripper_controller 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /blue_gazebo/launch/include/pickup_world_objects.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 37 | 38 | -------------------------------------------------------------------------------- /blue_gazebo/launch/include/single_arm_gazebo.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 24 | 25 | 30 | 31 | - blue_controllers/joint_state_controller 32 | 33 | 34 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blue_simulator 2 | (Experimental) ROS package for simulating Blue via Gazebo. 3 | 4 | ### Install instructions 5 | 6 | - Install Ubuntu 16.0.4 7 | - [Install ROS Kinetic](http://wiki.ros.org/kinetic/Installation/Ubuntu) 8 | - Start from 1.2 to 1.7, just copy paste into terminal 9 | - For step 1.4, use Desktop-Full if unsure 10 | - Create a workspace: 11 | ```bash 12 | mkdir -p ~/blue_ws/src && cd "$_" 13 | ``` 14 | - Clone the required packages: 15 | ```bash 16 | git clone https://github.com/berkeleyopenarms/blue_core.git 17 | git clone https://github.com/berkeleyopenarms/blue_simulator.git 18 | ``` 19 | - Get the mimic joint plugin: 20 | ```bash 21 | cd blue_simulator 22 | git submodule update --init 23 | ``` 24 | 25 | - Install dependencies: 26 | ```bash 27 | cd ~/blue_ws 28 | rosdep install --from-paths src --ignore-src -r -y 29 | ``` 30 | - Build: 31 | ```bash 32 | catkin_make install 33 | ``` 34 | - Source: 35 | ```bash 36 | echo "source ~/blue_ws/devel/setup.bash" >> ~/.bashrc 37 | source ~/blue_ws/devel/setup.bash 38 | ``` 39 | 40 | ### Instructions for use 41 | To launch the simulator (`full.launch` corresponds to the full, two-arm setup; `right.launch` or `left.launch` can also be used): 42 | ```bash 43 | roslaunch blue_gazebo full.launch 44 | ``` 45 | 46 | Running rviz afterwards is the same as with the physical robot: 47 | ```bash 48 | roslaunch blue_bringup rviz.launch 49 | ``` 50 | 51 | ### Notes 52 | * The gripper can be controlled using the `/(right/left)_arm/blue_controllers/gripper_controller` controller, but the URDF currently relies on [mimic joints](http://wiki.ros.org/urdf/XML/joint) and will cause Gazebo to crash if the gripper grasps an object. This is because the mimic joint plugin used to implement mimic joints in Gazebo will exert instantaneous forces which crashes the simulation. 53 | -------------------------------------------------------------------------------- /blue_gazebo/launch/include/run.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 50 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /blue_gazebo/objects/table.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Gazebo/Wood 53 | 50.0 54 | 50.0 55 | 1000000.0 56 | 1.0 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | Gazebo/Red 87 | 1000.0 88 | 1000.0 89 | 10000000.0 90 | 1.0 91 | true 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | Gazebo/Red 122 | 1000.0 123 | 1000.0 124 | 10000000.0 125 | 1.0 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | Gazebo/Red 157 | 1000.0 158 | 1000.0 159 | 10000000.0 160 | 1.0 161 | true 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | Gazebo/Red 192 | 1000.0 193 | 1000.0 194 | 10000000.0 195 | 1.0 196 | true 197 | 198 | 199 | true 200 | table_top_link 201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /blue_gazebo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(blue_gazebo) 3 | 4 | ## Compile as C++11, supported in ROS Kinetic and newer 5 | # add_compile_options(-std=c++11) 6 | 7 | ## Find catkin macros and libraries 8 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 9 | ## is used, also find other catkin packages 10 | find_package(catkin REQUIRED COMPONENTS 11 | geometry_msgs 12 | interactive_markers 13 | kdl_parser 14 | roscpp 15 | std_msgs 16 | tf 17 | visualization_msgs 18 | ) 19 | 20 | ## System dependencies are found with CMake's conventions 21 | # find_package(Boost REQUIRED COMPONENTS system) 22 | 23 | 24 | ## Uncomment this if the package has a setup.py. This macro ensures 25 | ## modules and global scripts declared therein get installed 26 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 27 | # catkin_python_setup() 28 | 29 | ################################################ 30 | ## Declare ROS messages, services and actions ## 31 | ################################################ 32 | 33 | ## To declare and build messages, services or actions from within this 34 | ## package, follow these steps: 35 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 36 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 37 | ## * In the file package.xml: 38 | ## * add a build_depend tag for "message_generation" 39 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 40 | ## * If MSG_DEP_SET isn't empty the following dependency has been pulled in 41 | ## but can be declared for certainty nonetheless: 42 | ## * add a run_depend tag for "message_runtime" 43 | ## * In this file (CMakeLists.txt): 44 | ## * add "message_generation" and every package in MSG_DEP_SET to 45 | ## find_package(catkin REQUIRED COMPONENTS ...) 46 | ## * add "message_runtime" and every package in MSG_DEP_SET to 47 | ## catkin_package(CATKIN_DEPENDS ...) 48 | ## * uncomment the add_*_files sections below as needed 49 | ## and list every .msg/.srv/.action file to be processed 50 | ## * uncomment the generate_messages entry below 51 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 52 | 53 | ## Generate messages in the 'msg' folder 54 | # add_message_files( 55 | # FILES 56 | # Message1.msg 57 | # Message2.msg 58 | # ) 59 | 60 | ## Generate services in the 'srv' folder 61 | # add_service_files( 62 | # FILES 63 | # Service1.srv 64 | # Service2.srv 65 | # ) 66 | 67 | ## Generate actions in the 'action' folder 68 | # add_action_files( 69 | # FILES 70 | # Action1.action 71 | # Action2.action 72 | # ) 73 | 74 | ## Generate added messages and services with any dependencies listed here 75 | # generate_messages( 76 | # DEPENDENCIES 77 | # geometry_msgs# std_msgs# visualization_msgs 78 | # ) 79 | 80 | ################################################ 81 | ## Declare ROS dynamic reconfigure parameters ## 82 | ################################################ 83 | 84 | ## To declare and build dynamic reconfigure parameters within this 85 | ## package, follow these steps: 86 | ## * In the file package.xml: 87 | ## * add a build_depend and a run_depend tag for "dynamic_reconfigure" 88 | ## * In this file (CMakeLists.txt): 89 | ## * add "dynamic_reconfigure" to 90 | ## find_package(catkin REQUIRED COMPONENTS ...) 91 | ## * uncomment the "generate_dynamic_reconfigure_options" section below 92 | ## and list every .cfg file to be processed 93 | 94 | ## Generate dynamic reconfigure parameters in the 'cfg' folder 95 | # generate_dynamic_reconfigure_options( 96 | # cfg/DynReconf1.cfg 97 | # cfg/DynReconf2.cfg 98 | # ) 99 | 100 | ################################### 101 | ## catkin specific configuration ## 102 | ################################### 103 | ## The catkin_package macro generates cmake config files for your package 104 | ## Declare things to be passed to dependent projects 105 | ## INCLUDE_DIRS: uncomment this if you package contains header files 106 | ## LIBRARIES: libraries you create in this project that dependent projects also need 107 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 108 | ## DEPENDS: system dependencies of this project that dependent projects also need 109 | catkin_package( 110 | # INCLUDE_DIRS include 111 | # LIBRARIES blue_gazebo 112 | # CATKIN_DEPENDS geometry_msgs interactive_markers kdl_parser roscpp std_msgs tf visualization_msgs 113 | # DEPENDS system_lib 114 | ) 115 | 116 | ########### 117 | ## Build ## 118 | ########### 119 | 120 | ## Specify additional locations of header files 121 | ## Your package locations should be listed before other locations 122 | include_directories( 123 | # include 124 | ${catkin_INCLUDE_DIRS} 125 | ) 126 | 127 | ## Declare a C++ library 128 | # add_library(${PROJECT_NAME} 129 | # src/${PROJECT_NAME}/blue_gazebo.cpp 130 | # ) 131 | 132 | ## Add cmake target dependencies of the library 133 | ## as an example, code may need to be generated before libraries 134 | ## either from message generation or dynamic reconfigure 135 | # add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 136 | 137 | ## Declare a C++ executable 138 | ## With catkin_make all packages are built within a single CMake context 139 | ## The recommended prefix ensures that target names across packages don't collide 140 | # add_executable(${PROJECT_NAME}_node src/blue_gazebo_node.cpp) 141 | 142 | ## Rename C++ executable without prefix 143 | ## The above recommended prefix causes long target names, the following renames the 144 | ## target back to the shorter version for ease of user use 145 | ## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" 146 | # set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") 147 | 148 | ## Add cmake target dependencies of the executable 149 | ## same as for the library above 150 | # add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 151 | 152 | ## Specify libraries to link a library or executable target against 153 | # target_link_libraries(${PROJECT_NAME}_node 154 | # ${catkin_LIBRARIES} 155 | # ) 156 | 157 | ############# 158 | ## Install ## 159 | ############# 160 | 161 | # all install targets should use catkin DESTINATION variables 162 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 163 | 164 | ## Mark executable scripts (Python etc.) for installation 165 | ## in contrast to setup.py, you can choose the destination 166 | # install(PROGRAMS 167 | # scripts/my_python_script 168 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 169 | # ) 170 | 171 | ## Mark executables and/or libraries for installation 172 | # install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node 173 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 174 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 175 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 176 | # ) 177 | 178 | ## Mark cpp header files for installation 179 | # install(DIRECTORY include/${PROJECT_NAME}/ 180 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 181 | # FILES_MATCHING PATTERN "*.h" 182 | # PATTERN ".svn" EXCLUDE 183 | # ) 184 | 185 | ## Mark other files for installation (e.g. launch and bag files, etc.) 186 | # install(FILES 187 | # # myfile1 188 | # # myfile2 189 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 190 | # ) 191 | 192 | ############# 193 | ## Testing ## 194 | ############# 195 | 196 | ## Add gtest based cpp test target and link libraries 197 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_blue_gazebo.cpp) 198 | # if(TARGET ${PROJECT_NAME}-test) 199 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 200 | # endif() 201 | 202 | ## Add folders to be run by python nosetests 203 | # catkin_add_nosetests(test) 204 | 205 | 206 | # add_executable(pose_target_simulation src/pose_target_simulation.cpp) 207 | # target_link_libraries(pose_target_simulation ${catkin_LIBRARIES}) 208 | --------------------------------------------------------------------------------