Hi, I am Adwait, an Electronics engineer by profession with a knack for learning to program intelligent machines. A roboticist by choice and guitarist in leisure time, I like to learn new languages(I already can speak 7) and do speed cubing when I am not punching keys on my computer. Previously, I worked at HTIC, IIT-Madras with the Spine Robotics team on an amazing project based on Image Guided Surgery (IGS) for the UR5 robotic arm. Previous to that, I was a summer fellow at CVIT, IIIT-H. In my sophomore year, I worked as robotics intern at KUKA, India along with the team of few engineers from ISRO on developing motion planning algorithms for robotic arms. Currently, I am waiting to join my master's at University of Bristol in Robotics.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import the libraries | |
import numpy as np | |
import os | |
import time | |
import sys | |
import gym | |
from gym import error, spaces, utils | |
import copy | |
from gym.utils import seeding | |
import matplotlib.pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#creating Grid Environment | |
COLORS = {0:[0.0,0.0,0.0], 1:[0.5,0.5,0.5], | |
2:[0.0,0.0,1.0], 3:[0.0,1.0,0.0], | |
4:[1.0,0.0,0.0], 6:[1.0,0.0,1.0], | |
7:[1.0,1.0,0.0]} | |
class GridEnv(gym.Env): | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#next step | |
def step(self, action): | |
action = self.actions | |
reward_dict = {'up':10, 'down':10, 'left':10, 'right':10, 'begin':0, 'obstacle':-5} | |
next_state = (self.agent_state[0]+self.actions_pos_dict[actions][0], | |
self.agent_state[1]+self.actions_pos_dict[actions][1] ) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#constructing grid and fetching observations | |
#reading the data from the grid | |
def read_grid_map(self, insert_grid_map): | |
with open(insert_grid_map, 'r') as f: | |
grid_map = f.readlines() | |
grids = np.array(list(map(lambda x: | |
list(map(lambda y: int(y), | |
x.split(''))), grid_map))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#fetching agent states | |
def get_agent_states(self): | |
start_state = None | |
target_state = None | |
start_state = list(map(lambda x:x[0] if len(x) > 0 else None, np.where(insert_grid_map==4))) | |
target_state = list(map(lambda x:x[0] if len(x) > 0 else None, np.where(insert_grid_map==3))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_agent_states(self): | |
start_state = None | |
target_state = None | |
start_state = list(map(lambda x:x[0] if len(x) > 0 else None, np.where(insert_grid_map==4))) | |
target_state = list(map(lambda x:x[0] if len(x) > 0 else None, np.where(insert_grid_map==3))) | |
if (start_state == [None, None] or target_state == [None, None]): | |
sys.exit('Start or Target state not specified') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat Dec 5 00:24:39 2021 | |
@author: adwaitnaik | |
""" | |
import pandas as pd | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest | |
# UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows | |
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.9.3-linux3/GitHubDesktop-linux-2.9.3-linux3.deb | |
### Uncomment below line if you have not installed gdebi-core before | |
# sudo apt-get install gdebi-core | |
sudo gdebi GitHubDesktop-linux-2.9.3-linux3.deb | |
# UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFRAME.registerComponent('camera-logger', { | |
schema: { | |
timestamp: { | |
type: 'int' | |
}, | |
seconds: { | |
type: 'int' | |
} | |
}, | |
init: function() { |
OlderNewer