(walker_features, reference_features,
                              **unused_kwargs)
return RewardFnOutput(reward=reward, debug=terms,
                        reward_terms=sort_dict(terms))
A reward based on com, body quaternions, joints velocities & appendages.
A reward based on com, body quaternions, joints velocities & appendages.
A reward based on com body quaternions joints velocities & appendages .
def multi_term_pose_reward_fn(walker_features, reference_features,
                              **unused_kwargs):
  """A reward based on com, body quaternions, joints velocities & appendages."""
  differences = compute_squared_differences(walker_features, reference_features)
  com = .1 * np.exp(-10 * differences['center_of_mass'])
  joints_velocity = 1.0 * np.exp(-0.1 * differences['joints_velocity'])
  appendages = 0.15 * np.exp(-40. * differences['appendages'])
  body_quaternions = 0.65 * np.exp(-2 * differences['body_quaternions'])
  terms = {
      'center_of_mass': com,
      'joints_velocity': joints_velocity,
      'appendages': appendages,
      'body_quaternions': body_quaternions
  }
  reward = sum(terms.values())
  return RewardFnOutput(reward=reward, debug=terms,
                        reward_terms=sort_dict(terms))
def multi_term_pose_reward_fn ( walker_features , reference_features , * * unused_kwargs ) : differences = compute_squared_differences ( walker_features , reference_features ) com = .1 * np . exp ( - 10 * differences [ 'center_of_mass' ] ) joints_velocity = 1.0 * np . exp ( - 0.1 * differences [ 'joints_velocity' ] ) appendages = 0.15 * np . exp ( - 40. * differences [ 'appendages' ] ) body_quaternions = 0.65 * np . exp ( - 2 * differences [ 'body_quaternions' ] ) terms = { 'center_of_mass' : com , 'joints_velocity' : joints_velocity , 'appendages' : appendages , 'body_quaternions' : body_quaternions } reward = sum ( terms . values ( ) ) return RewardFnOutput ( reward = reward , debug = terms , reward_terms = sort_dict ( terms ) )