From 8ecf789ab350ab0c3fe76ef7c5b1289800b84c49 Mon Sep 17 00:00:00 2001 From: Alphonsus Adu-Bredu Date: Sat, 12 Mar 2022 14:17:16 -0500 Subject: [PATCH 1/3] fixed local variable name --- environments/atlas/methods/initialize.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/environments/atlas/methods/initialize.jl b/environments/atlas/methods/initialize.jl index f538bae9d..7a5034d56 100644 --- a/environments/atlas/methods/initialize.jl +++ b/environments/atlas/methods/initialize.jl @@ -223,11 +223,11 @@ function initialize_atlas!(mechanism::Mechanism; return nothing end -function initialize_atlas_stance!(mechanism::Mechanism; +function initialize_atlas_stance!(mech::Mechanism; body_position=[0.0, 0.0, 0.2], body_orientation=[0.0, 0.0, 0.0], - link_linear_velocity=[zeros(3) for i=1:length(mechanism.bodies)], - link_angular_velocity=[zeros(3) for i=1:length(mechanism.bodies)], + link_linear_velocity=[zeros(3) for i=1:length(mech.bodies)], + link_angular_velocity=[zeros(3) for i=1:length(mech.bodies)], hip_orientation=0.0, knee_orienation=0.0) where T @@ -278,7 +278,7 @@ function initialize_atlas_stance!(mechanism::Mechanism; nothing end - zero_velocity!(mechanism) + zero_velocity!(mech) return nothing end From 0023cc0598e11b05233ecfe2c0c9491648037a18 Mon Sep 17 00:00:00 2001 From: Alphonsus Adu-Bredu Date: Sat, 12 Mar 2022 14:53:30 -0500 Subject: [PATCH 2/3] exporting `contact_constraint` function. This makes it easier to define custom mechanisms. Without this change, I could still access it using `Dojo.contact_constraint` but that seems unnecessarily verbose --- src/Dojo.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dojo.jl b/src/Dojo.jl index bb2c5b4bf..dac9b89a4 100644 --- a/src/Dojo.jl +++ b/src/Dojo.jl @@ -191,7 +191,8 @@ export get_contact, get_sdf, contact_location, - damper_impulses + damper_impulses, + contact_constraint # Inputs export From 329c33af5519fc042de16cb7d3cbbc5c3992bf64 Mon Sep 17 00:00:00 2001 From: Alphonsus Adu-Bredu Date: Sat, 12 Mar 2022 15:36:14 -0500 Subject: [PATCH 3/3] exporting `zero_velocity!` function Makes defining custom mechanisms outside the Dojo package easier. Without this change, one could use `Dojo.zero_velocity!` but that's unnecessarily verbose. --- src/Dojo.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dojo.jl b/src/Dojo.jl index dac9b89a4..4da0c62c0 100644 --- a/src/Dojo.jl +++ b/src/Dojo.jl @@ -205,7 +205,8 @@ export Mechanism, get_mechanism, initialize!, - set_floating_base + set_floating_base, + zero_velocity! # Maximal export