diff --git a/Dockerfile b/Dockerfile index 955ab220512b05eabe6a24f46b11de87c9b76b65..fa9e6d0b936d89830f9d81f4e1538e96ada783ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,25 @@ FROM ubuntu:jammy - -# install pyhton3-tk without questions +# install python3-tk without questions ARG DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Stockholm RUN apt update && apt upgrade -RUN apt install -y python3 \ +# necessary +RUN apt install -y \ + python3 \ python3-pip \ python3-tk \ ipython3 \ git \ - sudo \ + sudo +# for some reason it's needed again +RUN apt update && apt upgrade +# nice to have +RUN apt install -y \ vim \ vim-youcompleteme \ + vim-python-jedi \ zsh \ zsh-syntax-highlighting \ python3-python-qt-binding @@ -31,9 +37,10 @@ USER student # copy repo to workdir COPY --chown=student . . RUN mkdir -p .cache/zsh/ -COPY ./dot_files_for_docker/.vimrc /home/student/ -COPY ./dot_files_for_docker/.zshrc /home/student/ -COPY ./dot_files_for_docker/global_extra_conf.py /home/student/ +COPY --chown=student /dot_files_for_docker/.vimrc /home/student/ +COPY --chown=student /dot_files_for_docker/.zshrc /home/student/ +COPY --chown=student /dot_files_for_docker/global_extra_conf.py /home/student/ +RUN vam install python-jedi RUN vam install youcompleteme # this is enough to run clik diff --git a/README.md b/README.md index c6148e4b98ff7aac21f7641bbd28c0fe1085b03d..156b164441e0d9dae43869500afee37c10d34911 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # do this everytime you use this repo ------------- -- do git stash +[comment]: <> (- do git stash) - and then git pull diff --git a/dot_files_for_docker/.vimrc b/dot_files_for_docker/.vimrc index 345fcb48d7eaaf44a483fe60bb92ad918e48880a..777938227a42a7060e97aa1fbe5f1550ba8f9c3d 100644 --- a/dot_files_for_docker/.vimrc +++ b/dot_files_for_docker/.vimrc @@ -30,13 +30,14 @@ nnoremap tfs :tabe +Ex<CR> set path +=** set wildmenu +" let's not complicate life with folds " automatically set fold if a c++ file is opened -autocmd FileType cpp set foldmethod=syntax -autocmd FileType hpp set foldmethod=syntax -" likewise if a python file is opened -autocmd FileType python set foldmethod=indent -autocmd FileType python nnoremap <space> za -autocmd FileType python vnoremap <space> zf +"autocmd FileType cpp set foldmethod=syntax +"autocmd FileType hpp set foldmethod=syntax +"" likewise if a python file is opened +"autocmd FileType python set foldmethod=indent +"autocmd FileType python nnoremap <space> za +"autocmd FileType python vnoremap <space> zf set nocompatible " be iMproved, required diff --git a/python/ur_simple_control/visualize/__pycache__/make_run.cpython-312.pyc b/python/ur_simple_control/visualize/__pycache__/make_run.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c3e6925ad1e4bc8f21203deccd4c3c653c18b39 Binary files /dev/null and b/python/ur_simple_control/visualize/__pycache__/make_run.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/make_run.py b/python/ur_simple_control/visualize/make_run.py index 04ebe058e8f5c0b5cc9264d4f7acd7ade0a9fb3f..7c79e5046cb16982c0540c11c354d13ad5e05fed 100644 --- a/python/ur_simple_control/visualize/make_run.py +++ b/python/ur_simple_control/visualize/make_run.py @@ -107,7 +107,7 @@ def loadRun(args, robot, log_data): # TODO fix if you want it, whatever atm man # TODO you're doubling fkine, dont if recompute_checker['p_es']: - log_data['p_es'][i] = robot.getMtool().translation + log_data['p_es'][i] = robot.getT_w_e().translation M = J_lin @ J_lin.T manip_index = np.sqrt(np.linalg.det(M)) diff --git a/python/ur_simple_control/visualize/manipulator_visual_motion_analyzer.py b/python/ur_simple_control/visualize/manipulator_visual_motion_analyzer.py index e949abd66610a22caf14e894e8144b76b539f8f5..2abb22effaa6a666ddfc93390550448fab3057f4 100644 --- a/python/ur_simple_control/visualize/manipulator_visual_motion_analyzer.py +++ b/python/ur_simple_control/visualize/manipulator_visual_motion_analyzer.py @@ -144,10 +144,10 @@ class ManipulatorVisualMotionAnalyzer: screensize = pyautogui.size() self.SCREEN_WIDTH = screensize.width self.SCREEN_HEIGHT = screensize.height - #self.SCALING_FACTOR_HEIGHT = 0.8 - #self.SCALING_FACTOR_WIDTH = 0.5 - self.SCALING_FACTOR_HEIGHT = 0.3 - self.SCALING_FACTOR_WIDTH = 0.3 + self.SCALING_FACTOR_HEIGHT = 0.8 + self.SCALING_FACTOR_WIDTH = 0.5 + #self.SCALING_FACTOR_HEIGHT = 0.3 + #self.SCALING_FACTOR_WIDTH = 0.3 # dicts not because they have to be, but just so that # they are named because that might be useful # and because names are the only thing keeping horrendous this code together @@ -190,8 +190,8 @@ class ManipulatorVisualMotionAnalyzer: # putting it into this class so that python remembers it 'cos reasons, whatever # TODO: load this from run log files later # or just remove it since you're not generating runs from here -# self.controller1 = getController("") -# self.controller2 = getController("invKinm_Jac_T") + self.controller1 = getController("") + self.controller2 = getController("invKinm_Jac_T") # TODO: load runs, not make them # but deliver the same format. # TODO: ensure you're saving AT LEAST what's required here @@ -883,8 +883,8 @@ if __name__ == "__main__": log_data = cleanUpRun(log_data, log_data['qs'].shape[0], 200) robot = RobotManager(args) log_data = loadRun(args, robot, log_data) - gui = ManipulatorVisualMotionAnalyzer(root, queue, log_data, False) - #gui = ManipulatorVisualMotionAnalyzer(root, queue, None, False) + #gui = ManipulatorVisualMotionAnalyzer(root, queue, log_data, False) + gui = ManipulatorVisualMotionAnalyzer(root, queue, None, False) # have mainloop 'cos from tkinter import * mainloop() diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/InverseKinematics.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/InverseKinematics.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..372abb691ba194ea503d33fd754eb870bf5170fd Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/InverseKinematics.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/drawing.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/drawing.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a713998bdd22d04ca21ee669a8169d573f87678c Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/drawing.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/drawing_for_anim.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/drawing_for_anim.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ebb9affe3fb0c0e6f752cd3ec041f833d62c22c Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/drawing_for_anim.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/follow_curve.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/follow_curve.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b4d774cabefc795b0faa295b7671c2195c7beb7 Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/follow_curve.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/forw_kinm.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/forw_kinm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5e0273e90dd8b0dccdd233ddc1bbedb943a8b8b8 Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/forw_kinm.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/inv_kinm.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/inv_kinm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..532c8936e60051e24d515610fd450ce5e81949a7 Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/inv_kinm.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/joint_as_hom_mat.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/joint_as_hom_mat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..626f44e0d6206b0f82a09e518d1876e7bde66b57 Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/joint_as_hom_mat.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/utils.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dff86f7d3e01b085200a86d4e5e8e7b328b3b14f Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/utils.cpython-312.pyc differ diff --git a/python/ur_simple_control/visualize/robot_stuff/__pycache__/webots_api_helper_funs.cpython-312.pyc b/python/ur_simple_control/visualize/robot_stuff/__pycache__/webots_api_helper_funs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c90a64e0af7b402aaa4f234b50ea6df280c5257 Binary files /dev/null and b/python/ur_simple_control/visualize/robot_stuff/__pycache__/webots_api_helper_funs.cpython-312.pyc differ