Skip to content

Commit

Permalink
Update sail.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YuejiangLIU authored Jul 10, 2022
1 parent 5232d4d commit 6163060
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crowd_nav/policy/sail.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from crowd_nav.utils.transform import MultiAgentTransform

class ExtendedNetwork(nn.Module):
""" Policy network for imitation learning """
def __init__(self, num_human, embedding_dim=64, hidden_dim=64, local_dim=32):
super().__init__()
self.num_human = num_human
Expand Down Expand Up @@ -125,7 +126,7 @@ def predict(self, state):
return ActionXY(action[0].item(), action[1].item()) if self.kinematics == 'holonomic' else ActionRot(action[0].item(), action[1].item())

def transform(self, state):
""" Transform state object to tensor input of RNN policy
""" Transform state object to tensor input
"""

robot_state = torch.Tensor([state.self_state.px, state.self_state.py, state.self_state.vx, state.self_state.vy, state.self_state.gx, state.self_state.gy])
Expand Down

0 comments on commit 6163060

Please sign in to comment.