Skip to content

Commit

Permalink
Add example data mpc test
Browse files Browse the repository at this point in the history
  • Loading branch information
hbuurmei committed Feb 13, 2025
1 parent e0e8875 commit aee3e4d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions stack/main/src/executor/executor/test_mpc_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def service_callback(self, async_response):
except Exception as e:
self.get_logger().error(f'Service call failed: {e}.')

def update_observations(self, t0, eps=1e-4):
def update_observations(self, t0, eps_noise=1e-4):
"""
Update the latest observations using predicted observations from MPC plus added noise.
"""
Expand All @@ -165,7 +165,7 @@ def update_observations(self, t0, eps=1e-4):
y_predicted = self.zopt[:idx0+1]

# Add noise to simulate real experiment
y_centered_tip = y_predicted + eps * jax.random.normal(key=self.rnd_key, shape=y_predicted.shape)
y_centered_tip = y_predicted + eps_noise * jax.random.normal(key=self.rnd_key, shape=y_predicted.shape)
N_new_obs = y_centered_tip.shape[0]

# Update tracked observation
Expand Down

0 comments on commit aee3e4d

Please sign in to comment.