Skip to content

Commit

Permalink
use arrow keys on Jonas computer
Browse files Browse the repository at this point in the history
  • Loading branch information
willh003 committed Aug 4, 2023
1 parent 57cce26 commit ef2e580
Show file tree
Hide file tree
Showing 15 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions wild_visual_navigation_orbit/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class SimConfig:
# Simulation and Planner params
sim_mode = 'wvn' # either 'log' or 'wvn'. If 'log', just collects images and camera locations. If 'wvn', runs the full wvn pipeline
manual_control = True
teamviewer=True

robot_spawn_location = (0, 0, 0)
env_x = 40
env_y = 80
Expand Down
Binary file modified wild_visual_navigation_orbit/live_overlay.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions wild_visual_navigation_orbit/wvn_orbit_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,11 @@ def _sub_keyboard_event(self, event, *args, **kwargs) -> bool:
if event.type == carb.input.KeyboardEventType.KEY_PRESS:
# on pressing, the command is incremented
if event.input.name in SimConfig.input_keyboard_mapping:

self._base_command[0:3] == np.array(SimConfig.input_keyboard_mapping[event.input.name])
if SimConfig.teamviewer:
self._base_command[0:3] == np.array(SimConfig.input_keyboard_mapping[event.input.name])
else:
self._base_command[0:3] += np.array(SimConfig.input_keyboard_mapping[event.input.name])

print(self._base_command)
elif event.input.name == "R":
self.respawn_anymal(SimConfig.robot_spawn_location)
Expand All @@ -754,8 +757,12 @@ def _sub_keyboard_event(self, event, *args, **kwargs) -> bool:
elif event.type == carb.input.KeyboardEventType.KEY_RELEASE:
# on release, the command is decremented
if event.input.name in SimConfig.input_keyboard_mapping:
self._base_command[0:3] += np.array(SimConfig.input_keyboard_mapping[event.input.name])
if SimConfig.teamviewer:
self._base_command[0:3] += np.array(SimConfig.input_keyboard_mapping[event.input.name])
else:
self._base_command[0:3] -= np.array(SimConfig.input_keyboard_mapping[event.input.name])
print(self._base_command)

return True

def respawn_anymal(self, loc=(0,0,0)):
Expand Down

0 comments on commit ef2e580

Please sign in to comment.