Browse Source

URDF import tutorial - first iteration

Signed-off-by: Paweł Budziszewski <[email protected]>
Paweł Budziszewski 2 years ago
parent
commit
433cd8f42b

+ 63 - 0
docs/URDF_import/HOWTO_import_urdf.md

@@ -0,0 +1,63 @@
+# Importing URDF robot - ROSConDemo tutorial
+
+## Prepare the URDF file
+
+Enter ROSConDemo folder and:
+
+
+```console
+cd Project/Assets/robotec_freezed_urdf_chasis
+xacro apple_kraken.xacro > apple_kraken_new.urdf
+```
+
+## Import URDF into O3DE
+
+Run the ROSConDemo O3DE project and follow these steps
+
+1. Import `apple_kraken_new.urdf` file using `RobotImporter` button. The `apple_kraken_new` prefab should apear in the `Entity Outliner`.
+2. Open the `apple_kraken_new` prefab and add a `Wheel controller` component to entities: `wheel_rear_right_link` and `wheel_rear_right_link`. Leave all settings default.
+3. Add a `Wheel controller` component to entities: `wheel_front_right_link` and `wheel_front_left_link`. Set the `Steering entity` to `steering_front_right_link` and `steering_front_left_link` respectively (by dragging these entities from the `Entity Outliner`). Leave other properties default.
+
+
+![](media/URDF_tutorial_Wheel_controller.png)
+
+
+4. In the `base_link` entity add a `Vehicle Model` component. In this component:
+    - Add 2 new axles by clicking `+` next to `Axles`. 
+    - In the first of these axles:
+      - set `Axle tag` to `Front`
+      - Add 2 wheels by clicking `+` next to `Axle wheels`
+      - Set the first of these wheels to `wheel_front_left_link` and the second to `wheel_front_right_link` (by dragging these entities from the `Entity Outliner`). 
+      - Turn on `Is it a steering axle` switch.
+    - In the second of these axles:
+      - set `Axle tag` to `Rear`
+      - Add 2 wheels by clicking `+` next to `Axle wheels`
+      - Set the first of these wheels to `wheel_rear_left_link` and the second to `wheel_rear_right_link` (by dragging these entities from the `Entity Outliner`). 
+      - Turn on the `Is it a drive axle` switch.
+    - In the `Drive model`/`Steering PID` set:
+      - `P`: `1000.0`
+      - `OutputLimit`: `200.0`
+    - In the `Drive model`/`Speed PID` set:
+      - `P`: `250.0`
+      - `I`: `150.0`
+      - `Imax`: `500.0`
+      - `OutputLimit`: `500.0`
+      - Turn on the `AntiWindUp` switch
+    - In the `Vehicle limits` set `Speed limit` to `3.0`
+    - Leave all the other settings default. The component should look like this:
+
+![](media/URDF_tutorial_Vehicle_Model.png)
+
+
+5. In the `base_link` entity, `ROS2 Robot control` component change `Topic` to `ackermann_vel` and `Steering` to `Ackermann`.
+
+![](media/URDF_tutorial_ROS2_Robot_Control.png)
+
+
+6. In the `base_link` entity add a `Ackermann Control` component. 
+7. In the `base_link` entity add a `Tag` component. Add 1 tag by clicking `+` next to `Tags` and set the name to `Robot`.
+8. In the `base_link` entity add an `Input` component and in the `Input to event bindings` field select `mobile_robot_control_keyboard.inputbindings`.
+
+![](media/URDF_tutorial_Tag_Input.png)
+
+Now it is a good time to test the robot. Check that the robot is standing on the ground and set a camera to see the robot. Click the Play button in the right-top corner of the O3DE window, or press `Ctrl G`. You should be able to control robot movement using arrow keys on the keyboard.

+ 3 - 0
docs/URDF_import/media/URDF_tutorial_ROS2_Robot_Control.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:17574f0ae4dbb891a4ea01f31343c5788aa0a30febe9e50b256f1f57ce1720a9
+size 18422

+ 3 - 0
docs/URDF_import/media/URDF_tutorial_Tag_Input.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1c653c1b74b36093534a97426953dc1eb4dd07169357485a71695ee47b4a9333
+size 15624

+ 3 - 0
docs/URDF_import/media/URDF_tutorial_Vehicle_Model.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1e46f898bd0e734ed54eab6f7baad105c7e5d9f1d4c984f39126719d8711222a
+size 79905

+ 3 - 0
docs/URDF_import/media/URDF_tutorial_Wheel_controller.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f622d5df39d48aa98fbae140eb5196db235cd50095a2ef83881b111f6f9dc6d2
+size 11346