Skip to content

Commit 7810d20

Browse files
authored
Merge pull request #446 from clearpathrobotics/feature/drivetrains
Added Drivetrain section
2 parents 8321ed3 + de80035 commit 7810d20

File tree

9 files changed

+156
-10
lines changed

9 files changed

+156
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Attachments",
3-
"position": 2
3+
"position": 3
44
}

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/battery.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Battery
33
sidebar_label: Battery
4-
sidebar_position: 3
4+
sidebar_position: 4
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/can.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: CAN Adapters
33
sidebar_label: CAN Adapters
4-
sidebar_position: 8
4+
sidebar_position: 9
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/controller.mdx

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
title: Controller
33
sidebar_label: Controller
4-
sidebar_position: 4
4+
sidebar_position: 5
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---
8+
import Tabs from "@theme/Tabs";
9+
import TabItem from "@theme/TabItem";
810

911
We support the following types of controllers on all platforms:
1012
- **ps4**: standard Playstation4 controller (bluetooth).
@@ -18,6 +20,51 @@ Switching between each is done by setting the `controller` parameter under the `
1820
controller: ps4 # one of ps4, ps5, logitech, xbox
1921
```
2022
23+
## Default Button Mappings
24+
25+
By default, Clearpath platforms use the left and right triggers (typically buttons L1, R1) as the normal deadman and turbo deadman buttons respectively. The vertical axis of the left joystick will control linear speed in the X direction, and the horizontal axis controls angular speed. For omnidirectional robots,
26+
the horizontal axis of the right joystick will control linear speed in the Y direction.
27+
28+
### Changing Button Mappings
29+
30+
If you wish to change the default button mappings, this can be modified by using the
31+
[`extras.ros_parameters`](extras) field in `robot.yaml`. First, find the [default configuration](https://github.com/clearpathrobotics/clearpath_common/tree/jazzy/clearpath_control/config/generic) file for your controller.
32+
The comments at the top of the file will describe the axis mappings relative to the controller buttons. This varies between controllers.
33+
34+
Next, modify the `teleop_twist_joy_node` parameters with your updated button mappings. Here are some examples:
35+
36+
<Tabs groupId="controller">
37+
<TabItem value="right_hand_control" label="Right Hand Differential control (PS4)" default>
38+
```yaml
39+
extras:
40+
ros_parameters:
41+
teleop_twist_joy_node:
42+
axis_linear.x: 4
43+
axis_angular.yaw: 3
44+
enable_button: 5
45+
enable_turbo_button: 4
46+
```
47+
</TabItem>
48+
<TabItem value="omni_swap_horizontal" label="Swap linear Y and angular Yaw axes (PS4)" default>
49+
```yaml
50+
extras:
51+
ros_parameters:
52+
teleop_twist_joy_node:
53+
axis_linear.y: 0
54+
axis_angular.yaw: 3
55+
```
56+
</TabItem>
57+
<TabItem value="deadman_l2_r2" label="Deadman buttons on L2 and R2 (PS4)" default>
58+
```yaml
59+
extras:
60+
ros_parameters:
61+
teleop_twist_joy_node:
62+
enable_button: 6
63+
enable_turbo_button: 7
64+
```
65+
</TabItem>
66+
</Tabs>
67+
2168
## Teleop Speeds
2269

2370
By default, holding the left trigger button of the controller enables driving at "normal" speeds
@@ -52,12 +99,12 @@ extras:
5299

53100
**Normal speed parameters**
54101
- `scale_linear.x` sets the maximum forward/reverse velocity
55-
- `scale_linear.y` sets the maximum left/right velocity (Dingo-O and Ridgeback only)
102+
- `scale_linear.y` sets the maximum left/right velocity (Omnidirectional control only)
56103
- `scale_angular.z` sets the maximum angular velocity
57104

58105
**Turbo speed parameters**
59106
- `scale_linear_turbo.x` sets the maximum forward/reverse velocity
60-
- `scale_linear_turbo.y` sets the maximum left/right velocity (Dingo-O and Ridgeback only)
107+
- `scale_linear_turbo.y` sets the maximum left/right velocity (Omnidirectional control only)
61108
- `scale_angular_turbo.z` sets the maximum angular velocity
62109

63110
:::warning
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: Drivetrain
3+
sidebar_label: Drivetrain
4+
sidebar_position: 2
5+
toc_min_heading_level: 2
6+
toc_max_heading_level: 5
7+
---
8+
import Tabs from "@theme/Tabs";
9+
import TabItem from "@theme/TabItem";
10+
11+
Each platform comes with a default drivetrain controller and set of wheels. Some platforms support different controllers, and some support multiple wheel types. The `drivetrain` section determines which velocity controller to load, and which wheels to define in the robot description.
12+
13+
The following drivetrain controllers are supported:
14+
- `diff_4wd`: Differential four-wheel drive
15+
- `diff_fwd`: Differential front-wheel drive
16+
- `diff_rwd`: Differential rear-wheel drive
17+
- `omni_4wd`: Omnidirectional four-wheel drive
18+
19+
:::note
20+
21+
The control type is determined by which wheels are controlled, not how many motors a platform has. An A200 has one motor per side which control two motors each, so it can only be `diff_4wd`.
22+
23+
:::
24+
25+
The following wheel types are supported:
26+
- `outdoor`: Rugged outdoor wheels
27+
- `indoor`: Smooth indoor wheels
28+
- `mecanum`: Roller wheels for omnidirectional control
29+
- `tracks`: Continuous track system
30+
- `caster`: Uncontrolled caster wheels
31+
32+
The `drivetrain` section defines the keys `control` and `wheels` to set these parameters. Under `wheel`, the `front` and `rear` wheels are set separately. Some example configurations are shown below.
33+
34+
<Tabs groupId="control">
35+
<TabItem value="diff_4wd" label="diff_4wd" default>
36+
```
37+
drivetrain:
38+
control: diff_4wd
39+
wheels:
40+
front: outdoor
41+
rear: outdoor
42+
```
43+
</TabItem>
44+
45+
<TabItem value="omni_4wd" label="omni_4wd" default>
46+
```
47+
drivetrain:
48+
control: omni_4wd
49+
wheels:
50+
front: mecanum
51+
rear: meceanum
52+
```
53+
</TabItem>
54+
<TabItem value="diff_fwd" label="diff_fwd" default>
55+
```
56+
drivetrain:
57+
control: diff_fwd
58+
wheels:
59+
front: indoor
60+
rear: caster
61+
```
62+
</TabItem>
63+
<TabItem value="diff_rwd" label="diff_rwd" default>
64+
```
65+
drivetrain:
66+
control: diff_rwd
67+
wheels:
68+
front: caster
69+
rear: outdoor
70+
```
71+
</TabItem>
72+
</Tabs>
73+
74+
:::note
75+
76+
Not all configurations are valid. For example, an `omni_4wd` controller must be matched with four `mecanum` wheels. Also, `caster` wheels cannot be attached to wheels which are controlled.
77+
78+
:::
79+
80+
81+
## Supported controllers and wheels
82+
83+
| Platform | Control | Front Wheels | Rear Wheels |
84+
| :------: | :-------------------------------------------------------------: | :----------------------------------------: | :----------------------------------------: |
85+
| A200 | [`diff_4wd`] | [`outdoor`] <br/> `indoor` | [`outdoor`] <br/> `indoor` |
86+
| A300 | [`diff_4wd`] <br/> `diff_fwd` <br/> `diff_rwd` <br/> `omni_4wd` | [`outdoor`] <br/> `mecanum` <br/> `caster` | [`outdoor`] <br/> `mecanum` <br/> `caster` |
87+
| J100 | [`diff_4wd`] | [`outdoor`] | [`outdoor`] |
88+
| W200 | [`diff_4wd`] | [`outdoor`] <br/> `tracks` | [`outdoor`] <br/> `tracks` |
89+
| DD100 | [`diff_fwd`] | [`indoor`] | [`caster`] |
90+
| DO100 | [`omni_4wd`] <br/> `diff_4wd` | [`mecanum`] | [`mecanum`] |
91+
| DD150 | [`diff_fwd`] | [`indoor`] | [`caster`] |
92+
| DO150 | [`omni_4wd`] <br/> `diff_4wd` | [`mecanum`] | [`mecanum`] |
93+
| R100 | [`omni_4wd`] <br/> `diff_4wd` | [`mecanum`] | [`mecanum`] |
94+
95+
:::note
96+
97+
Default configurations are noted with square brackets.
98+
99+
:::

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/ekf.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Enable/Disable EKF
33
sidebar_label: Enable EKF
4-
sidebar_position: 5
4+
sidebar_position: 6
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/extras.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Extras
33
sidebar_label: Extras
4-
sidebar_position: 9
4+
sidebar_position: 10
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/foxglove_bridge.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Enable/Disable Foxglove Bridge
33
sidebar_label: Enable Foxglove Bridge
4-
sidebar_position: 7
4+
sidebar_position: 8
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---

docs_versioned_docs/version-ros2jazzy/ros/config/yaml/platform/wireless_watcher.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Enable/Disable Wireless Watcher
33
sidebar_label: Enable Wireless Watcher
4-
sidebar_position: 6
4+
sidebar_position: 7
55
toc_min_heading_level: 2
66
toc_max_heading_level: 5
77
---

0 commit comments

Comments
 (0)