-
Notifications
You must be signed in to change notification settings - Fork 276
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
azeey
merged 32 commits into
gazebosim:gz-sim7
from
yaswanth1701:joint_controller_tutorial
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 4424f9e
Rename joint_controller_tutorial.md to joint_controller.md
yaswanth1701 8c9c2bf
added JointController and JointPositionController
yaswanth1701 e60d1b8
minor changes
yaswanth1701 0a4edcc
formatting changes
yaswanth1701 a9c70a0
added gifs
yaswanth1701 e94bdc9
Added JointTrajectoryController
yaswanth1701 ad3dd9a
final changes
yaswanth1701 f34fe92
minor changes
yaswanth1701 ee10844
minor changes
yaswanth1701 49fc466
removed trailing-whitespace
yaswanth1701 f49869c
corrected formatting
yaswanth1701 33805a9
minor text changes
yaswanth1701 1df5959
minor changes
yaswanth1701 3ebf2a7
Add files via upload
yaswanth1701 fe34ab7
edited image path to file/joint_controller/...
yaswanth1701 37ded82
minor changes
yaswanth1701 6e4a062
added doxygen syntax
yaswanth1701 688bc30
minor changes
yaswanth1701 7d9c3d2
minor changes
yaswanth1701 649c44f
formatting changes
yaswanth1701 d580dc5
added diffuse to sdf and changed gifs
yaswanth1701 18645fa
Merge branch 'joint_controller_tutorial' of https://github.com/yaswan…
yaswanth1701 8c54b29
formatting and indentation changes
yaswanth1701 9b98eb4
minor changes
yaswanth1701 1c97d56
removed trailing-whitespaces
yaswanth1701 141e4de
minor change
yaswanth1701 ee2a164
Merge branch 'gz-sim7' of https://github.com/gazebosim/gz-sim into jo…
yaswanth1701 42dfd2c
suggested changes
yaswanth1701 5525490
Added joint state publisher plugin snippet
yaswanth1701 204325b
minor changes
yaswanth1701 07ab7d7
removed trailing whitespace
yaswanth1701 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
removed trailing-whitespace
Signed-off-by: Yaswanth <92177410 [email protected]>
- Loading branch information
commit 49fc46692773bf350058c35431132ddb8b646664
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -1,27 1,26 @@ | ||||||||
|
||||||||
\page jointcontrollers Joint Controllers | ||||||||
|
||||||||
Gazebo provides basically 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. Let's see a detailed description of each of them and example usage to help users to select right joint controller for their usage. | ||||||||
# 1) JointController | ||||||||
|
||||||||
- Joint controller which can be attached to a model with a reference to a single joint. | ||||||||
- Currently, only the first axis of a joint can be actuated. | ||||||||
|
||||||||
### Modes of JointController | ||||||||
|
||||||||
1) Velocity mode | ||||||||
1) Velocity mode. | ||||||||
|
||||||||
2) Force mode | ||||||||
2) Force mode. | ||||||||
|
||||||||
### Velocity mode: | ||||||||
|
||||||||
This mode lets the user control the desired joint velocity directly. | ||||||||
|
||||||||
### Force mode: | ||||||||
|
||||||||
A user who wants to control joint velocity using a PID controller can use this mode. | ||||||||
|
||||||||
This mode let's the user explicitly set the values of PID gains and also bounds for velocity. | ||||||||
This mode lets the user explicitly set the values of PID gains and also bounds for velocity. | ||||||||
|
||||||||
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. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
|
@@ -193,7 192,7 @@ The initial velocity is set to 1.0 rad/s. | |||||||
|
||||||||
|
||||||||
|
||||||||
One can change the joint velocity by publishing a message on the topic ```/model/joint_controller_demo/joint/j1/cmd_vel``` or can change the topic name within the plugin | ||||||||
One can change the joint velocity by publishing a message on the topic ```/model/joint_controller_demo/joint/j1/cmd_vel``` or can change the topic name within the plugin. | ||||||||
azeey marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
|
||||||||
To change the topic name add following line before ```</plugin>``` tag in SDF file. | ||||||||
|
||||||||
|
@@ -213,7 212,7 @@ gz topic -t "/topic_name" -m gz.msgs.Double -p "data: 10.0" | |||||||
|
||||||||
- Force mode | ||||||||
|
||||||||
Same as velocity mode add the following line to the SDF file | ||||||||
Same as velocity mode add the following line to the SDF file. | ||||||||
azeey marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
|
||||||||
```xml | ||||||||
<plugin | ||||||||
|
@@ -226,7 225,7 @@ Same as velocity mode add the following line to the SDF file | |||||||
</plugin> | ||||||||
``` | ||||||||
|
||||||||
This would look almost the same as velocity mode if PID gains are tuned properly. | ||||||||
This would look almost the same as velocity mode if PID gains are tuned properly. | ||||||||
|
||||||||
Here the state of the joint is obtained using the Gazebo’s JointStatepublisher plugin. Please visit [here](https://gazebosim.org/api/gazebo/5.1/classignition_1_1gazebo_1_1systems_1_1JointStatePublisher.html#:~:text=JointStatePublisher Class Reference) for more information. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
<p align="center"> | ||||||||
|
@@ -303,7 302,7 @@ gz topic -e -t /world/default/model/joint_controller_demo/joint_state | |||||||
|
||||||||
- Joint trajectory controller, which can be attached to a model with reference to one or more 1-axis joints to follow a trajectory. | ||||||||
|
||||||||
JointTrajectoryController lets’s user specify the required position, velocity, and effort with respect to time. For velocity and position, this controller uses a PID controller. | ||||||||
JointTrajectoryController lets’s user specify the required position, velocity, and effort with respect to time. For velocity and position, this controller uses a PID controller. | ||||||||
|
||||||||
A detailed description and related parameter of JointTrajectoryController can be found [here](https://gazebosim.org/api/gazebo/5.1/classignition_1_1gazebo_1_1systems_1_1JointTrajectoryController.html#:~:text=Detailed Description). | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
|
@@ -515,9 514,7 @@ let’s set up a new model for this example. A two-linked manipulator arm which | |||||||
</axis> | ||||||||
</joint> | ||||||||
<!-- Controller --> | ||||||||
|
||||||||
</model> | ||||||||
|
||||||||
</world> | ||||||||
</sdf> | ||||||||
``` | ||||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enumerate 3 available controllers