Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tutorial for Gazebo joint controller plugin #2263

Merged
merged 32 commits into from
Jan 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift click to select a range
007bdaf
Added joint controllers tutorial .md file
yaswanth1701 Dec 11, 2023
4424f9e
Rename joint_controller_tutorial.md to joint_controller.md
yaswanth1701 Dec 11, 2023
8c9c2bf
added JointController and JointPositionController
yaswanth1701 Dec 11, 2023
e60d1b8
minor changes
yaswanth1701 Dec 11, 2023
0a4edcc
formatting changes
yaswanth1701 Dec 11, 2023
a9c70a0
added gifs
yaswanth1701 Dec 11, 2023
e94bdc9
Added JointTrajectoryController
yaswanth1701 Dec 11, 2023
ad3dd9a
final changes
yaswanth1701 Dec 11, 2023
f34fe92
minor changes
yaswanth1701 Dec 11, 2023
ee10844
minor changes
yaswanth1701 Dec 11, 2023
49fc466
removed trailing-whitespace
yaswanth1701 Dec 12, 2023
f49869c
corrected formatting
yaswanth1701 Dec 12, 2023
33805a9
minor text changes
yaswanth1701 Dec 12, 2023
1df5959
minor changes
yaswanth1701 Dec 12, 2023
3ebf2a7
Add files via upload
yaswanth1701 Dec 12, 2023
fe34ab7
edited image path to file/joint_controller/...
yaswanth1701 Dec 20, 2023
37ded82
minor changes
yaswanth1701 Dec 22, 2023
6e4a062
added doxygen syntax
yaswanth1701 Dec 22, 2023
688bc30
minor changes
yaswanth1701 Dec 22, 2023
7d9c3d2
minor changes
yaswanth1701 Dec 22, 2023
649c44f
formatting changes
yaswanth1701 Dec 22, 2023
d580dc5
added diffuse to sdf and changed gifs
yaswanth1701 Dec 24, 2023
18645fa
Merge branch 'joint_controller_tutorial' of https://github.com/yaswan…
yaswanth1701 Dec 24, 2023
8c54b29
formatting and indentation changes
yaswanth1701 Dec 26, 2023
9b98eb4
minor changes
yaswanth1701 Dec 26, 2023
1c97d56
removed trailing-whitespaces
yaswanth1701 Dec 27, 2023
141e4de
minor change
yaswanth1701 Dec 30, 2023
ee2a164
Merge branch 'gz-sim7' of https://github.com/gazebosim/gz-sim into jo…
yaswanth1701 Dec 31, 2023
42dfd2c
suggested changes
yaswanth1701 Jan 6, 2024
5525490
Added joint state publisher plugin snippet
yaswanth1701 Jan 6, 2024
204325b
minor changes
yaswanth1701 Jan 6, 2024
07ab7d7
removed trailing whitespace
yaswanth1701 Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting and indentation changes
Signed-off-by: Yaswanth <92177410 [email protected]>
  • Loading branch information
yaswanth1701 authored Dec 26, 2023
commit 8c54b2995eaea3ca8872d5f9c852702ac69a82a6
140 changes: 70 additions & 70 deletions tutorials/joint_controller.md
Original file line number Diff line number Diff line change
@@ -1,6 1,9 @@
\page jointcontrollers Joint Controllers

Gazebo provides three joint controller plugins. Let's see a detailed description of each of them and example usage to help users to select right joint controller for their usage.
Gazebo provides three joint controller plugins which are `JointController`, `JointPositionController`, and `JointTrajectoryController`.

Let's see a detailed description of each of them and an example usage to help users select the right joint controller for their usage.

## 1) JointController

- Joint controller which can be attached to a model with a reference to a single joint.
Expand All @@ -12,7 15,7 @@ Gazebo provides three joint controller plugins. Let's see a detailed description
This mode lets the user control the desired joint velocity directly.

2) Force mode:
A user who wants to control joint velocity using a PID controller can use this mode.This mode lets the user explicitly set the values of PID gains and also bounds for velocity.
A user who wants to control joint velocity using a PID controller can use this mode.

**Note**: This force mode is for the user who looking to manually tune PID gains for velocity control according to a specific use case (e.g. Custom models). For general testing purposes, velocity mode will give the best results.
azeey marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -218,7 221,7 @@ Same as velocity mode add the following line to the SDF file.

This would look almost the same as velocity mode if PID gains are tuned properly.

5) Cheking Joint states.
5) Checking Joint states.
Here the state of the joint is obtained using the Gazebo’s JointStatepublisher plugin. Please visit \ref gz::sim::systems::JointStatePublisher for more information.

azeey marked this conversation as resolved.
Show resolved Hide resolved
```bash
Expand All @@ -227,28 230,27 @@ gz topic -e -t /world/default/model/joint_controller_demo/joint_state

```bash
joint {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you indent this output ?

name: "j1"
id: 12
parent: "base_link"
child: "rotor"
pose {
position {
z: -0.5
}
orientation {
w: 1
}
}
axis1 {
xyz {
z: 1
}
}
limit_lower: -inf
limit_upper: inf
position: 35.115896338490096
velocity: 1.0000051832309742
}
name: "j1"
id: 12
parent: "base_link"
child: "rotor"
pose {
position {
z: -0.5
}
orientation {
w: 1
}
}
axis1 {
xyz {
z: 1
}
limit_lower: -inf
limit_upper: inf
position: 35.115896338490096
velocity: 1.0000051832309742
}
}
```

Expand All @@ -260,32 262,30 @@ An example where p_gain was set to 2.0 and the joint controller failed to reach

```bash
joint {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent output

name: "j1"
id: 12
parent: "base_link"
child: "rotor"
pose {
position {
z: -0.5
}
}
orientation {
w: 1
}
}

axis1 { xyz {
}
z: 1
linit lower: -inf
limit_upper: inf
position: 44282.754868627489
velocity: -2891.1685359866523
}
name: "j1"
id: 12
parent: "base_link"
child: "rotor"
pose {
position {
z: -0.5
}
orientation {
w: 1
}
}
axis1 {
xyz {
z: 1
}
limit_lower: -inf
limit_upper: inf
position: 44282.754868627489
velocity: -2891.1685359866523
}
}
```


## 2) JointPositionController

- Joint position controller which can be attached to a model with a reference to a single joint.
Expand Down Expand Up @@ -340,27 340,27 @@ gz topic -e -t /world/default/model/joint_controller_demo/joint_state

```bash
joint {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent output

name: "j1"
id: 12
parent: "base_link"
child: "rotor"
pose {
position {
z: -0.5
}
orientation {
w: 1
}
}
axis1 {
xyz {
z: 1
}
limit_lower: -inf
limit_upper: inf
position: 0.99999991907580654
velocity: 8.1005154347602952e-09
}
name: "j1"
id: 12
parent: "base_link"
child: "rotor"
pose {
position {
z: -0.5
}
orientation {
w: 1
}
}
axis1 {
xyz {
z: 1
}
limit_lower: -inf
limit_upper: inf
position: 0.99999991907580654
velocity: 8.1005154347602952e-09
}
}
```

Expand All @@ -378,7 378,7 @@ Message type: [```JointTrajectory```](https://gazebosim.org/api/msgs/7.2/classig

### Example usage:

Let’s set up a new model for this example. A two-linked manipulator arm which has a total of two joints to control ( [```joint_trajectory_controller.sdf```](https://github.com/gazebosim/gz-sim/blob/gz-sim7/examples/worlds/joint_trajectory_controller.sdf) is the original example). Name it as `example2.sdf`.
Let’s set up a new model for this example. A two-linked manipulator arm which has a total of two joints to control ([```joint_trajectory_controller.sdf```](https://github.com/gazebosim/gz-sim/blob/gz-sim7/examples/worlds/joint_trajectory_controller.sdf) is the original example). Name it as `example2.sdf`.
azeey marked this conversation as resolved.
Show resolved Hide resolved

- SDF file:

Expand Down