├── README.MD ├── mec_mobile ├── CMakeLists.txt ├── LICENSE ├── README.MD └── package.xml └── mec_mobile_description ├── CMakeLists.txt ├── LICENSE ├── README.MD ├── meshes ├── intel_realsense │ └── visual │ │ └── d435.stl ├── robot_3d │ └── visual │ │ ├── back_left_wheel_X3.STL │ │ ├── back_right_wheel_X3.STL │ │ ├── base_link_X3.STL │ │ ├── camera_link.STL │ │ ├── front_left_wheel_X3.STL │ │ ├── front_right_wheel_X3.STL │ │ └── laser_link.STL └── rplidar │ └── rplidar_s2.stl ├── package.xml └── urdf ├── materials.xacro ├── mech ├── mecanum_wheel.urdf.xacro └── robot_3d_base.urdf.xacro ├── robots └── robot_3d.urdf.xacro └── sensors ├── imu.urdf.xacro ├── lidar.urdf.xacro └── rgbd_camera.urdf.xacro /README.MD: -------------------------------------------------------------------------------- 1 | # mec_mobile # 2 | 3 | This repository is for creating a Mecanum Mobile Robot with URDF and Visualize it in RViz. 4 | 5 | - Platform: ROS2 Jazzy + Gazebo Harmonic 6 | 7 | [Here is the step by step tutrorial video on Youtube](https://youtu.be/ABLQZkkTKlI) 8 | 9 | Use the main branch as the start package for Gazebo simulation 10 | 11 | ## Quick Start 12 | 13 | * Create a ros workspace 14 | ```bash 15 | mkdir -p ~/ros2_ws/src 16 | cd ~/ros2_ws/src 17 | ``` 18 | * Download the package 19 | ```bash 20 | git clone -b main https://github.com/roboticslabs/mec_mobile.git 21 | ``` 22 | * Compile the package 23 | ```bash 24 | cd ~/ros2_ws 25 | sudo apt-get install ros-${ROS_DISTRO}-urdf-tutorial 26 | colcon build 27 | ``` 28 | * Try it 29 | ```bash 30 | source ~/ros2_ws/install/setup.bash 31 | ros2 launch urdf_tutorial display.launch.py model:=/home/robotlabs/ros2_ws/src/mec_mobile/mec_mobile_description/urdf/robots/robot_3d.urdf.xacro 32 | ``` 33 | Note: update the model's path according to your own setting. 34 | -------------------------------------------------------------------------------- /mec_mobile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | project(mec_mobile) 3 | 4 | if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") 5 | add_compile_options(-Wall -Wextra -Wpedantic) 6 | endif() 7 | 8 | # find dependencies 9 | find_package(ament_cmake REQUIRED) 10 | # uncomment the following section in order to fill in 11 | # further dependencies manually. 12 | # find_package( REQUIRED) 13 | 14 | if(BUILD_TESTING) 15 | find_package(ament_lint_auto REQUIRED) 16 | # the following line skips the linter which checks for copyrights 17 | # comment the line when a copyright and license is added to all source files 18 | set(ament_cmake_copyright_FOUND TRUE) 19 | # the following line skips cpplint (only works in a git repo) 20 | # comment the line when this package is in a git repo and when 21 | # a copyright and license is added to all source files 22 | set(ament_cmake_cpplint_FOUND TRUE) 23 | ament_lint_auto_find_test_dependencies() 24 | endif() 25 | 26 | ament_package() 27 | -------------------------------------------------------------------------------- /mec_mobile/LICENSE: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | 11 | * Neither the name of the copyright holder nor the names of its 12 | contributors may be used to endorse or promote products derived from 13 | this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /mec_mobile/README.MD: -------------------------------------------------------------------------------- 1 | # mec_mobile # -------------------------------------------------------------------------------- /mec_mobile/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mec_mobile 5 | 0.0.0 6 | TODO: Package description 7 | robotlabs 8 | BSD-3-Clause 9 | 10 | ament_cmake 11 | 12 | mec_mobile_description 13 | 14 | ament_lint_auto 15 | ament_lint_common 16 | 17 | 18 | ament_cmake 19 | 20 | 21 | -------------------------------------------------------------------------------- /mec_mobile_description/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | project(mec_mobile_description) 3 | 4 | if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") 5 | add_compile_options(-Wall -Wextra -Wpedantic) 6 | endif() 7 | 8 | # find dependencies 9 | find_package(ament_cmake REQUIRED) 10 | find_package(urdf_tutorial REQUIRED) 11 | # uncomment the following section in order to fill in 12 | # further dependencies manually. 13 | # find_package( REQUIRED) 14 | # Copy necessary files to designated locations in the project 15 | install ( 16 | DIRECTORY meshes urdf 17 | DESTINATION share/${PROJECT_NAME} 18 | ) 19 | 20 | if(BUILD_TESTING) 21 | find_package(ament_lint_auto REQUIRED) 22 | # the following line skips the linter which checks for copyrights 23 | # comment the line when a copyright and license is added to all source files 24 | set(ament_cmake_copyright_FOUND TRUE) 25 | # the following line skips cpplint (only works in a git repo) 26 | # comment the line when this package is in a git repo and when 27 | # a copyright and license is added to all source files 28 | set(ament_cmake_cpplint_FOUND TRUE) 29 | ament_lint_auto_find_test_dependencies() 30 | endif() 31 | 32 | ament_package() 33 | -------------------------------------------------------------------------------- /mec_mobile_description/LICENSE: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | 11 | * Neither the name of the copyright holder nor the names of its 12 | contributors may be used to endorse or promote products derived from 13 | this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /mec_mobile_description/README.MD: -------------------------------------------------------------------------------- 1 | # mec_mobile_description # -------------------------------------------------------------------------------- /mec_mobile_description/meshes/intel_realsense/visual/d435.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/intel_realsense/visual/d435.stl -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/back_left_wheel_X3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/back_left_wheel_X3.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/back_right_wheel_X3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/back_right_wheel_X3.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/base_link_X3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/base_link_X3.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/camera_link.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/camera_link.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/front_left_wheel_X3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/front_left_wheel_X3.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/front_right_wheel_X3.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/front_right_wheel_X3.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/robot_3d/visual/laser_link.STL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/robot_3d/visual/laser_link.STL -------------------------------------------------------------------------------- /mec_mobile_description/meshes/rplidar/rplidar_s2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roboticslabs/mec_mobile/b39f1e7092b9e2c41effc0f2601a993b01bc77ba/mec_mobile_description/meshes/rplidar/rplidar_s2.stl -------------------------------------------------------------------------------- /mec_mobile_description/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mec_mobile_description 5 | 0.0.0 6 | TODO: Package description 7 | robotlabs 8 | BSD-3-Clause 9 | 10 | ament_cmake 11 | urdf_tutorial 12 | 13 | ament_lint_auto 14 | ament_lint_common 15 | 16 | 17 | ament_cmake 18 | 19 | 20 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/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 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/mech/mecanum_wheel.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 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 1.0 52 | 0.0 53 | 54 | 55 | 56 | 57 | 58 | 0.2 0.2 0.2 1.0 59 | 0.2 0.2 0.2 1.0 60 | 0.2 0.2 0.2 1.0 61 | 0.0 0.0 0.0 0.0 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/mech/robot_3d_base.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 | 40 | 41 | 42 | 43 | 44 | 45 | 0 0.7 0 1 46 | 0 0.7 0 1 47 | 0 0.7 0 1 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/robots/robot_3d.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 29 | 30 | 35 | 36 | 41 | 42 | 43 | 48 | 49 | 58 | 59 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/sensors/imu.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | ${gazebo_material_ambient} 64 | ${gazebo_material_diffuse} 65 | ${gazebo_material_specular} 66 | 67 | 68 | ${topic_name} 69 | ${update_rate} 70 | ${always_on} 71 | ${visualize} 72 | ${prefix}${frame_id}_link 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/sensors/lidar.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 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 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | ${gazebo_material_ambient} 85 | ${gazebo_material_diffuse} 86 | ${gazebo_material_specular} 87 | 88 | 89 | ${topic_name} 90 | ${update_rate} 91 | ${always_on} 92 | ${visualize} 93 | 94 | 95 | 96 | ${ray_count} 97 | 1 98 | ${min_angle} 99 | ${max_angle} 100 | 101 | 102 | 1 103 | 1 104 | 0 105 | 0 106 | 107 | 108 | 109 | ${min_range} 110 | ${max_range} 111 | ${range_resolution} 112 | 113 | 114 | ${prefix}${frame_id} 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /mec_mobile_description/urdf/sensors/rgbd_camera.urdf.xacro: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 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 | ${horizontal_fov} 143 | 144 | ${image_width} 145 | ${image_height} 146 | 147 | 148 | ${clip_near} 149 | ${clip_far} 150 | 151 | 152 | ${always_on} 153 | ${prefix}${camera_name}_link 154 | ${camera_name} 155 | ${update_rate} 156 | ${visualize} 157 | 158 | 159 | 160 | 161 | 162 | --------------------------------------------------------------------------------