Skip to content

Commit 6bffaa9

Browse files
author
Murilo Marinho
committed
[adaptive_control/example.py] Removing unecessary imports.
1 parent 6248ec2 commit 6bffaa9

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

working/adaptive_control.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ This initialization is similar to what is done in `DQ_SerialManipulatorDH`.
9595
The dimension of the configuration space {math}`\mathcal{Q}` of a robot is its degrees of freedom. Hence, for a {math}`n`-DoF
9696
robot its Jacobians will have {math}`n` rows.
9797

98-
Differently from that, the parameter space {math}`\mathcal{A}` has a variable size depending on the parameters that
98+
Differently from that, the parameter space {math}`\mathcal{A}` has a variable dimension depending on the parameters that
9999
can be adapted. When using the DH convention, they can be, for instance, one of the four parameters for each of the
100100
joints. Each of which defined as part of the enumeration `Example_ParameterType`.
101101

102102
Each parameter must be specified as an instance of `Example_Parameter`. This object will store the information about
103103
which link index it refers to, what `Example_ParameterType` it is, the current value of the parameter, and its boundaries.
104104

105-
A list of `Example_Parameter` is used as input for `Example_SerialManipulatorEDH.set_parameter_space()` so that the
105+
A list of `Example_Parameter` is used as argument for `Example_SerialManipulatorEDH.set_parameter_space()` so that the
106106
instance of `Example_SerialManipulatorEDH` can properly calculate the parametric Jacobians for the parameters we chose.
107107

108108
```{note}
@@ -121,12 +121,13 @@ instance of `Example_SerialManipulatorEDH` can properly calculate the parametric
121121

122122
## Main function
123123

124-
The controller will be based on the behavior of `estimated_robot`, which is our instance of `Example_SerialManipulatorEDH`.
124+
The controller adapts the parameters of `estimated_robot`, which is our instance of `Example_SerialManipulatorEDH`.
125125

126126
In a physical or simulation environment, the measurements {math}`\myvec{y}` will come from a sensor.
127127

128-
Because in this worked example, we won't have access to one, we use another instance called `real_robot`
129-
to provide mock measurements. This is also the only way to study the behavior of the estimated parameters
128+
Because in this worked example we won't have access to one, we use another instance called `real_robot`
129+
to provide mock measurements.
130+
This is also the **only** way to study the behavior of the estimated parameters
130131
with respect to the real ones, given that the real parameters are not measurable physically.
131132

132133
```{literalinclude} adaptive_control/example.py
@@ -150,4 +151,9 @@ plt.show()
150151
# of dqrobotics installed in other notes from this same book.
151152
%pip uninstall dqrobotics --y
152153
%pip uninstall marinholab-papers-tro2022-adaptivecontrol --y
153-
```
154+
```
155+
156+
## Troubleshooting
157+
158+
- If you have an error saying that `DQ_Robotics::DQ_SerialManipulator` was not found when importing the `adaptive_control` module,
159+
it most likely means that your `dqrobotics` version installed is not compatible with the one in `adaptive_control`.

working/adaptive_control/example.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
import matplotlib.pyplot as plt
66

77
from dqrobotics import *
8-
from dqrobotics.robot_modeling import DQ_SerialManipulator
98
from dqrobotics.utils.DQ_Math import deg2rad
109
import dqrobotics_extensions.pyplot as dqp
1110

12-
from marinholab.papers.tro2022.adaptive_control import *
13-
from marinholab.papers.tro2022.adaptive_control.Example_ParameterSpaceEDH import *
11+
from marinholab.papers.tro2022.adaptive_control import Example_SerialManipulatorEDH
12+
from marinholab.papers.tro2022.adaptive_control.Example_ParameterSpaceEDH import Example_ParameterType
1413
# IMPORT END
1514

1615
# SETUP PLOT START

0 commit comments

Comments
 (0)