henryliangt / usyd

0 stars 0 forks source link

ros #19

Open henryliangt opened 2 years ago

henryliangt commented 2 years ago

https://stackoverflow.com/questions/71366286/how-to-mount-dev-bus-usb-on-vscodes-devcontainer-for-docker

http://wiki.ros.org/joy

mount as file, js0, joystick

henryliangt commented 2 years ago

source ~/ .pyenv/bin/pyenv git clone xxxx.git

cd ~/rx_ws sudo apt install catkin catkin_make

docker built

git checkout -b henry_joy_stuff rostopic list rostopic echo joy

ros

henryliangt commented 2 years ago

into docker file.

RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc

RUN echo "[[ -f /rx_ws/devel/setup.bash ]] && source /rx_ws/devel/setup.bash" >> /root/.bashrc

ENV export GENICAM_GENTL64_PATH=$GENICAM_GENTL64_PATH:"/Vimba_6_0/VimbaGigETL/CTI/x86_64bit"

RUN apt-get update && apt install ros-noetic-joy

henryliangt commented 2 years ago

into devcontainer.json

"mounts": ["type=bind,source=/dev/input/js0,target=/dev/input/js0"],

listdown usb device

lsusb

list down the input device

ls /dev/input/

open vscode in current folder

code.

henryliangt commented 2 years ago

git diff

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 5a06c3c..4b1de97 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -81,6 +81,8 @@ RUN echo "[[ -f /rx_ws/devel/setup.bash ]] && source /rx_ws/devel/setup.bash" >>

ENV export GENICAM_GENTL64_PATH=$GENICAM_GENTL64_PATH:"/Vimba_6_0/VimbaGigETL/CTI/x86_64bit"

+RUN apt-get update && apt install ros-noetic-joy +

RUN echo "alias alias_name='/rx_ws/src/LCM/pyspy'" >> /root/.bashrc

export GENICAM_GENTL64_PATH=$GENICAM_GENTL64_PATH:"/Vimba_6_0/VimbaGigETL/CTI/x86_64bit

roslaunch usydrx_vision start_all_cameras.launch

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 46124f0..0b4e452 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,6 +14,8 @@ "workspaceMount": "source=${localWorkspaceFolder},target=/rx_ws/src/usyd_robotx_2022,type=bind", "workspaceFolder": "/rx_ws/src/usyd_robotx_2022",

henryliangt commented 2 years ago

RUN apt-get update && apt install ros-noetic-joy

"mounts": ["type=bind,source=/dev/input/js0,target=/dev/input/js0"],