Skip to content

Commit 5a72ca5

Browse files
committed
fix: minor fixes
1 parent 2fa9459 commit 5a72ca5

File tree

9 files changed

+16
-13
lines changed

9 files changed

+16
-13
lines changed

examples/plate-balancing/config/C3/controller-options/2_supports.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ solve_time_filter_alpha: 0.95
55
publish_frequency: 0
66
state_prediction_joints:
77
- name: "plate_x"
8-
max_acceleration: 10
8+
max_acceleration: 2
99
- name: "plate_y"
10-
max_acceleration: 10
10+
max_acceleration: 2
1111
- name: "plate_z"
12-
max_acceleration: 10
12+
max_acceleration: 2
1313

1414
# Workspace Limits
1515
# End Effector Workspace Limits Specified as Linear Constraints [x, y, z, lb, ub]

examples/plate-balancing/config/Simulation/scene-config/4_wall.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ camera_target: [ 0.5, 0, 0.5 ]
66
environment_models: [examples/plate-balancing/urdf/side_wall.urdf]
77
# orientation in RPY then position in XYZ
88
environment_orientations: [[0.0, 0.0, 0.0]]
9-
environment_positions: [[0.6, 0.3, 0.35]]
9+
environment_positions: [[0.6, 0.285, 0.35]]
1010

examples/plate-balancing/systems/end_effector_orientation.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ void EndEffectorOrientationTrajectoryGenerator::CalcTraj(
5252
*casted_traj = *trajectory_input;
5353
} else {
5454
PiecewiseQuaternionSlerp<double> result;
55-
Eigen::VectorXd neutral_quaternion = VectorXd::Zero(4);
56-
neutral_quaternion(0) = 1;
5755
result = drake::trajectories::PiecewiseQuaternionSlerp<double>(
5856
{0, 1},
5957
{Eigen::Quaterniond(1, 0, 0, 0), Eigen::Quaterniond(1, 0, 0, 0)});

examples/plate-balancing/urdf/side_wall.urdf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<collision name="wall">
1616
<origin rpy="0 0 0" xyz="0 0 0.0"/>
1717
<geometry>
18-
<box size="0.5 0.05 0.7"/>cod
18+
<box size="0.5 0.05 0.7"/>
1919
</geometry>
2020
<drake:proximity_properties>
2121
<drake:rigid_hydroelastic/>
@@ -26,7 +26,7 @@
2626
<visual>
2727
<origin rpy="0 0 0" xyz="0 0 0.0"/>
2828
<geometry>
29-
<box size="0.5 0.05 0.7"/>cod
29+
<box size="0.5 0.05 0.7"/>
3030
</geometry>
3131
<material name="silver">
3232
<color rgba="0.75 0.75 0.75 1"/>

examples/plate-balancing/urdf/tray_lcs.sdf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
<length>0.022</length>
3737
</cylinder>
3838
</geometry>
39-
<pose>0.15 0.3 0 0 0 0</pose>
4039
</collision>
4140
</link>
4241
</model>

lcmtypes/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ drake_java_binary(
5656
visibility = ["//visibility:private"],
5757
runtime_deps = [
5858
":lcmtypes_robot_java",
59+
"@c3//lcmtypes:lcmtypes_c3_java",
5960
"@drake//lcmtypes:lcmtypes_drake_java",
6061
],
6162
)

systems/controllers/osc/external_force_tracking_data.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void ExternalForceTrackingData::Update(
3737
const drake::systems::Context<double>& context_wo_spr,
3838
const drake::trajectories::Trajectory<double>& traj, double t) {
3939
DRAKE_DEMAND(traj.rows() == 3);
40-
lambda_des_ = traj.value(t);
40+
lambda_des_ = -traj.value(t);
4141
}
4242

4343
} // namespace dairlib::systems::controllers

systems/controllers/osc/operational_space_control.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,11 @@ VectorXd OperationalSpaceControl::SolveQp(
403403
const auto active_contact_names = contact_names_map_.count(fsm_state) > 0
404404
? contact_names_map_.at(fsm_state)
405405
: std::vector<std::string>();
406-
id_qp_.UpdateDynamics(x_w_spr, active_contact_names, {});
406+
std::vector<std::string> active_external_forces = {};
407+
for (const auto& force_tracking_data : *force_tracking_data_vec_) {
408+
active_external_forces.push_back(force_tracking_data->GetName());
409+
}
410+
id_qp_.UpdateDynamics(x_w_spr, active_contact_names, active_external_forces);
407411

408412
// Invariant Impacts
409413
// Only update when near an impact

systems/trajectory_optimization/lcm_trajectory_systems.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ void LcmC3TrajectoryReceiver::OutputQuaternionTrajectory(
216216
} else if (trajectory_block.datapoints.rows() == 4) {
217217
Eigen::Vector4d quat = trajectory_block.datapoints.topRows(4).col(i);
218218
quaternion_datapoints.push_back(
219-
!quat.isZero() ? Eigen::Quaternion<double>(quat)
220-
: Eigen::Quaternion<double>(1, 0, 0, 0));
219+
!quat.isZero()
220+
? Eigen::Quaternion<double>(quat[0], quat[1], quat[2], quat[3])
221+
: Eigen::Quaternion<double>(1, 0, 0, 0));
221222
} else {
222223
throw std::runtime_error(
223224
"Invalid trajectory data points size: " +

0 commit comments

Comments
 (0)