diff --git a/projects/robots/Makefile b/projects/robots/Makefile index 9196776f31b..bb37f20adac 100644 --- a/projects/robots/Makefile +++ b/projects/robots/Makefile @@ -54,7 +54,8 @@ CONTROLLERS=\ nex/controllers.Makefile \ niryo/ned/controllers.Makefile \ nvidia/jetbot/controllers.Makefile \ - pal_robotics/tiago_base/controllers/tiago_base.Makefile \ + pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base.Makefile \ + pal_robotics/tiago_omni_base/controllers/tiago_omni_base.Makefile \ pal_robotics/tiago_lite/controllers/tiago_lite.Makefile \ pal_robotics/tiago/controllers/tiago.Makefile \ pal_robotics/tiagopp/controllers/tiago++.Makefile \ diff --git a/projects/robots/pal_robotics/tiago/protos/Tiago.proto b/projects/robots/pal_robotics/tiago/protos/Tiago.proto index a8ced17ae13..215a2ced0e5 100644 --- a/projects/robots/pal_robotics/tiago/protos/Tiago.proto +++ b/projects/robots/pal_robotics/tiago/protos/Tiago.proto @@ -4,32 +4,39 @@ # documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/pal_robotics/tiago/protos/Tiago.proto # keywords: robot/wheeled # TIAGo robot from PAL Robotics. -# The robot is composed by the TIAGo base and a body with the front arm. +# The robot is composed by the TIAGo base (PMB2 or OMNI) and a body with the front arm. +# template language: javascript EXTERNPROTO "webots://projects/devices/hokuyo/protos/HokuyoUrg04lxug01.proto" EXTERNPROTO "webots://projects/devices/orbbec/protos/Astra.proto" -EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoBody.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoFrontArm.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoGripper.proto" PROTO Tiago [ - field SFVec3f translation 0 0 0.095 - field SFRotation rotation 0 0 1 0 - field SFString name "TIAGo" - field SFString controller "tiago" - field MFString controllerArgs [] - field SFString window "" - field SFString customData "" - field SFBool supervisor FALSE - field SFBool synchronization TRUE - field SFBool selfCollision FALSE # Enables/disables the detection of collisions within the robot. + field SFVec3f translation 0 0 0 + field SFRotation rotation 0 0 1 0 + field SFString name "TIAGo" + field SFString controller "tiago" + field MFString controllerArgs [] + field SFString window "" + field SFString customData "" + field SFBool supervisor FALSE + field SFBool synchronization TRUE + field SFBool selfCollision FALSE # Enables/disables the detection of collisions within the robot. + field SFString{"PMB2", "OMNI"} base "PMB2" # Defines the base robot. field SFNode endEffectorSlot TiagoGripper {} # Defines the robot end effector. field MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} # Extends the robot with a camera at head level. field MFNode lidarSlot HokuyoUrg04lxug01 {} # Extends the robot with a lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). ] { - TiagoBase { + %< if (fields.base.value == 'PMB2') { >% + TiagoPmb2Base { + %< } else { >% + TiagoOmniBase { + %< } >% translation IS translation rotation IS rotation controller IS controller diff --git a/projects/robots/pal_robotics/tiago/protos/docs/tiago.md b/projects/robots/pal_robotics/tiago/protos/docs/tiago.md index a01cf85caba..21de7f14609 100644 --- a/projects/robots/pal_robotics/tiago/protos/docs/tiago.md +++ b/projects/robots/pal_robotics/tiago/protos/docs/tiago.md @@ -9,24 +9,26 @@ Derived from [Robot](https://cyberbotics.com/doc/reference/robot). ``` Tiago { - SFVec3f translation 0 0 0.095 - SFRotation rotation 0 0 1 0 - SFString name "TIAGo" - SFString controller "tiago" - MFString controllerArgs [] - SFString window "" - SFString customData "" - SFBool supervisor FALSE - SFBool synchronization TRUE - SFBool selfCollision FALSE - SFNode endEffectorSlot TiagoGripper {} - MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} - MFNode lidarSlot HokuyoUrg04lxug01 {} + SFVec3f translation 0 0 0 + SFRotation rotation 0 0 1 0 + SFString name "TIAGo" + SFString controller "tiago" + MFString controllerArgs [] + SFString window "" + SFString customData "" + SFBool supervisor FALSE + SFBool synchronization TRUE + SFBool selfCollision FALSE + SFString{"PMB2, OMNI"} base "PMB2" + SFNode endEffectorSlot TiagoGripper {} + MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} + MFNode lidarSlot HokuyoUrg04lxug01 {} } ``` #### Tiago Field Summary +- `base`: Defines if the robot is using the TIAGo PMB2 or the OMNI base robot. - `endEffectorSlot`: Defines the robot end effector. - `cameraSlot`: Extends the robot with a camera at head level. - `lidarSlot`: Extends the robot with a lidar. diff --git a/projects/robots/pal_robotics/tiago/worlds/tiago.wbt b/projects/robots/pal_robotics/tiago/worlds/tiago.wbt index 0f126bbe66e..d6c4edd35aa 100644 --- a/projects/robots/pal_robotics/tiago/worlds/tiago.wbt +++ b/projects/robots/pal_robotics/tiago/worlds/tiago.wbt @@ -83,7 +83,7 @@ DEF ROOF RectangleArena { } } Tiago { - translation -4.416 1.063 0.095 + translation -4.416 1.063 0 } WoodenBox { translation -6.2 7 0.405 diff --git a/projects/robots/pal_robotics/tiago/worlds/tiago_hey5_hand.wbt b/projects/robots/pal_robotics/tiago/worlds/tiago_hey5_hand.wbt index 65ddd86ba4c..89ca2de5982 100644 --- a/projects/robots/pal_robotics/tiago/worlds/tiago_hey5_hand.wbt +++ b/projects/robots/pal_robotics/tiago/worlds/tiago_hey5_hand.wbt @@ -78,7 +78,7 @@ DEF ROOF RectangleArena { } } Tiago { - translation -4.416 1.063 0.095 + translation -4.416 1.063 0 controller "tiago_hey5_hand" endEffectorSlot TiagoRightHey5 { } diff --git a/projects/robots/pal_robotics/tiago_base/controllers/tiago_base/.gitignore b/projects/robots/pal_robotics/tiago_base/controllers/tiago_base/.gitignore deleted file mode 100644 index 77ddb745731..00000000000 --- a/projects/robots/pal_robotics/tiago_base/controllers/tiago_base/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/tiago_base diff --git a/projects/robots/pal_robotics/tiago_base/protos/docs/tiagobase.md b/projects/robots/pal_robotics/tiago_base/protos/docs/tiagobase.md deleted file mode 100644 index 1bba48e002d..00000000000 --- a/projects/robots/pal_robotics/tiago_base/protos/docs/tiagobase.md +++ /dev/null @@ -1,39 +0,0 @@ -Designed by PAL Robotics, TIAGo Base is a two-wheeled robot. -The model is a modular mobile platform that automates deliveries in industrial environment. It is completely ROS based and customizable with accessories to adapt to any specific need. - -More information on the TIAGo Base robot can be found on their [website](http://pal-robotics.com/robots/tiago-base/) or in the [technical specifications datasheet](http://pal-robotics.com/wp-content/uploads/2019/06/TIAGo-Base_Datasheet.pdf). - -### TiagoBase PROTO - -Derived from [Robot](https://cyberbotics.com/doc/reference/robot). - -``` -TiagoBase { - SFVec3f translation 0 0 0.095 - SFRotation rotation 0 0 1 0 - SFString name "TIAGo Base" - SFString controller "tiago_base" - MFString controllerArgs [] - SFString window "" - SFString customData "" - SFBool supervisor FALSE - SFBool synchronization TRUE - SFBool selfCollision FALSE - SFString model "PAL Robotics - TIAGo Base" - MFNode bodySlot [] - MFNode lidarSlot [] -} -``` - -#### TiagoBase Field Summary - -- `bodySlot`: Extends the robot with new nodes (such as the `TiagoBody` for example). -- `lidarSlot`: Extends the robot with a lidar. - -### Sample - -You will find the following sample in this folder: "[WEBOTS\_HOME/projects/robots/pal\_robotics/tiago\_base/worlds]({{ url.github_tree }}/projects/robots/pal_robotics/tiago_base/worlds)". - -#### [tiago\_base.wbt]({{ url.github_tree }}/projects/robots/pal_robotics/tiago_base/worlds/tiago\_base.wbt) - -![tiago_base.wbt.png](images/tiago_base/tiago_base.wbt.thumbnail.jpg) This simulation shows a TIAGo Base moving in an industrial environment using a Braitenberg algorithm using the information received by its lidar. diff --git a/projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto b/projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto index 194a8eda5c4..296d2d13747 100644 --- a/projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto +++ b/projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto @@ -4,29 +4,35 @@ # documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto # keywords: robot/wheeled # LITE version of the TIAGo robot from PAL Robotics. -# The robot is composed by the TIAGo base and a body without arm. +# The robot is composed by the TIAGo base (PMB2 or OMNI) and a body without arm. EXTERNPROTO "webots://projects/devices/hokuyo/protos/HokuyoUrg04lxug01.proto" EXTERNPROTO "webots://projects/devices/orbbec/protos/Astra.proto" -EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoBody.proto" PROTO TiagoLite [ - field SFVec3f translation 0 0 0.095 - field SFRotation rotation 0 0 1 0 - field SFString name "TIAGo LITE" - field SFString controller "tiago_lite" - field MFString controllerArgs [] - field SFString window "" - field SFString customData "" - field SFBool supervisor FALSE - field SFBool synchronization TRUE - field SFBool selfCollision FALSE # Enables/disables the detection of collisions within the robot. - field MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} # Extends the robot with a camera at head level. - field MFNode lidarSlot HokuyoUrg04lxug01 {} # Extends the robot with a lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). + field SFVec3f translation 0 0 0 + field SFRotation rotation 0 0 1 0 + field SFString name "TIAGo LITE" + field SFString controller "tiago_lite" + field MFString controllerArgs [] + field SFString window "" + field SFString customData "" + field SFBool supervisor FALSE + field SFBool synchronization TRUE + field SFBool selfCollision FALSE # Enables/disables the detection of collisions within the robot. + field SFString{"PMB2", "OMNI"} base "PMB2" # Defines the base robot. + field MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} # Extends the robot with a camera at head level. + field MFNode lidarSlot HokuyoUrg04lxug01 {} # Extends the robot with a lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). ] { - TiagoBase { + %< if (fields.base.value == 'PMB2') { >% + TiagoPmb2Base { + %< } else { >% + TiagoOmniBase { + %< } >% translation IS translation rotation IS rotation controller IS controller diff --git a/projects/robots/pal_robotics/tiago_lite/protos/docs/tiagolite.md b/projects/robots/pal_robotics/tiago_lite/protos/docs/tiagolite.md index 90df7e3ef82..df3d5be138a 100644 --- a/projects/robots/pal_robotics/tiago_lite/protos/docs/tiagolite.md +++ b/projects/robots/pal_robotics/tiago_lite/protos/docs/tiagolite.md @@ -10,23 +10,25 @@ Derived from [Robot](https://cyberbotics.com/doc/reference/robot). ``` TiagoLite { - SFVec3f translation 0 0 0.095 - SFRotation rotation 0 0 1 0 - SFString name "TIAGo LITE" - SFString controller "tiago_lite" - MFString controllerArgs [] - SFString window "" - SFString customData "" - SFBool supervisor FALSE - SFBool synchronization TRUE - SFBool selfCollision FALSE - MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} - MFNode lidarSlot HokuyoUrg04lxug01 {} + SFVec3f translation 0 0 0 + SFRotation rotation 0 0 1 0 + SFString name "TIAGo LITE" + SFString controller "tiago_lite" + MFString controllerArgs [] + SFString window "" + SFString customData "" + SFBool supervisor FALSE + SFBool synchronization TRUE + SFBool selfCollision FALSE + SFString{"PMB2, OMNI"} base "PMB2" + MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} + MFNode lidarSlot HokuyoUrg04lxug01 {} } ``` #### TiagoLite Field Summary +- `base`: Defines if the robot is using the TIAGo PMB2 or the OMNI base robot. - `cameraSlot`: Extends the robot with a camera at head level. - `lidarSlot`: Extends the robot with a lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). diff --git a/projects/robots/pal_robotics/tiago_lite/worlds/tiago_lite.wbt b/projects/robots/pal_robotics/tiago_lite/worlds/tiago_lite.wbt index 62973283c3d..339b1f94c50 100644 --- a/projects/robots/pal_robotics/tiago_lite/worlds/tiago_lite.wbt +++ b/projects/robots/pal_robotics/tiago_lite/worlds/tiago_lite.wbt @@ -79,7 +79,7 @@ DEF ROOF RectangleArena { } } TiagoLite { - translation -4.416 1.063 0.095 + translation -4.416 1.063 0 } WoodenBox { translation -6.2 7 0.405 diff --git a/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/.gitignore b/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/.gitignore new file mode 100644 index 00000000000..bf5409df12a --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/.gitignore @@ -0,0 +1 @@ +/tiago_omni_base diff --git a/projects/robots/pal_robotics/tiago_base/controllers/tiago_base/Makefile b/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/Makefile similarity index 100% rename from projects/robots/pal_robotics/tiago_base/controllers/tiago_base/Makefile rename to projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/Makefile diff --git a/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/tiago_omni_base.c b/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/tiago_omni_base.c new file mode 100644 index 00000000000..6a730ad83ef --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/controllers/tiago_omni_base/tiago_omni_base.c @@ -0,0 +1,210 @@ +/* + * Copyright 1996-2023 Cyberbotics Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * Description: Simple avoidance controller + * The velocity of each wheel is set according to a + * Braitenberg-like algorithm which takes the values returned + * by the Lidar as input. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define SPEED 4.0 +#define MAX_SPEED 6.4 +#define CRUISING_SPEED 3.0 +#define FAR_OBSTACLE_THRESHOLD 0.2 +#define NEAR_OBSTACLE_THRESHOLD 0.6 +#define FAST_DECREASE_FACTOR 0.9 +#define SLOW_DECREASE_FACTOR 0.5 +#define USED_POINTS 545 +#define N_SECTOR 5 + +static WbDeviceTag wheels[4]; + +// Utility functions to drove the omnidirectional wheels. + +static void base_set_wheel_speeds_helper(double speeds[4]) { + for (int i = 0; i < 4; i++) + wb_motor_set_velocity(wheels[i], speeds[i]); +} + +static void base_forwards() { + static double speeds[4] = {SPEED, SPEED, SPEED, SPEED}; + base_set_wheel_speeds_helper(speeds); +} + +/* +static void base_backwards() { + static double speeds[4] = {-SPEED, -SPEED, -SPEED, -SPEED}; + base_set_wheel_speeds_helper(speeds); +} + +static void base_strafe_right() { + static double speeds[4] = {-SPEED, SPEED, -SPEED, SPEED}; + base_set_wheel_speeds_helper(speeds); +} + +static void base_strafe_left() { + static double speeds[4] = {SPEED, -SPEED, SPEED, -SPEED}; + base_set_wheel_speeds_helper(speeds); +} + + +static void base_turn_left() { + static double speeds[4] = {SPEED, -SPEED, -SPEED, SPEED}; + base_set_wheel_speeds_helper(speeds); +} + +static void base_turn_right() { + static double speeds[4] = {-SPEED, SPEED, SPEED, -SPEED}; + base_set_wheel_speeds_helper(speeds); +} +*/ + +static double check_speed(double speed) { + if (speed > MAX_SPEED) + speed = MAX_SPEED; + return speed; +} + +int main(int argc, char **argv) { + // init webots stuff + wb_robot_init(); + + const int time_step = wb_robot_get_basic_time_step(); + + // init motors + wheels[0] = wb_robot_get_device("wheel_front_left_joint"); + wheels[1] = wb_robot_get_device("wheel_front_right_joint"); + wheels[2] = wb_robot_get_device("wheel_rear_left_joint"); + wheels[3] = wb_robot_get_device("wheel_rear_right_joint"); + for (int i = 0; i < 4; ++i) + wb_motor_set_position(wheels[i], INFINITY); + + // init lidar + WbDeviceTag lidar = wb_robot_get_device("base_front_laser"); + wb_lidar_enable(lidar, time_step); + const int lidar_width = wb_lidar_get_horizontal_resolution(lidar); // 818 points + const int front_points = lidar_width * 2 / 3; // 545 points + if (USED_POINTS > front_points) + fprintf(stderr, "Too many lidar points are used for navigation.\n"); + const int start_point = lidar_width / 3 + (front_points - USED_POINTS) / 2; + const int end_point = start_point + USED_POINTS; + + // defines sector range + int sector_range[N_SECTOR] = {0}; + int sector_size = (USED_POINTS - 1.0) / N_SECTOR; + for (int i = 0; i < N_SECTOR; i++) + sector_range[i] = (i + 1) * sector_size + start_point; + + // defines useful points (above 2.5m points not used) + const double range_threshold = 2.5; + const float *lidar_values = NULL; + + // init dynamic variables + double left_obstacle = 0.0, right_obstacle = 0.0; + double front_obstacle = 0.0, front_left_obstacle = 0.0, front_right_obstacle = 0.0; + + base_forwards(); + // control loop + double left_speed, right_speed; + while (wb_robot_step(time_step) != -1) { + // get lidar values + lidar_values = wb_lidar_get_range_image(lidar); + + for (int i = start_point; i <= end_point; ++i) { + if (lidar_values[i] < range_threshold) { + const double v = 1.0 - lidar_values[i] / range_threshold; + if (i < sector_range[0]) + right_obstacle += v; + else if (i < sector_range[1]) + front_right_obstacle += v; + else if (sector_range[2]) + front_obstacle += v; + else if (i < sector_range[3]) + front_left_obstacle += v; + else if (i < (sector_range[4] + 1)) + left_obstacle += v; + } + } + left_obstacle /= sector_size; + front_left_obstacle /= sector_size; + front_obstacle /= sector_size; + front_right_obstacle /= sector_size; + right_obstacle /= sector_size; + + // compute the speed according to the information on obstacles + if (left_obstacle > right_obstacle && left_obstacle > NEAR_OBSTACLE_THRESHOLD) { + const double speed_factor = (1.0 - FAST_DECREASE_FACTOR * left_obstacle) * MAX_SPEED / left_obstacle; + left_speed = check_speed(speed_factor * left_obstacle); + right_speed = check_speed(speed_factor * right_obstacle); + + } else if (front_left_obstacle > front_right_obstacle && front_left_obstacle > FAR_OBSTACLE_THRESHOLD) { + const double speed_factor = (1.0 - SLOW_DECREASE_FACTOR * front_left_obstacle) * MAX_SPEED / front_left_obstacle; + left_speed = check_speed(speed_factor * front_left_obstacle); + right_speed = check_speed(speed_factor * front_right_obstacle); + + } else if (front_right_obstacle > front_left_obstacle && front_right_obstacle > FAR_OBSTACLE_THRESHOLD) { + const double speed_factor = (1.0 - SLOW_DECREASE_FACTOR * front_right_obstacle) * MAX_SPEED / front_right_obstacle; + left_speed = check_speed(speed_factor * front_left_obstacle); + right_speed = check_speed(speed_factor * front_right_obstacle); + + } else if (right_obstacle > left_obstacle && right_obstacle > NEAR_OBSTACLE_THRESHOLD) { + const double speed_factor = (1.0 - FAST_DECREASE_FACTOR * right_obstacle) * MAX_SPEED / right_obstacle; + left_speed = check_speed(speed_factor * left_obstacle); + right_speed = check_speed(speed_factor * right_obstacle); + + } else if (front_obstacle > NEAR_OBSTACLE_THRESHOLD) { + const double speed_factor = (1.0 - FAST_DECREASE_FACTOR * front_obstacle) * MAX_SPEED / front_obstacle; + // more obstacles on the right, so make a left u-turn to avoid being stuck + if (front_right_obstacle > front_left_obstacle || right_obstacle > left_obstacle) { + right_speed = check_speed(speed_factor * front_obstacle); + left_speed = -right_speed; + } else { + left_speed = check_speed(speed_factor * front_obstacle); + right_speed = -left_speed; + } + wb_robot_step(1); + + } else { + left_speed = CRUISING_SPEED; + right_speed = CRUISING_SPEED; + } + + if (!isnan(left_speed) && !isnan(right_speed)) { + // set actuators + double speed[4] = {right_speed, left_speed, left_speed, right_speed}; + base_set_wheel_speeds_helper(speed); + } + + // reset dynamic variables to zero + left_obstacle = 0.0; + front_left_obstacle = 0.0; + front_obstacle = 0.0; + front_right_obstacle = 0.0; + right_obstacle = 0.0; + } + + wb_robot_cleanup(); + + return 0; +} diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto b/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto new file mode 100644 index 00000000000..84279e9606b --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto @@ -0,0 +1,233 @@ +#VRML_SIM R2023b utf8 +# license: Apache License 2.0 +# license url: http://www.apache.org/licenses/LICENSE-2.0 +# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto +# keywords: robot/wheeled +# Model of the robot TIAGo OMNI Base from PAL Robotics. +# The TIAGo base robot that can be extended with different features to fullfil your requirement. + +EXTERNPROTO "webots://projects/appearances/protos/GlossyPaint.proto" +EXTERNPROTO "webots://projects/appearances/protos/MattePaint.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBaseWheel.proto" + +PROTO TiagoOmniBase [ + field SFVec3f translation 0 0 0 + field SFRotation rotation 0 0 1 0 + field SFString name "TIAGo OMNI Base" + field SFString controller "tiago_omni_base" + field MFString controllerArgs [] + field SFString window "" + field SFString customData "" + field SFBool supervisor FALSE + field SFBool synchronization TRUE + field SFBool selfCollision FALSE + field SFString model "PAL Robotics - TIAGo OMNI Base" + field MFNode bodySlot [] # Extends the robot with a body (such as the TiagoBody or fixed shelves, safety box, roller conveyor, boxes, lifter for example). + field MFNode lidarSlot [] # Extends the robot with a front lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). +] +{ + Robot { + translation IS translation + rotation IS rotation + controller IS controller + controllerArgs IS controllerArgs + customData IS customData + supervisor IS supervisor + synchronization IS synchronization + selfCollision IS selfCollision + children [ + Accelerometer { + } + InertialUnit { + } + Gyro { + } + GPS { + } + DEF BASE_SHAPE Pose { + translation 0 0 0.0762 + children [ + Shape { + appearance GlossyPaint { + baseColor 0.823529 0.776471 0.776471 + textureTransform TextureTransform { + scale 4 4 + } + IBLStrength 1.8 + } + geometry DEF base_link Mesh { + url "meshes/base.stl" + } + } + ] + } + DEF REAR_LIDAR Pose { + translation -0.275120 0.182970 0.208640 + rotation -0.382683 -0.923880 0.000000 3.141593 + children [ + DEF SICK_TIM51_SHAPE Shape { + appearance DEF DARK_GREY_MATERIAL GlossyPaint { + baseColor 0.5 0.5 0.5 + } + geometry Mesh { + url "meshes/sick_tim551.stl" + } + } + Lidar { + name "base_rear_laser" + horizontalResolution 818 + fieldOfView 4.712389 + numberOfLayers 1 + minRange 0.05 + maxRange 25 + noise 0.0024 + resolution 0.001 + } + ] + } + DEF FRONT_LIDAR Pose { + translation 0.27512 -0.18297 0.20864 + rotation -0.9238797538373538 0.38268289803626016 0 3.141593 + children IS lidarSlot + } + DEF BASE_DOCK Pose { + translation 0.3535 0 0.1358 + children [ + Shape { + appearance GlossyPaint { + baseColor 0.25098 0.25098 0.25098 + } + geometry Mesh { + url "meshes/base_dock.stl" + } + } + ] + } + DEF BASE_RIGHT_ANTENNA Pose { + translation -0.2015 -0.13 0.2927 + children [ + DEF BASE_ANTENNA_SHAPE Shape { + appearance MattePaint { + baseColor 0.239216 0.219608 0.27451 + } + geometry Mesh { + url "meshes/base_antenna.stl" + } + } + ] + } + DEF BASE_LEFT_ANTENNA Transform { + translation -0.2015 0.13 0.2927 + scale 1 -1 1 + children [ + USE BASE_ANTENNA_SHAPE + ] + } + TiagoOmniBaseWheel { + translation 0.244 -0.1725 0.0762 + rotation 0 0 -1 1.570796 + } + TiagoOmniBaseWheel { + translation 0.244 0.1725 0.0762 + rotation 0 0 1 1.570796 + name "wheel_front_left" + } + TiagoOmniBaseWheel { + translation -0.244 -0.1725 0.0762 + rotation 0 0 -1 1.570796 + name "wheel_rear_right" + } + TiagoOmniBaseWheel { + translation -0.244 0.1725 0.0762 + rotation 0 0 1 1.570796 + name "wheel_rear_left" + } + Pose { + translation -0.006 0 0.11 + children IS bodySlot + } + ] + model IS model + boundingObject Group { + children [ + Pose { + translation 0 0 0.26545 + children [ + Box { + size 0.717 0.497 0.0845 + } + ] + } + Pose { + translation 0 0 0.2082 + children [ + Box { + size 0.58 0.39 0.03 + } + ] + } + Pose { + translation 0 0 0.1097 + children [ + Box { + size 0.705 0.48 0.167 + } + ] + } + DEF BASE_RIGHT_ANTENNA Pose { + translation -0.2015 -0.13 0.3118 + children [ + Cylinder { + height 0.02 + radius 0.007 + } + ] + } + DEF RIGHT_ANTENNA Pose { + translation -0.1323 -0.1508 0.3238 + rotation -0.14539595746761758 -0.978631713722864 -0.14539595746761758 1.5924 + children [ + Cylinder { + height 0.154 + radius 0.007 + } + ] + translationStep 0.005 + rotationStep 0.05 + } + DEF BASE_LEFT_ANTENNA Pose { + translation -0.2015 0.13 0.3118 + children [ + Cylinder { + height 0.02 + radius 0.007 + } + ] + } + DEF LEFT_ANTENNA Pose { + translation -0.1323 0.1508 0.3238 + rotation 0.14194899911629652 -0.9796429939012327 0.14195099911628406 1.59136 + children [ + Cylinder { + height 0.154 + radius 0.007 + } + ] + } + ] + } + physics Physics { + density -1 + mass 34.047 + centerOfMass [ + 0.002674 0.000275 0.086363 + ] + inertiaMatrix [ + 0.22777 0.29991 0.46036 + 0.00035979 0.00015269 1.7872e-05 + ] + } + name IS name + window IS window + } +} diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBaseWheel.proto b/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBaseWheel.proto new file mode 100644 index 00000000000..3a4c770cb39 --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBaseWheel.proto @@ -0,0 +1,125 @@ +#VRML_SIM R2023b utf8 +# license: Apache License 2.0 +# license url: http://www.apache.org/licenses/LICENSE-2.0 +# Model of a joint wheel of the robot TIAGo OMNI Base from PAL Robotics. +# tags: hidden +# template language: javascript + +EXTERNPROTO "webots://projects/appearances/protos/GlossyPaint.proto" +EXTERNPROTO "webots://projects/appearances/protos/MattePaint.proto" + +PROTO TiagoOmniBaseWheel [ + field SFVec3f translation 0 0 0 + field SFRotation rotation 0 0 1 0 + field SFString{"wheel_front_right", "wheel_front_left", "wheel_rear_right", "wheel_rear_left"} + name "wheel_front_right" +] +{ + %< + const is_front = fields.name.value == "wheel_front_right" || fields.name.value == "wheel_front_left"; + const is_right = fields.name.value == "wheel_front_right" || fields.name.value == "wheel_rear_right"; + const front_string = is_front ? "front" : "rear"; + const right_string = is_right ? "right" : "left"; + >% + Solid { + translation IS translation + rotation IS rotation + children [ + DEF SUSPENSION Shape { + appearance GlossyPaint { + baseColor 0.79216 0.81961 0.93333 + } + geometry Mesh { + url %<= '"meshes/suspension_' + front_string + '.stl"' >% + } + } + HingeJoint { + jointParameters HingeJointParameters { + %< if (!is_right) { >% + axis 1 0 0 + %< } else { >% + axis -1 0 0 + %< } >% + anchor 0.050675 0 0 + } + device [ + RotationalMotor { + name %<= '"' + fields.name.value + '_joint"' >% + maxVelocity 13.123 + maxTorque 6.0 + } + PositionSensor { + name %<= '"' + fields.name.value + '_joint_sensor"' >% + } + ] + endPoint Solid { + translation 0.050675 0 0 + %< if (is_right) { >% + rotation -0.577350 -0.577350 0.577350 2.094395 + %< } else { >% + rotation -0.577350 0.577350 -0.577350 2.094395 + %< } >% + children [ + %< if (!is_right) { >% + Transform { + scale 1 1 -1 + children [ + %< } >% + DEF WHEEL_SHAPE Shape { + appearance MattePaint { + baseColor 0.5 0.5 0.5 + } + geometry Mesh { + url "meshes/wheel.stl" + %< if (!is_right) { >% + ccw FALSE + %< } >% + } + } + %< if (!is_right) { >% + ] + } + %< } >% + ] + name %<= '"' + fields.name + '_link"' >% + contactMaterial %<= '"TIAGo OMNI ' + right_string + ' wheel material"' >% + boundingObject Cylinder { + radius 0.0762 + height 0.05 + } + physics Physics { + density -1 + mass 0.707670 + centerOfMass [ + %< if (!is_right) { >% + 0 0 0.011144 + %< } else { >% + 0 0 -0.011144 + %< } >% + ] + } + } + } + ] + name %<= '"suspension_' + front_string + '_' + right_string + '_link"' >% + boundingObject DEF SUSPENSION_BO Pose { + translation -0.02 0 -0.007 + children [ + Box { + size 0.07 0.15 0.05 + } + ] + } + physics Physics { + density -1 + mass 1.287900 + centerOfMass [ + %< if (!is_right) { >% + -0.058182 0 -0.005770 + %< } else { >% + -0.058182 0 -0.005770 + %< } >% + ] + } + } +} \ No newline at end of file diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/docs/images/tiago_omni_base/tiago_omni_base.wbt.png b/projects/robots/pal_robotics/tiago_omni_base/protos/docs/images/tiago_omni_base/tiago_omni_base.wbt.png new file mode 100644 index 00000000000..2e82fb8e518 Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/docs/images/tiago_omni_base/tiago_omni_base.wbt.png differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/docs/images/tiago_omni_base/tiago_omni_base.wbt.thumbnail.jpg b/projects/robots/pal_robotics/tiago_omni_base/protos/docs/images/tiago_omni_base/tiago_omni_base.wbt.thumbnail.jpg new file mode 100644 index 00000000000..580c49f9670 Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/docs/images/tiago_omni_base/tiago_omni_base.wbt.thumbnail.jpg differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/docs/tiagoomnibase.md b/projects/robots/pal_robotics/tiago_omni_base/protos/docs/tiagoomnibase.md new file mode 100644 index 00000000000..56832d972a6 --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/protos/docs/tiagoomnibase.md @@ -0,0 +1,40 @@ +Designed by PAL Robotics, TIAGo OMNI Base is a mecanum omnidirectional robot. +The model is a modular mobile platform that automates deliveries in industrial environment. +It is completely ROS based and customizable with accessories to adapt to any specific need. + +More information on the TIAGo OMNI Base robot can be found on their [website](http://pal-robotics.com/robots/tiago-base/) or in the [technical specifications datasheet](https://pal-robotics.com/wp-content/uploads/2022/11/Datasheet-TIAGo-OMNI-Base.pdf). + +### TiagoOmniBase PROTO + +Derived from [Robot](https://cyberbotics.com/doc/reference/robot). + +``` +TiagoOmniBase { + SFVec3f translation 0 0 0 + SFRotation rotation 0 0 1 0 + SFString name "TIAGo OMNI Base" + SFString controller "tiago_omni_base" + MFString controllerArgs [] + SFString window "" + SFString customData "" + SFBool supervisor FALSE + SFBool synchronization TRUE + SFBool selfCollision FALSE + SFString model "PAL Robotics - TIAGo OMNI Base" + MFNode bodySlot [] + MFNode lidarSlot [] +} +``` + +#### TiagoBase Field Summary + +- `bodySlot`: Extends the robot with new nodes (such as the `TiagoBody` for example). +- `lidarSlot`: Extends the robot with a front lidar sensor. + +### Sample + +You will find the following sample in this folder: "[WEBOTS\_HOME/projects/robots/pal\_robotics/tiago\_omni\_base/worlds]({{ url.github_tree }}/projects/robots/pal_robotics/tiago_omni_base/worlds)". + +#### [tiago\_omni\_base.wbt]({{ url.github_tree }}/projects/robots/pal_robotics/tiago_base/worlds/tiago\_omni\_base.wbt) + +![tiago_omni_base.wbt.png](images/tiago_omni_base/tiago_omni_base.wbt.thumbnail.jpg) This simulation shows a TIAGo OMNI Base moving in an industrial environment using a Braitenberg algorithm using the information received by its lidar. diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/icons/TiagoOmniBase.png b/projects/robots/pal_robotics/tiago_omni_base/protos/icons/TiagoOmniBase.png new file mode 100644 index 00000000000..062520aa196 Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/icons/TiagoOmniBase.png differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base.stl new file mode 100644 index 00000000000..7e4c077212b Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base.stl differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base_antenna.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base_antenna.stl new file mode 100644 index 00000000000..d357b1ea055 Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base_antenna.stl differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base_dock.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base_dock.stl new file mode 100644 index 00000000000..58b63a4d6df Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/base_dock.stl differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/sick_tim551.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/sick_tim551.stl new file mode 100644 index 00000000000..960b8412a9c Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/sick_tim551.stl differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/suspension_front.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/suspension_front.stl new file mode 100644 index 00000000000..92381df305b Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/suspension_front.stl differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/suspension_rear.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/suspension_rear.stl new file mode 100644 index 00000000000..37e6eb638fa Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/suspension_rear.stl differ diff --git a/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/wheel.stl b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/wheel.stl new file mode 100644 index 00000000000..f63898f70af Binary files /dev/null and b/projects/robots/pal_robotics/tiago_omni_base/protos/meshes/wheel.stl differ diff --git a/projects/robots/pal_robotics/tiago_base/webots.yaml b/projects/robots/pal_robotics/tiago_omni_base/webots.yaml similarity index 100% rename from projects/robots/pal_robotics/tiago_base/webots.yaml rename to projects/robots/pal_robotics/tiago_omni_base/webots.yaml diff --git a/projects/robots/pal_robotics/tiago_omni_base/worlds/.tiago_omni_base.wbproj b/projects/robots/pal_robotics/tiago_omni_base/worlds/.tiago_omni_base.wbproj new file mode 100644 index 00000000000..8aea019d882 --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/worlds/.tiago_omni_base.wbproj @@ -0,0 +1,11 @@ +Webots Project File version R2023b +perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff000000000000000000000001000002a5000003d2fc0200000001fb0000001400540065007800740045006400690074006f00720100000016000003d2000000a200ffffff0000000300000a0000000177fc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073d0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000005400ffffff00000755000003d200000001000000020000000100000008fc00000000 +simulationViewPerspectives: 000000ff00000001000000020000017a0000030b0100000006010000000100 +sceneTreePerspectives: 000000ff000000010000000300000016000000c0000000fd0100000006010000000200 +maximizedDockId: -1 +centralWidgetVisible: 1 +orthographicViewHeight: 1 +textFiles: 0 "controllers/tiago_omni_base/tiago_omni_base.c" +consoles: Console:All:All +renderingDevicePerspectives: TIAGo:Astra depth;1;1;0;0 +renderingDevicePerspectives: TIAGo:Astra rgb;1;1;0;0 diff --git a/projects/robots/pal_robotics/tiago_omni_base/worlds/tiago_omni_base.wbt b/projects/robots/pal_robotics/tiago_omni_base/worlds/tiago_omni_base.wbt new file mode 100644 index 00000000000..eb8ace65f1c --- /dev/null +++ b/projects/robots/pal_robotics/tiago_omni_base/worlds/tiago_omni_base.wbt @@ -0,0 +1,515 @@ +#VRML_SIM R2023b utf8 + +EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackground.proto" +EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackgroundLight.proto" +EXTERNPROTO "webots://projects/objects/floors/protos/RectangleArena.proto" +EXTERNPROTO "webots://projects/appearances/protos/ThreadMetalPlate.proto" +EXTERNPROTO "webots://projects/appearances/protos/Roughcast.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto" +EXTERNPROTO "webots://projects/objects/factory/containers/protos/WoodenBox.proto" +EXTERNPROTO "webots://projects/objects/solids/protos/SolidBox.proto" +EXTERNPROTO "webots://projects/objects/factory/conveyors/protos/ConveyorBelt.proto" +EXTERNPROTO "webots://projects/objects/factory/fire_extinguisher/protos/FireExtinguisher.proto" +EXTERNPROTO "webots://projects/objects/factory/pallet/protos/WoodenPalletStack.proto" +EXTERNPROTO "webots://projects/objects/factory/pallet/protos/WoodenPallet.proto" +EXTERNPROTO "webots://projects/objects/factory/tools/protos/PlatformCart.proto" +EXTERNPROTO "webots://projects/objects/living_room_furniture/protos/Sofa.proto" +EXTERNPROTO "webots://projects/objects/tables/protos/Table.proto" +EXTERNPROTO "webots://projects/objects/lights/protos/FloorLight.proto" +EXTERNPROTO "webots://projects/objects/panels/protos/PanelWithTubes.proto" +EXTERNPROTO "webots://projects/objects/plants/protos/PottedTree.proto" +EXTERNPROTO "webots://projects/objects/lights/protos/DoubleFluorescentLamp.proto" +EXTERNPROTO "webots://projects/objects/stairs/protos/StraightStairs.proto" +EXTERNPROTO "webots://projects/appearances/protos/BrushedAluminium.proto" +EXTERNPROTO "webots://projects/objects/stairs/protos/StraightStairsRail.proto" +EXTERNPROTO "webots://projects/appearances/protos/Rubber.proto" +EXTERNPROTO "webots://projects/objects/obstacles/protos/OilBarrel.proto" +EXTERNPROTO "webots://projects/objects/traffic/protos/TrafficCone.proto" + +WorldInfo { + info [ + "This simulation shows a TIAGo Base moving in an industrial environment using a Braitenberg algorithm using the information received by its lidar." + ] + title "Simulation of PAL Robotics' TIAGo Base robot" + contactProperties [ + ContactProperties { + material1 "TIAGo OMNI left wheel material" + coulombFriction [ + 0, 2, 0 + ] + frictionRotation -0.785398 0 + bounce 0 + forceDependentSlip [ + 10, 0 + ] + } + ContactProperties { + material1 "TIAGo OMNI right wheel material" + coulombFriction [ + 0, 2, 0 + ] + frictionRotation 0.785398 0 + bounce 0 + forceDependentSlip [ + 10, 0 + ] + } + ] +} +Viewpoint { + orientation 0.20751120549208074 -0.11304365292794208 -0.9716790787744328 4.115251609826259 + position 5.769000662444619 -10.400512526477433 7.163070369507875 + follow "TIAGo Base" + followSmoothness 0 +} +TexturedBackground { + texture "factory" + skybox FALSE +} +TexturedBackgroundLight { + texture "factory" +} +RectangleArena { + floorSize 15 15 + floorTileSize 1 1 + floorAppearance ThreadMetalPlate { + } + wallHeight 2.5 + wallAppearance Roughcast { + colorOverride 0.533333 0.541176 0.521569 + textureTransform TextureTransform { + scale 5 1.75 + } + } +} +DEF ROOF RectangleArena { + translation 0 0 2.5 + rotation 1 0 0 3.141592653589793 + name "rectangle arena(1)" + floorSize 15 15 + floorTileSize 1 1 + floorAppearance Roughcast { + colorOverride 0.533333 0.541176 0.521569 + textureTransform TextureTransform { + scale 5 1.75 + } + } + wallHeight 2.5 + wallAppearance Roughcast { + colorOverride 0.533333 0.541176 0.521569 + textureTransform TextureTransform { + scale 5 1.75 + } + } +} +TiagoOmniBase { + translation -4.416 1.063 0 + lidarSlot [ + Lidar { + name "base_front_laser" + horizontalResolution 818 + fieldOfView 4.71 + numberOfLayers 1 + minRange 0.05 + maxRange 25 + noise 0.0024 + resolution 0.001 + } + ] +} +WoodenBox { + translation -6.2 7 0.405 +} +WoodenBox { + translation -4.6 7 0.405 + name "wooden box(1)" +} +WoodenBox { + translation -0.189 0.174 0.3 + name "wooden box(2)" +} +WoodenBox { + translation -0.098 0.994 0.3 + rotation 0 0 1 -2.618 + name "wooden box(3)" +} +WoodenBox { + translation 0.248 0.48 0.901 + rotation 0 0 1 -0.524 + name "wooden box(4)" +} +WoodenBox { + translation 0.631 0.397 0.3 + rotation 0 0 1 0.262 + name "wooden box(5)" +} +WoodenBox { + translation -2.99 -4 0.44 + name "wooden box(6)" +} +WoodenBox { + translation 0 -4 1.1 + name "wooden box(7)" +} +WoodenBox { + translation 3.6 -4 1.1 + name "wooden box(8)" +} +WoodenBox { + translation 7.18 -4 1.1 + name "wooden box(9)" +} +WoodenBox { + translation 0 -6 1.1 + name "wooden box(10)" +} +WoodenBox { + translation 3.6 -6 1.1 + name "wooden box(11)" +} +WoodenBox { + translation 7.18 -6 1.1 + name "wooden box(12)" +} +SolidBox { + translation 7.49 -4 0.85 + size 0.03 1.7 1 + appearance PBRAppearance { + baseColor 0 0 0 + baseColorMap ImageTexture { + url [ + "webots://projects/default/worlds/textures/tagged_wall.jpg" + ] + } + roughness 0.5 + metalness 0 + } +} +SolidBox { + translation 7.49 -6 0.85 + name "box(2)" + size 0.03 1.7 1 + appearance PBRAppearance { + baseColor 0 0 0 + baseColorMap ImageTexture { + url [ + "webots://projects/default/worlds/textures/tagged_wall.jpg" + ] + } + roughness 0.5 + metalness 0 + } +} +ConveyorBelt { + translation 2.47 -4 0 + rotation 1 0 0 0 + size 10 0.8 0.8 + speed 0 +} +ConveyorBelt { + translation 2.47 -6 0 + rotation 1 0 0 0 + name "conveyor belt(1)" + size 10 0.8 0.8 + speed 0 +} +FireExtinguisher { + translation -1.18 7.38 0 +} +WoodenPalletStack { + translation -7 6.85 0 + rotation 0 0 1 1.5708 +} +WoodenPalletStack { + translation -5.4 6.85 0 + rotation 0 0 1 1.5708 + name "wooden pallet stack(1)" +} +WoodenPalletStack { + translation -3.8 6.85 0 + rotation 0 0 1 1.5708 + name "wooden pallet stack(2)" +} +WoodenPalletStack { + translation -2.2 6.85 0 + rotation 0 0 1 1.5708 + name "wooden pallet stack(3)" +} +WoodenPallet { + translation -6.24 -5.27 0 + rotation 0 0 1 1.8326 +} +WoodenPallet { + translation -3.11 -4 0 + rotation 0 0 -1 -5.307179586466759e-06 + name "wooden pallet(1)" +} +WoodenPallet { + translation -3.112 -6 0 + rotation 0 0 -1 -5.307179586466759e-06 + name "wooden pallet(2)" +} +WoodenPallet { + translation -6.274 -5.328 0.141 + rotation 0 0 1 -0.524 + name "wooden pallet(3)" +} +WoodenPallet { + translation -6.318 -5.083 0.282 + rotation 0 0 1 0.524 + name "wooden pallet(4)" +} +WoodenPallet { + translation -6.326 -5.112 0.423 + name "wooden pallet(5)" +} +PlatformCart { + translation 0.472 -0.498 0 + rotation 0 0 -1 -0.524 +} +PlatformCart { + translation -4.6 7 0 + rotation 0 0 1 1.5708 + name "platform cart(1)" +} +PlatformCart { + translation -6.2 7 0 + rotation 0 0 -1 -1.571 + name "platform cart(2)" +} +Sofa { + translation 5.586 7.001 0 + rotation 0 0 1 -1.571 +} +Sofa { + translation 6.99 5.543 0 + rotation 0 0 1 3.1416 + name "sofa(1)" +} +Table { + translation 5.507 5.65 0 + size 1 1 0.4 +} +FloorLight { + translation 7.073 7.105 0 +} +PanelWithTubes { + translation 7.1 3.65 0 + rotation 0 0 1 -1.5707953071795862 +} +PanelWithTubes { + translation 6.32 3.65 0 + rotation 0 0 1 -1.5707953071795862 + name "panel with tubes(1)" +} +PanelWithTubes { + translation 5.54 3.65 0 + rotation 0 0 1 -1.5707953071795862 + name "panel with tubes(2)" +} +PanelWithTubes { + translation 4.76 3.65 0 + rotation 0 0 1 -1.5707953071795862 + name "panel with tubes(3)" +} +PanelWithTubes { + translation 3.98 3.65 0 + rotation 0 0 1 -1.5707953071795862 + name "panel with tubes(4)" +} +PanelWithTubes { + translation 3.2 4.47 0 + rotation 0 0 1 3.14139 + name "panel with tubes(5)" +} +PanelWithTubes { + translation 3.2 5.25 0 + rotation 0 0 1 3.14139 + name "panel with tubes(6)" +} +PanelWithTubes { + translation 3.2 6.03 0 + rotation 0 0 1 3.14139 + name "panel with tubes(7)" +} +PanelWithTubes { + translation 2.77 6.45 0 + rotation 0 0 -1 1.5748 + name "panel with tubes(8)" +} +PottedTree { + translation 3.339 3.785 0 +} +DoubleFluorescentLamp { + translation -5 -5 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 +} +DoubleFluorescentLamp { + translation -5 0 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(1)" +} +DoubleFluorescentLamp { + translation -5 5 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(2)" +} +DoubleFluorescentLamp { + translation 0 -5 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(3)" +} +DoubleFluorescentLamp { + translation 0 0 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(4)" +} +DoubleFluorescentLamp { + translation 0 5 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(5)" +} +DoubleFluorescentLamp { + translation 5 -5 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(6)" +} +DoubleFluorescentLamp { + translation 5 0 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(7)" +} +DoubleFluorescentLamp { + translation 5 5 2.5 + rotation -0.7071067811865475 0.7071067811865475 0 3.1416 + name "double fuorescent lamp(8)" +} +StraightStairs { + translation -6.92 -0.6 0 + rotation 0 0 1 1.5708 + stepSize 0.2 1.1 0.03 + stepRise 0.13 + nSteps 20 + stringerWidth 0.03 + stepAppearance ThreadMetalPlate { + textureTransform TextureTransform { + scale 0.4 2.2 + } + } + stringerAppearance BrushedAluminium { + colorOverride 0.533333 0.541176 0.521569 + textureTransform TextureTransform { + scale 20 20 + } + } + leftRail [] + rightRail [ + StraightStairsRail { + translation -0.02 -0.13 0 + run 3.84 + rise 2.5 + newelHeight 0.8 + balusterHeight 0.62 + appearance Rubber { + } + } + ] +} +OilBarrel { + translation -7.18 1.203 0.44 +} +OilBarrel { + translation -7.18 1.9 0.45 + name "oil barrel(1)" +} +OilBarrel { + translation -7.18 2.57 0.44 + name "oil barrel(2)" +} +OilBarrel { + translation -7.18 3.25 0.44 + name "oil barrel(3)" +} +OilBarrel { + translation -7.18 3.95 0.44 + name "oil barrel(4)" +} +OilBarrel { + translation -6.55 3.64 0.44 + name "oil barrel(5)" +} +OilBarrel { + translation -6.55 2.95 0.44 + name "oil barrel(6)" +} +OilBarrel { + translation -6.55 2.26 0.44 + name "oil barrel(7)" +} +OilBarrel { + translation -6.55 1.58 0.44 + name "oil barrel(8)" +} +OilBarrel { + translation 5.826 -0.356 0.305 + rotation -0.6780004364848964 0.5197669898005294 0.5197669520467669 -1.95 + name "oil barrel(9)" +} +OilBarrel { + translation 5.892 1.534 0.305 + rotation -0.9353625071696829 -0.25009699570573185 -0.25009692705071734 -1.638 + name "oil barrel(10)" +} +OilBarrel { + translation 1.90945 5.0704 0.44 + name "oil barrel(11)" +} +OilBarrel { + translation 1.017 6.932 0.44 + name "oil barrel(12)" +} +OilBarrel { + translation 0.724738 5.60404 0.44 + name "oil barrel(13)" +} +TrafficCone { + translation -5.892 -1.397 0 +} +TrafficCone { + translation -5.045 -2.377 0 + rotation 0 0 1 -0.785 + name "traffic cone(1)" +} +TrafficCone { + translation -3.996 -3.072 0 + rotation 0 0 1 0.262 + name "traffic cone(2)" +} +TrafficCone { + translation 6.425 -2.282 0 + rotation 0 0 1 0.262 + name "traffic cone(3)" +} +TrafficCone { + translation 5.034 -2.12 0 + name "traffic cone(4)" +} +TrafficCone { + translation 4.128 -1.239 0 + rotation 0 0 1 -0.262 + name "traffic cone(5)" +} +TrafficCone { + translation 4.289 0.082 0 + rotation 0 0 -1 0.524 + name "traffic cone(6)" +} +TrafficCone { + translation 4.158 1.273 0 + rotation 0 0 1 0.524 + name "traffic cone(7)" +} +TrafficCone { + translation 4.317 2.52 0 + name "traffic cone(8)" +} diff --git a/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/.gitignore b/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/.gitignore new file mode 100644 index 00000000000..11884fe296d --- /dev/null +++ b/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/.gitignore @@ -0,0 +1 @@ +/tiago_pmb2_base diff --git a/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/Makefile b/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/Makefile new file mode 100644 index 00000000000..366156b161d --- /dev/null +++ b/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/Makefile @@ -0,0 +1,20 @@ +# Copyright 1996-2023 Cyberbotics Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +### Do not modify: this includes Webots global Makefile.include +null := +space := $(null) $(null) +WEBOTS_HOME_PATH?=$(subst $(space),\ ,$(strip $(subst \,/,$(WEBOTS_HOME)))) +include $(WEBOTS_HOME_PATH)/resources/Makefile.include diff --git a/projects/robots/pal_robotics/tiago_base/controllers/tiago_base/tiago_base.c b/projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/tiago_pmb2_base.c similarity index 100% rename from projects/robots/pal_robotics/tiago_base/controllers/tiago_base/tiago_base.c rename to projects/robots/pal_robotics/tiago_pmb2_base/controllers/tiago_pmb2_base/tiago_pmb2_base.c diff --git a/projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto b/projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto similarity index 93% rename from projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto index f9a52ad22ee..161a5f1daf4 100644 --- a/projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto +++ b/projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto @@ -1,7 +1,7 @@ #VRML_SIM R2023b utf8 # license: Apache License 2.0. # license url: https://www.apache.org/licenses/LICENSE-2.0 -# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto +# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto # keywords: robot/wheeled # This is a PROTO file for Webots for the robot TIAGo from PAL Robotics (Spain). # It is the TIAGo base robot that can be extended with different features to fullfil your requirement. @@ -11,20 +11,20 @@ EXTERNPROTO "webots://projects/appearances/protos/MattePaint.proto" EXTERNPROTO "webots://projects/appearances/protos/Asphalt.proto" EXTERNPROTO "webots://projects/appearances/protos/BrushedAluminium.proto" -PROTO TiagoBase [ - field SFVec3f translation 0 0 0.095 +PROTO TiagoPmb2Base [ + field SFVec3f translation 0 0 0 field SFRotation rotation 0 0 1 0 - field SFString name "TIAGo Base" - field SFString controller "tiago_base" + field SFString name "TIAGo PMB-2 Base" + field SFString controller "tiago_pmb2_base" field MFString controllerArgs [] field SFString window "" field SFString customData "" field SFBool supervisor FALSE field SFBool synchronization TRUE field SFBool selfCollision FALSE # Enables/disables the detection of collisions within the robot. - field SFString model "PAL Robotics - TIAGo Base" + field SFString model "PAL Robotics - TIAGo PMB-2 Base" field MFNode bodySlot [] # Extends the robot with a body (such as the TiagoBody or fixed shelves, safety box, roller conveyor, boxes, lifter for example). - field MFNode lidarSlot [] # Extends the robot with a lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). + field MFNode lidarSlot [] # Extends the robot with a front lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). ] { Robot { @@ -41,23 +41,28 @@ PROTO TiagoBase [ model IS model children [ DEF BODY_EXTENSION Pose { + translation 0 0 0.095 children IS bodySlot } DEF LIDAR Pose { - translation 0.202 0 -0.004 + translation 0.202 0 0.091 children IS lidarSlot } Accelerometer { + translation 0 0 0.095 } InertialUnit { + translation 0 0 0.095 } Gyro { + translation 0 0 0.095 } Solid { name "base_footprint" - translation 0 0 -0.095 + translation 0 0 0 } - DEF BASE_MOBILE_SHAPE Group { + DEF BASE_MOBILE_SHAPE Pose { + translation 0 0 0.095 children [ DEF BASE Shape { appearance GlossyPaint { @@ -93,7 +98,7 @@ PROTO TiagoBase [ ] } DEF FRONT_SENSOR_1 Pose { - translation 0.1714 -0.1110 0.002 + translation 0.1714 -0.1110 0.097 rotation 0.47980308243485 -0.620398662991083 0.620398662994121 -2.246872814929654 children [ Shape { @@ -110,7 +115,7 @@ PROTO TiagoBase [ rotationStep 0.001 } DEF FRONT_SENSOR_2 Pose { - translation 0.1714 0.111 0.002 + translation 0.1714 0.111 0.097 rotation 0.47980308243485 0.620398662991083 0.620398662994121 2.246872814929654 children [ Shape { @@ -126,7 +131,7 @@ PROTO TiagoBase [ rotationStep 0.001 } DEF BUMPER TouchSensor { - translation 0 0 0.03 + translation 0 0 0.127 children [ DEF BUMPER_SHAPE Shape { appearance PBRAppearance { @@ -156,7 +161,7 @@ PROTO TiagoBase [ } } DEF DISTANCE_SENSOR_BACK_LEFT DistanceSensor { - translation -0.183 0.183 0.173 + translation -0.183 0.183 0.268 rotation 0 0 1 2.3562 children [ DEF DS_SHAPE Group { @@ -189,7 +194,7 @@ PROTO TiagoBase [ name "base_sonar_03_link" } DEF DISTANCE_SENSOR_BACK_MIDDLE DistanceSensor { - translation -0.259 0 0.173 + translation -0.259 0 0.268 rotation 0 0 1 3.1416 children [ USE DS_SHAPE @@ -197,7 +202,7 @@ PROTO TiagoBase [ name "base_sonar_02_link" } DEF DISTANCE_SENSOR_BACK_RIGHT DistanceSensor { - translation -0.183 -0.183 0.173 + translation -0.183 -0.183 0.268 rotation 0 0 1 3.927 children [ USE DS_SHAPE @@ -207,7 +212,7 @@ PROTO TiagoBase [ DEF RIGHT_WHEEL_JOINT HingeJoint { jointParameters HingeJointParameters { axis 0 1 0 - anchor 0 -0.2022 0 + anchor 0 -0.2022 0.095 suspensionSpringConstant 0 suspensionDampingConstant 0 suspensionAxis 0 0 1 @@ -224,7 +229,7 @@ PROTO TiagoBase [ } ] endPoint DEF RIGHT_WHEEL Solid { - translation 0 -0.202 0 + translation 0 -0.202 0.095 rotation 1 0 0 1.5708 children [ DEF BIG_WHEEL Group { @@ -298,7 +303,7 @@ PROTO TiagoBase [ DEF LEFT_WHEEL_JOINT HingeJoint { jointParameters HingeJointParameters { axis 0 1 0 - anchor 0 0.2022 0 + anchor 0 0.2022 0.095 suspensionSpringConstant 0 suspensionDampingConstant 0 suspensionAxis 0 0 1 @@ -315,7 +320,7 @@ PROTO TiagoBase [ } ] endPoint DEF LEFT_WHEEL Solid { - translation 0 0.202 0 + translation 0 0.202 0.095 rotation 1 0 0 1.5708 children [ Pose { @@ -394,7 +399,7 @@ PROTO TiagoBase [ DEF CASTER_WHEEL_FRONT_RIGHT_JOINT HingeJoint { jointParameters HingeJointParameters { axis 0 0 1 - anchor 0.1695 -0.102 -0.0335 + anchor 0.1695 -0.102 0.0615 dampingConstant 0 suspensionSpringConstant 250000 suspensionDampingConstant 0 @@ -403,7 +408,7 @@ PROTO TiagoBase [ device [ ] endPoint DEF CASTER_WHEEL_FRONT_RIGHT Solid { - translation 0.1695 -0.102 -0.0335 + translation 0.1695 -0.102 0.0615 rotation 0 0 1 0 children [ DEF SMALL_WHEEL_JOINT HingeJoint { @@ -474,7 +479,7 @@ PROTO TiagoBase [ DEF CASTER_WHEEL_FRONT_LEFT_JOINT HingeJoint { jointParameters HingeJointParameters { axis 0 0 1 - anchor 0.1695 0.102 -0.0335 + anchor 0.1695 0.102 0.0615 dampingConstant 0 suspensionSpringConstant 250000 suspensionDampingConstant 0 @@ -483,7 +488,7 @@ PROTO TiagoBase [ device [ ] endPoint DEF CASTER_WHEEL_FRONT_LEFT Solid { - translation 0.1695 0.102 -0.0335 + translation 0.1695 0.102 0.0615 rotation 0 0 1 0 children [ DEF SMALL_WHEEL_JOINT HingeJoint { @@ -554,7 +559,7 @@ PROTO TiagoBase [ DEF CASTER_WHEEL_BACK_RIGHT_JOINT HingeJoint { jointParameters HingeJointParameters { axis 0 0 1 - anchor -0.1735 -0.102 -0.0335 + anchor -0.1735 -0.102 0.0615 dampingConstant 0 suspensionSpringConstant 250000 suspensionDampingConstant 0 @@ -563,7 +568,7 @@ PROTO TiagoBase [ device [ ] endPoint DEF CASTER_WHEEL_BACK_RIGHT Solid { - translation -0.1735 -0.102 -0.0335 + translation -0.1735 -0.102 0.0615 rotation 0 0 1 0 children [ DEF SMALL_WHEEL_JOINT HingeJoint { @@ -634,7 +639,7 @@ PROTO TiagoBase [ DEF CASTER_WHEEL_BACK_LEFT_JOINT HingeJoint { jointParameters HingeJointParameters { axis 0 0 1 - anchor -0.1735 0.102 -0.0335 + anchor -0.1735 0.102 0.0615 dampingConstant 0 suspensionSpringConstant 250000 suspensionDampingConstant 0 @@ -643,7 +648,7 @@ PROTO TiagoBase [ device [ ] endPoint DEF CASTER_WHEEL_BACK_LEFT Solid { - translation -0.1735 0.102 -0.0335 + translation -0.1735 0.102 0.0615 rotation 0 0 1 0 children [ DEF SMALL_WHEEL_JOINT HingeJoint { @@ -712,11 +717,10 @@ PROTO TiagoBase [ } } ] - name "TIAGo base" boundingObject Group { children [ DEF BASE_BO Pose { - translation 0 0 0.06 + translation 0 0 0.15 children [ Shape { geometry Cylinder { @@ -727,7 +731,7 @@ PROTO TiagoBase [ ] } DEF ANTENNA_LEFT_BO Pose { - translation -0.201 0.1062 0.28 + translation -0.201 0.1062 0.375 children [ DEF ANTENNA_BO Cylinder { height 0.173 @@ -736,7 +740,7 @@ PROTO TiagoBase [ ] } DEF ANTENNA_RIGHT_BO Pose { - translation -0.201 -0.1062 0.28 + translation -0.201 -0.1062 0.375 children [ USE ANTENNA_BO ] diff --git a/projects/robots/pal_robotics/tiago_base/protos/docs/images/tiago_base/tiago_base.wbt.png b/projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/images/tiago_pmb2_base/tiago_pmb2_base.wbt.png similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/docs/images/tiago_base/tiago_base.wbt.png rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/images/tiago_pmb2_base/tiago_pmb2_base.wbt.png diff --git a/projects/robots/pal_robotics/tiago_base/protos/docs/images/tiago_base/tiago_base.wbt.thumbnail.jpg b/projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/images/tiago_pmb2_base/tiago_pmb2_base.wbt.thumbnail.jpg similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/docs/images/tiago_base/tiago_base.wbt.thumbnail.jpg rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/images/tiago_pmb2_base/tiago_pmb2_base.wbt.thumbnail.jpg diff --git a/projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/tiagopmb2base.md b/projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/tiagopmb2base.md new file mode 100644 index 00000000000..07c2f831b50 --- /dev/null +++ b/projects/robots/pal_robotics/tiago_pmb2_base/protos/docs/tiagopmb2base.md @@ -0,0 +1,40 @@ +Designed by PAL Robotics, TIAGo PMB2 Base is a two-wheeled robot. +The model is a modular mobile platform that automates deliveries in industrial environment. +It is completely ROS based and customizable with accessories to adapt to any specific need. + +More information on the TIAGo PMB2 Base robot can be found on their [website](http://pal-robotics.com/robots/tiago-base/) or in the [technical specifications datasheet](https://pal-robotics.com/wp-content/uploads/2021/10/Datasheet_TIAGo-Base-2021.pdf). + +### TiagoPmb2Base PROTO + +Derived from [Robot](https://cyberbotics.com/doc/reference/robot). + +``` +TiagoPmb2Base { + SFVec3f translation 0 0 0.0 + SFRotation rotation 0 0 1 0 + SFString name "TIAGo PMB2 Base" + SFString controller "tiago_pmb2_base" + MFString controllerArgs [] + SFString window "" + SFString customData "" + SFBool supervisor FALSE + SFBool synchronization TRUE + SFBool selfCollision FALSE + SFString model "PAL Robotics - TIAGo PMB2 Base" + MFNode bodySlot [] + MFNode lidarSlot [] +} +``` + +#### TiagoPmb2Base Field Summary + +- `bodySlot`: Extends the robot with new nodes (such as the `TiagoBody` for example). +- `lidarSlot`: Extends the robot with a front lidar sensor. + +### Sample + +You will find the following sample in this folder: "[WEBOTS\_HOME/projects/robots/pal\_robotics/tiago\_pmb2\_base/worlds]({{ url.github_tree }}/projects/robots/pal_robotics/tiago_pmb2_base/worlds)". + +#### [tiago\_pmb2\_base.wbt]({{ url.github_tree }}/projects/robots/pal_robotics/tiago_pmb2_base/worlds/tiago_pmb2_base.wbt) + +![tiago_pmb2_base.wbt.png](images/tiago_pmb2_base/tiago_pmb2_base.wbt.thumbnail.jpg) This simulation shows a TIAGo PMB2 Base moving in an industrial environment using a Braitenberg algorithm using the information received by its lidar. diff --git a/projects/robots/pal_robotics/tiago_base/protos/icons/TiagoBase.png b/projects/robots/pal_robotics/tiago_pmb2_base/protos/icons/TiagoPmb2Base.png similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/icons/TiagoBase.png rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/icons/TiagoPmb2Base.png diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/antenna_shape.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/antenna_shape.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/antenna_shape.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/antenna_shape.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/base.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/base.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/base.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/base.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/bumper_shape.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/bumper_shape.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/bumper_shape.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/bumper_shape.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/caster_support.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/caster_support.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/caster_support.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/caster_support.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/rim.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/rim.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/rim.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/rim.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/small_wheel_shape.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/small_wheel_shape.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/small_wheel_shape.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/small_wheel_shape.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/meshes/tire.obj b/projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/tire.obj similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/meshes/tire.obj rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/meshes/tire.obj diff --git a/projects/robots/pal_robotics/tiago_base/protos/textures/metal_stainless_clean_base_color.jpg b/projects/robots/pal_robotics/tiago_pmb2_base/protos/textures/metal_stainless_clean_base_color.jpg similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/textures/metal_stainless_clean_base_color.jpg rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/textures/metal_stainless_clean_base_color.jpg diff --git a/projects/robots/pal_robotics/tiago_base/protos/textures/metal_stainless_clean_roughness.jpg b/projects/robots/pal_robotics/tiago_pmb2_base/protos/textures/metal_stainless_clean_roughness.jpg similarity index 100% rename from projects/robots/pal_robotics/tiago_base/protos/textures/metal_stainless_clean_roughness.jpg rename to projects/robots/pal_robotics/tiago_pmb2_base/protos/textures/metal_stainless_clean_roughness.jpg diff --git a/projects/robots/pal_robotics/tiago_pmb2_base/webots.yaml b/projects/robots/pal_robotics/tiago_pmb2_base/webots.yaml new file mode 100644 index 00000000000..342dd5324d2 --- /dev/null +++ b/projects/robots/pal_robotics/tiago_pmb2_base/webots.yaml @@ -0,0 +1 @@ +publish: true diff --git a/projects/robots/pal_robotics/tiago_base/worlds/.tiago_base.wbproj b/projects/robots/pal_robotics/tiago_pmb2_base/worlds/.tiago_pmb2_base.wbproj similarity index 93% rename from projects/robots/pal_robotics/tiago_base/worlds/.tiago_base.wbproj rename to projects/robots/pal_robotics/tiago_pmb2_base/worlds/.tiago_pmb2_base.wbproj index 01731f3df46..f13ee6adcbc 100644 --- a/projects/robots/pal_robotics/tiago_base/worlds/.tiago_base.wbproj +++ b/projects/robots/pal_robotics/tiago_pmb2_base/worlds/.tiago_pmb2_base.wbproj @@ -5,5 +5,5 @@ sceneTreePerspectives: 000000ff0000000100000002000000c0000000fa01000000020100000 maximizedDockId: -1 centralWidgetVisible: 1 orthographicViewHeight: 1 -textFiles: 0 "controllers/tiago_base/tiago_base.c" +textFiles: 0 "controllers/tiago_base/tiago_pmb2_base.c" consoles: Console:All:All diff --git a/projects/robots/pal_robotics/tiago_base/worlds/tiago_base.wbt b/projects/robots/pal_robotics/tiago_pmb2_base/worlds/tiago_pmb2_base.wbt similarity index 96% rename from projects/robots/pal_robotics/tiago_base/worlds/tiago_base.wbt rename to projects/robots/pal_robotics/tiago_pmb2_base/worlds/tiago_pmb2_base.wbt index b3f19680e88..843a0cdf30a 100644 --- a/projects/robots/pal_robotics/tiago_base/worlds/tiago_base.wbt +++ b/projects/robots/pal_robotics/tiago_pmb2_base/worlds/tiago_pmb2_base.wbt @@ -5,7 +5,7 @@ EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackgroundLigh EXTERNPROTO "webots://projects/objects/floors/protos/RectangleArena.proto" EXTERNPROTO "webots://projects/appearances/protos/ThreadMetalPlate.proto" EXTERNPROTO "webots://projects/appearances/protos/Roughcast.proto" -EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto" EXTERNPROTO "webots://projects/devices/hokuyo/protos/HokuyoUrg04lxug01.proto" EXTERNPROTO "webots://projects/objects/factory/containers/protos/WoodenBox.proto" EXTERNPROTO "webots://projects/objects/solids/protos/SolidBox.proto" @@ -29,14 +29,14 @@ EXTERNPROTO "webots://projects/objects/traffic/protos/TrafficCone.proto" WorldInfo { info [ - "This simulation shows a TIAGo Base moving in an industrial environment using a Braitenberg algorithm using the information received by its lidar." + "This simulation shows a TIAGo PMB2 Base moving in an industrial environment using a Braitenberg algorithm using the information received by its lidar." ] - title "Simulation of PAL Robotics' TIAGo Base robot" + title "Simulation of PAL Robotics' TIAGo PMB2 Base robot" } Viewpoint { orientation 0.04207463719185939 -0.37422533569250593 -0.9263828166751608 6.041567672773838 position -6.552398220985782 0.7357475895306282 0.6006993871667716 - follow "TIAGo Base" + follow "TIAGo PMB2 Base" followSmoothness 0 } TexturedBackground { @@ -79,8 +79,8 @@ DEF ROOF RectangleArena { } } } -TiagoBase { - translation -4.416 1.063 0.095 +TiagoPmb2Base { + translation -4.416 1.063 0 lidarSlot [ HokuyoUrg04lxug01 { } diff --git a/projects/robots/pal_robotics/tiagopp/protos/Tiago++.proto b/projects/robots/pal_robotics/tiagopp/protos/Tiago++.proto index db0017a1798..a23802f2f25 100644 --- a/projects/robots/pal_robotics/tiagopp/protos/Tiago++.proto +++ b/projects/robots/pal_robotics/tiagopp/protos/Tiago++.proto @@ -4,18 +4,19 @@ # documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/pal_robotics/tiagopp/protos/Tiago%252B%252B.proto # keywords: robot/wheeled # TIAGo++ robot from PAL Robotics. -# The robot is composed by the TIAGo base and a body with two arms equipped with parallel grippers. +# The robot is composed by the TIAGo base (PMB2 or OMNI) and a body with two arms equipped with parallel grippers. EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoGripper.proto" EXTERNPROTO "webots://projects/devices/hokuyo/protos/HokuyoUrg04lxug01.proto" EXTERNPROTO "webots://projects/devices/orbbec/protos/Astra.proto" -EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_pmb2_base/protos/TiagoPmb2Base.proto" +EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_omni_base/protos/TiagoOmniBase.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoBody.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoRightArm.proto" EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_extensions/protos/TiagoLeftArm.proto" PROTO Tiago++ [ - field SFVec3f translation 0 0 0.095 + field SFVec3f translation 0 0 0 field SFRotation rotation 0 0 1 0 field SFString name "TIAGo++" field SFString controller "tiago++" @@ -25,13 +26,18 @@ PROTO Tiago++ [ field SFBool supervisor FALSE field SFBool synchronization TRUE field SFBool selfCollision FALSE # Enables/disables the detection of collisions within the robot. + field SFString{"PMB2", "OMNI"} base "PMB2" # Defines the base robot. field MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} # Extends the robot with a camera at head level. field SFNode endEffectorRightSlot TiagoGripper { name "right" } # Extends the robot with a right end-effector (such as the TiagoRightHey5 for example). field SFNode endEffectorLeftSlot TiagoGripper { name "left" } # Extends the robot with a left end-effector (such as the TiagoLeftHey5 for example). field MFNode lidarSlot HokuyoUrg04lxug01 {} # Extends the robot with a lidar sensor (such as Sick TIM551 or Hokuyo URG 04LX_UG01 for example). ] { - TiagoBase { + %< if (fields.base.value == 'PMB2') { >% + TiagoPmb2Base { + %< } else { >% + TiagoOmniBase { + %< } >% translation IS translation rotation IS rotation controller IS controller diff --git a/projects/robots/pal_robotics/tiagopp/protos/docs/tiago++.md b/projects/robots/pal_robotics/tiagopp/protos/docs/tiago++.md index 9e2aa95fe51..611d385be6d 100644 --- a/projects/robots/pal_robotics/tiagopp/protos/docs/tiago++.md +++ b/projects/robots/pal_robotics/tiagopp/protos/docs/tiago++.md @@ -13,25 +13,27 @@ More information on the TIAGo++ robot can be found on their [website](http://blo Derived from [Robot](https://cyberbotics.com/doc/reference/robot). ``` Tiago++ { - SFVec3f translation 0 0 0.095 - SFRotation rotation 0 0 1 0 - SFString name "TIAGo++" - SFString controller "tiago++" - MFString controllerArgs [] - SFString window "" - SFString customData "" - SFBool supervisor FALSE - SFBool synchronization TRUE - SFBool selfCollision FALSE - MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} - SFNode endEffectorRightSlot TiagoGripper { name "right" } - SFNode endEffectorLeftSlot TiagoGripper { name "left" } - MFNode lidarSlot HokuyoUrg04lxug01{} + SFVec3f translation 0 0 0 + SFRotation rotation 0 0 1 0 + SFString name "TIAGo++" + SFString controller "tiago++" + MFString controllerArgs [] + SFString window "" + SFString customData "" + SFBool supervisor FALSE + SFBool synchronization TRUE + SFBool selfCollision FALSE + SFString{"PMB2, OMNI"} base "PMB2" + MFNode cameraSlot Astra { translation -0.028 -0.035 -0.009 rotation 1 0 0 -1.5708} + SFNode endEffectorRightSlot TiagoGripper { name "right" } + SFNode endEffectorLeftSlot TiagoGripper { name "left" } + MFNode lidarSlot HokuyoUrg04lxug01 {} } ``` #### Tiago++ Field Summary +- `base`: Defines if the robot is using the TIAGo PMB2 or the OMNI base robot. - `cameraSlot`: Extends the robot with a camera at head level. - `endEffectorRightSlot`: Extends the right arm with a new node (such as the `TiagoRightHey5` for example). - `endEffectorLeftSlot`: Extends the left arm with a new node (such as the `TiagoLeftHey5` for example). diff --git a/projects/robots/pal_robotics/tiagopp/worlds/tiago++.wbt b/projects/robots/pal_robotics/tiagopp/worlds/tiago++.wbt index 9d46e8ffd3d..fdc31bfb6d6 100644 --- a/projects/robots/pal_robotics/tiagopp/worlds/tiago++.wbt +++ b/projects/robots/pal_robotics/tiagopp/worlds/tiago++.wbt @@ -78,7 +78,7 @@ DEF ROOF RectangleArena { } } Tiago++ { - translation -4.416 1.063 0.095 + translation -4.416 1.063 0 } WoodenBox { translation -6.2 7 0.405 diff --git a/scripts/icon_studio/controllers/icon_creator/objects.json b/scripts/icon_studio/controllers/icon_creator/objects.json index fd9b05f3375..dc76a25fc42 100644 --- a/scripts/icon_studio/controllers/icon_creator/objects.json +++ b/scripts/icon_studio/controllers/icon_creator/objects.json @@ -1645,8 +1645,11 @@ "fields": " rotation -0.230732 -0.109357 0.966852 -1.27752", "nodeString": " Tiago++{ rotation -0.230732 -0.109357 0.966852 -1.27752 controller \"\" }" }, - "projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto": { - "nodeString": " TiagoBase{ rotation 0 0 -1 1.57 controller \"\" }" + "projects/robots/pal_robotics/tiago_base/protos/TiagoPmb2Base.proto": { + "nodeString": " TiagoPmb2Base{ rotation 0 0 -1 1.57 controller \"\" }" + }, + "projects/robots/pal_robotics/tiago_base/protos/TiagoOmniBase.proto": { + "nodeString": " TiagoOmniBase{ rotation 0 0 -1 0.78 controller \"\" }" }, "projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto": { "fields": " rotation 0.001775990237163933 -0.01802608248670652 -0.9998359396465302 1.5711223019163478", diff --git a/scripts/icon_studio/worlds/icon_studio.wbt b/scripts/icon_studio/worlds/icon_studio.wbt index 3410c0472be..319c0ca1ba6 100644 --- a/scripts/icon_studio/worlds/icon_studio.wbt +++ b/scripts/icon_studio/worlds/icon_studio.wbt @@ -303,7 +303,8 @@ IMPORTABLE EXTERNPROTO "webots://projects/robots/kinematics/tinkerbots/protos/Ti IMPORTABLE EXTERNPROTO "webots://projects/robots/kinematics/tinkerbots/protos/TinkerbotsTwister.proto" IMPORTABLE EXTERNPROTO "webots://projects/robots/kinematics/tinkerbots/protos/TinkerbotsWheel.proto" IMPORTABLE EXTERNPROTO "webots://projects/robots/pal_robotics/tiagopp/protos/Tiago++.proto" -IMPORTABLE EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoBase.proto" +IMPORTABLE EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoPmb2Base.proto" +IMPORTABLE EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_base/protos/TiagoOmniBase.proto" IMPORTABLE EXTERNPROTO "webots://projects/robots/pal_robotics/tiago/protos/Tiago.proto" IMPORTABLE EXTERNPROTO "webots://projects/robots/pal_robotics/tiago_lite/protos/TiagoLite.proto" IMPORTABLE EXTERNPROTO "webots://projects/robots/robotis/turtlebot/protos/TurtleBot3Burger.proto"