Last active
May 31, 2019 18:33
-
-
Save ethanj/040b5c9943d945680039a53237d91c4f to your computer and use it in GitHub Desktop.
ROS setup
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
# ROS install ros version 'kinetic' | |
# mac - http://wiki.ros.org/kinetic/Installation/OSX/Homebrew/Source | |
# ubuntu - http://wiki.ros.org/kinetic/Installation/Ubuntu | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 | |
sudo apt-get update | |
sudo apt-get install ros-kinetic-desktop-full | |
sudo rosdep init | |
rosdep update | |
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc | |
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential | |
# useful basic ROS packages | |
sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control ros-kinetic-rosparam-handler ros-kinetic-rosparam-shortcuts libcwiid-dev libcwiid1 lswm python-cwiid wmgui wminput cwiid-dbg libbluetooth-dev ros-kinetic-robot-localization ros-kinetic-robot-localization ros-kinetic-dwa-local-planner ros-kinetic-move-base ros-kinetic-serial | |
#install catkin_tools | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list' | |
wget http://packages.ros.org/ros.key -O - | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install python-catkin-tools | |
sudo apt-get install python-rosinstall-generator | |
sudo apt-get install python-wstool | |
#for now we need to use python 2.7.xx , iow system version | |
pyenv global system | |
sudo apt-get install python-pip | |
pip install -U scikit-learn numpy scipy | |
#give user access to serial devices by adding to dialout group | |
#note: this does not take effect until logout and back in | |
sudo usermod -aG dialout $USER | |
# for reference | |
# usermod -G adm,cdrom,dip,plugdev,lpadmin,sambashare,dialout,sudo,staff,users ethan | |
-------------- | |
# ROS install basic packages from source | |
mkdir -p ~/catkin_ws | |
cd ~/catkin_ws | |
wstool init src | |
catkin init | |
cd ~/catkin_ws/src | |
# turtlebot | |
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git | |
catkin build | |
source ~/catkin_ws/devel/setup.zsh | |
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git | |
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git | |
catkin build | |
-------------- | |
duplicate package into custom version, ie ej_turtlebot3_slam | |
# after copying directory from origin to new | |
# edit package.xml and CMakelists.txt and change name to new one in each | |
# ie turtlebot3_slam => ej_turtlebot3_slam | |
catkin build | |
source ~/.zshrc | |
-------------------- | |
# code setup | |
mkdir -p ~/projects/growbot/growbot_ws | |
cd ~/projects/growbot/growbot_ws | |
wstool init src | |
catkin init | |
catkin build | |
source devel/setup.zsh | |
# create a new package | |
cd src | |
catkin create pkg my_first_ros_pkg | |
# edit package.xml, CMakeLists.txt and in this case hello_world_node.cpp | |
cd .. | |
catkin build | |
rosrun my_first_ros_pkg hello_world_node | |
# with dependencies | |
catkin create pkg ros_tutorials_service --catkin-deps message_generation std_msgs roscpp | |
------------ | |
# realsense | |
#https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages | |
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" | |
sudo apt-get update | |
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE | sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE | |
sudo apt-get update | |
#sudo apt-get install librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg | |
#install older versions | |
sudo apt-get remove librealsense2 librealsense2-dkms librealsense2-utils librealsense2-dev librealsense2-dbg | |
sudo apt-get install librealsense2=2.17.1-0~realsense0.372 librealsense2-dkms librealsense2-utils=2.17.1-0~realsense0.372 librealsense2-dev=2.17.1-0~realsense0.372 librealsense2-dbg=2.17.1-0~realsense0.372 librealsense2-udev-rules=2.17.1-0~realsense0.372 | |
realsense-viewer | |
rs-enumerate-devices | |
modinfo uvcvideo | grep version | |
lsusb | |
# calibration | |
#https://www.intel.com/content/www/us/en/support/articles/000026723/emerging-technologies/intel-realsense-technology.html | |
sudo apt-get install libusb-dev libusb-1.0-0-dev libglfw3 libglfw3-dev freeglut3 freeglut3-dev libpng12-dev librscalibrationtool librscalibrationapi | |
/usr/bin/Intel.Realsense.DynamicCalibrator | |
# update firmware | |
#https://www.intel.com/content/www/us/en/support/articles/000028171/emerging-technologies/intel-realsense-technology.html | |
#download latest non-dev firmware at https://downloadcenter.intel.com/download/28237/Latest-Firmware-for-Intel-RealSense-D400-Product-Family | |
# make sure plugged into usb3 port, ie: | |
lsusb | |
> Bus 002 Device 008: ID 8086:0b07 Intel Corp. | |
# show info | |
intel-realsense-dfu -p -b 002 -d 006 -e | |
# install new firmware | |
intel-realsense-dfu -b 002 -d 008 -f -i Signed_Image_UVC_5_10_6_0.bin | |
#clone and build the ros package | |
cd ~/catkin_ws/src | |
git clone https://github.com/intel-ros/realsense.git | |
cd realsense | |
catkin_make_isolated --install --use-ninja -DCATKIN_ENABLE_TESTING=0 -DCMAKE_BUILD_TYPE=Release | |
# gazebo-realsense | |
#this does not compile in gazebo 7 .. apparently need 7.1 at least? | |
# https://github.com/intel/gazebo-realsense | |
# http://answers.gazebosim.org/question/17369/error-class-gazebophysicsworld-has-no-member-named-lightcount/ | |
#instead we can use generic depth cam | |
http://gazebosim.org/tutorials?tut=ros_depth_camera&cat=connect_ros | |
--------------------- | |
# install new version of ddynamic_reconfigure (realsense installed old version) | |
cd ~/catkin_ws/src | |
rm -rf realsense/ddynamic_reconfigure | |
git clone https://github.com/awesomebytes/ddynamic_reconfigure.git | |
catkin clean ddynamic_reconfigure | |
catkin build ddynamic_reconfigure | |
#python version also needed | |
cd ~/projects/growbot/resources/ | |
git clone https://github.com/pal-robotics/ddynamic_reconfigure_python.git | |
cd ddynamic_reconfigure_python | |
python setup.py build | |
sudo python setup.py install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment