Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#12684 from jwnimmer-tri/deprecatio…
Browse files Browse the repository at this point in the history
…n-2020-02-vector_gen-porting

vector_gen: Switch all sources to yaml format
  • Loading branch information
jwnimmer-tri authored Feb 5, 2020
2 parents a8f75b8 + 5d8fef7 commit 03102bc
Show file tree
Hide file tree
Showing 44 changed files with 419 additions and 486 deletions.
8 changes: 4 additions & 4 deletions examples/acrobot/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ package(default_visibility = ["//visibility:private"])

drake_cc_vector_gen_library(
name = "acrobot_input",
srcs = ["acrobot_input.named_vector"],
srcs = ["acrobot_input_named_vector.yaml"],
visibility = ["//visibility:public"],
)

drake_cc_vector_gen_library(
name = "acrobot_params",
srcs = ["acrobot_params.named_vector"],
srcs = ["acrobot_params_named_vector.yaml"],
visibility = ["//visibility:public"],
)

drake_cc_vector_gen_library(
name = "acrobot_state",
srcs = ["acrobot_state.named_vector"],
srcs = ["acrobot_state_named_vector.yaml"],
visibility = ["//visibility:public"],
)

drake_cc_vector_gen_library(
name = "spong_controller_params",
srcs = ["spong_controller_params.named_vector"],
srcs = ["spong_controller_params_named_vector.yaml"],
visibility = ["//visibility:public"],
)

Expand Down
8 changes: 0 additions & 8 deletions examples/acrobot/acrobot_input.named_vector

This file was deleted.

7 changes: 7 additions & 0 deletions examples/acrobot/acrobot_input_named_vector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace: drake::examples::acrobot
elements:
-
name: tau
doc: Torque at the elbow
doc_units: Nm
default_value: 0.0
83 changes: 0 additions & 83 deletions examples/acrobot/acrobot_params.named_vector

This file was deleted.

71 changes: 71 additions & 0 deletions examples/acrobot/acrobot_params_named_vector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
namespace: drake::examples::acrobot
elements:
# Note: default parameter values are taken from:
# Spong, Mark W. Swing up control of the acrobot. Robotics and Automation,
# 1994. Proceedings., 1994 IEEE International Conference on. IEEE, 1994.
-
name: m1
doc: Mass of link 1.
doc_units: kg
default_value: 1.0
min_value: 0.0
-
name: m2
doc: Mass of link 2.
doc_units: kg
default_value: 1.0
min_value: 0.0
-
name: l1
doc: Length of link 1.
doc_units: m
default_value: 1.0
min_value: 0.0
-
name: l2
doc: Length of link 2.
doc_units: m
default_value: 2.0
min_value: 0.0
-
name: lc1
doc: Vertical distance from shoulder joint to center of mass of link 1.
doc_units: m
default_value: 0.5
min_value: 0.0
-
name: lc2
doc: Vertical distance from elbow joint to center of mass of link 1.
doc_units: m
default_value: 1.0
min_value: 0.0
-
name: Ic1
doc: Inertia of link 1 about the center of mass of link 1.
doc_units: kg*m^2
default_value: 0.083
min_value: 0.0
-
name: Ic2
doc: Inertia of link 2 about the center of mass of link 2.
doc_units: kg*m^2
default_value: 0.33
min_value: 0.0
-
name: b1
doc: Damping coefficient of the shoulder joint.
doc_units: kg*m^2/s
default_value: 0.1
min_value: 0.0
-
name: b2
doc: Damping coefficient of the elbow joint.
doc_units: kg*m^2/s
default_value: 0.1
min_value: 0.0
-
name: gravity
doc: Gravitational constant.
doc_units: m/s^2
default_value: 9.81
min_value: 0.0
2 changes: 1 addition & 1 deletion examples/acrobot/acrobot_plant.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AcrobotPlant : public systems::LeafSystem<T> {
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(AcrobotPlant)

/// Constructs the plant. The parameters of the system are stored as
/// Parameters in the Context (see acrobot_params.named_vector).
/// Parameters in the Context (see acrobot_params_named_vector.yaml).
AcrobotPlant();

/// Scalar-converting copy constructor. See @ref system_scalar_conversion.
Expand Down
26 changes: 0 additions & 26 deletions examples/acrobot/acrobot_state.named_vector

This file was deleted.

22 changes: 22 additions & 0 deletions examples/acrobot/acrobot_state_named_vector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace: drake::examples::acrobot
elements:
-
name: theta1
doc: The shoulder joint angle
doc_units: rad
default_value: 0.0
-
name: theta2
doc: The elbow joint angle
doc_units: rad
default_value: 0.0
-
name: theta1dot
doc: The shoulder joint velocity
doc_units: rad/s
default_value: 0.0
-
name: theta2dot
doc: The elbow joint velocity
doc_units: rad/s
default_value: 0.0
34 changes: 0 additions & 34 deletions examples/acrobot/spong_controller_params.named_vector

This file was deleted.

29 changes: 29 additions & 0 deletions examples/acrobot/spong_controller_params_named_vector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace: drake::examples::acrobot
elements:
# Note: default parameter values are taken from:
# Spong, Mark W. "Swing up control of the acrobot." Robotics and Automation,
# 1994. Proceedings., 1994 IEEE International Conference on. IEEE, 1994.
-
name: k_e
doc: Energy shaping gain.
doc_units: s
default_value: 5.0
min_value: 0.0
-
name: k_p
doc: Partial feedback linearization proportional gain.
doc_units: s^-2
default_value: 50.0
min_value: 0.0
-
name: k_d
doc: Partial feedback linearization derivative gain.
doc_units: s^-1
default_value: 5.0
min_value: 0.0
-
name: balancing_threshold
doc: Cost value at which to switch from swing up to balancing.
doc_units:
default_value: 1e3
min_value: 0.0
4 changes: 2 additions & 2 deletions examples/compass_gait/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package(default_visibility = ["//visibility:private"])
drake_cc_vector_gen_library(
name = "compass_gait_vector_types",
srcs = [
"compass_gait_continuous_state.named_vector",
"compass_gait_params.named_vector",
"compass_gait_continuous_state_named_vector.yaml",
"compass_gait_params_named_vector.yaml",
],
visibility = ["//visibility:public"],
)
Expand Down
26 changes: 0 additions & 26 deletions examples/compass_gait/compass_gait_continuous_state.named_vector

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace: drake::examples::compass_gait
elements:
-
name: stance
doc: The orientation of the stance leg, measured clockwise from the vertical axis.
doc_units: radians
default_value: 0.0
-
name: swing
doc: The orientation of the swing leg, measured clockwise from the vertical axis.
doc_units: radians
default_value: 0.0
-
name: stancedot
doc: The angular velocity of the stance leg.
doc_units: rad/sec
default_value: 0.0
-
name: swingdot
doc: The angular velocity of the swing leg.
doc_units: rad/sec
default_value: 0.0
Loading

0 comments on commit 03102bc

Please sign in to comment.