Skip to content

Instantly share code, notes, and snippets.

@xu-chris
Created April 11, 2019 09:04
Show Gist options
  • Save xu-chris/b7d64ececea6120d079a7596f9f3db9d to your computer and use it in GitHub Desktop.
Save xu-chris/b7d64ececea6120d079a7596f9f3db9d to your computer and use it in GitHub Desktop.
# Add ros repo
# Add key of ros repo
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
# Install ros
sudo apt update
sudo apt install ros-melodic-desktop-full
apt search ros-melodic
# install ros dependency
sudo rosdep init
rosdep update
## OPTIONAL: Auto source ROS
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
## OPTIONAL: Install python packages for ros
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
# Create workspace
. /opt/ros/melodic/setup.bash
mkdir -p catkin_ws/src
cd catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
# Install RosAria
cd ~/
mkdir tmp
cd tmp
git clone https://github.com/reedhedges/AriaCoda
cd AriaCoda/src/
make
sudo make install
# Install ROS packages
sudo apt-get install ros-melodic-teleop-twist-keyboard
sudo apt-get install ros-melodic-joy
# Install Teleop-Joy package
cd ~/catkin_ws/src
git clone https://github.com/ros-teleop/teleop_twist_joy
cd ..
catkin_make
# Connect and test joystick
sudo jstest /dev/input/js0
# Move joystick
#### RUN EVERYTHING
# Terminal window 1: Roscore
roscore
# Terminal window 2: RosAria
cd ~/catkin_ws && . devel/setup.bash
sudo chmod a+rw /dev/ttyUSB0
rosrun rosaria RosAria
# Terminal window 3: Joystick
cd ~/catkin_ws_.
. devel/setup.bash
rosrun joy joy_node _autorepeat_rate:=10
# Terminal window 4: Joystick to RosAria connection
cd ~/catkin_ws
. devel/setup.bash
rosparam set joy_node/dev "dev/input/js0"
rosrun teleop_twist_joy teleop_node cmd_vel:=RosAria/cmd_vel _scale_linear:=0.2 _scale_angular:=0.5 _axis_linear:=5 _axis_angular:=4
## OPTIONAL: Terminal window 5: Check graph
rqt_graph
####### Kinect
rosrun kinect2_bridge kinect2_bridge _reg_method:=cpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment