-
Notifications
You must be signed in to change notification settings - Fork 0
Vector Simulation Setup [DEPRECATED]
DEPRECATION NOTICE - This installation procedure is outdated.
Important Notice: this is a condensed version of setup instructions. For details, refer to Stanley wiki page for vector.
- Ubuntu 14.04 Trusty
Install ROS Indigo
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 --recv-key 0xB01FA116sudo apt-get updatesudo apt-get install ros-indigo-desktop-fullsudo rosdep initrosdep updateecho "source /opt/ros/indigo/setup.bash" >> ~/.bashrcsource ~/.bashrcsudo apt-get install python-rosinstall
Note that "$ROS_DISTRO" should already be set if ROS is set up correctly.
sudo apt-get install ros-$ROS_DISTRO-control-toolbox ros-$ROS_DISTRO-moveit-core ros-$ROS_DISTRO-costmap-2d ros-$ROS_DISTRO-move-base ros-$ROS_DISTRO-jsk-recognition ros-$ROS_DISTRO-controller-manager ros-$ROS_DISTRO-gazebo-ros* ros-$ROS_DISTRO-hector* ros-$ROS_DISTRO-rviz-imu-plugin ros-$ROS_DISTRO-robot-pose-ekf ros-$ROS_DISTRO-robot-localization ros-$ROS_DISTRO-yocs-cmd-vel-mux ros-$ROS_DISTRO-joint-*
mkdir ~/Software- If you choose to not do this, put packages under vector workspace and ignore all the
lncommands in future steps.
Install Freenect2
You should not need to do this if there is another account that has already run these steps. To check, run
ls /usr/share/cmake-2.8/Modules/ | grep Findfreenect2 .
If the output is 'Findfreenect2.cmake', skip this section.
NOTE and read important information below. Do not start installing yet!
- These are instructions from the Kinect 2 installation tutorial here. If you use the above link to install Freenect2, do NOT follow the steps to install CUDA! This is an optional step that will have you download the wrong NVIDIA drivers, and will cause you to waste a day trying to figure out why your computer has locked you out. DON'T DO IT!
- If you are using 14.04: There is a line under "Install OpenGL" that is
(Ubuntu 14.04 only) sudo dpkg -i debs/libglfw3*deb; sudo apt-get install -f; sudo apt-get install libgl1-mesa-dri-lts-vivid (If the last command conflicts with other packages, don't do it.)THAT LAST LINE DOES CONFLICT!! Run this ONLY:sudo dpkg -i debs/libglfw3*deb; sudo apt-get install -f. Otherwise, you will have the same problem as above, when it uninstalls the window manager.
To be safe and if you do not need any of the optional dependencies (OpenCL, CUDA, VAAPI, OpenNI2), just follow the steps below:
cd ~/Softwaregit clone https://github.com/OpenKinect/libfreenect2.gitcd libfreenect2cd depends; ./download_debs_trusty.shsudo dpkg -i debs/libusb*debsudo apt-get install libturbojpeg libjpeg-turbo8-devsudo dpkg -i debs/libglfw3*deb; sudo apt-get install -fcd ..mkdir build && cd buildcmake .. -DCMAKE_INSTALL_PREFIX=~/Software/freenect2make install-
sudo ln -sf ~/Software/freenect2/lib/cmake/freenect2/freenect2Config.cmake /usr/share/cmake-2.8/Modules/Findfreenect2.cmake(make sure to check your cmake version first withcmake --version)* -
sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/(for accessing the Kinect)
*Note that newer versions of freenect may have the freenect2Config.cmake file named as freenect2.cmake.in in the root of the libfreenect project folder.
sudo apt-get install libnlopt-devmkdir -p ~/Software/stanleycd ~/Software/stanleygit clone git@github.com:StanleyInnovation/vector_v1.gitmkdir -p ~/vector_ws/srcln -s ~/Software/stanley/vector_v1/ ~/vector_ws/src/vi ~/vector_ws/src/vector_v1/vector_network/env-hooks/50.vector_network_config.sh- For simulation, uncomment
export ROBOT_NETWORK=eth0and comment outexport ROBOT_NETWORK=br0 - Make sure
VECTOR_USE_PLATFORM_ODOMETRY(line 27) in~/vector_ws/src/vector_v1/vector_common/vector_config/vector_config.shis set totrue - For two arms, edit
~/vector_ws/src/vector_v1/vector_common/vector_config/vector_config.shaccordingly (setVECTOR_HAS_TWO_KINOVA_ARMSandVECTOR_HAS_TWO_ROBOTIQ_GRIPPERStotrue) cd ~/vector_ws/srccatkin_init_workspace
sudo gedit /opt/ros/indigo/share/hector_pose_estimation/hector_pose_estimation_nodelets.xml- Paste the following into the file:
<library path="lib/libhector_pose_estimation_nodelet"> <class name="hector_pose_estimation/PoseEstimationNodelet" type="hector_pose_estimation::PoseEstimationNodelet" base_class_type="nodelet::Nodelet"> <description> This nodelet initializes the pose estimation filter with a generic system model driven by IMU measurements only. </description> </class> </library>
sudo apt-get install python-easygui ros-$ROS_DISTRO-ecl-geometry ros-$ROS_DISTRO-moveit-full python-pip
If moveit-full is not found on Kinetic, use ros-$ROS_DISTRO-moveit.
sudo pip install --upgrade pip && sudo pip install aenumcd ~/Softwaregit clone https://bitbucket.org/traclabs/trac_ik.git-
ln -s ~/Software/trac_ik ~/vector_ws/src(Skip this step if you already have trac_ik ROS package installed) git clone -b vector-develop https://github.com/GT-RAIL/wpi_jaco.gitln -s ~/Software/wpi_jaco/wpi_jaco_msgs/ ~/vector_ws/src/ln -s ~/Software/wpi_jaco/wpi_jaco_wrapper/ ~/vector_ws/src/ln -s ~/Software/wpi_jaco/jaco_sdk/ ~/vector_ws/src/git clone https://github.com/GT-RAIL/rail_manipulation_msgs.gitln -s ~/Software/rail_manipulation_msgs/ ~/vector_ws/src/cd stanleygit clone https://github.com/StanleyInnovation/robotiq_85_gripper.gitln -s ~/Software/stanley/robotiq_85_gripper/robotiq_85_msgs/ ~/vector_ws/src/cd ~/Softwaremkdir HLP-R && cd HLP-Rgit clone git@github.com:HLP-R/hlpr_manipulation.gitln -s ~/Software/HLP-R/hlpr_manipulation/ ~/vector_ws/src/git clone -b 7dof https://github.com/GT-RAIL/kinova-ros.gitln -s ~/Software/kinova-ros ~/vector_ws/src/
cd ~/Software/HLP-Rgit clone git@github.com:HLP-R/hlpr_simulator.gitln -s ~/Software/HLP-R/hlpr_simulator/ ~/vector_ws/src/
sudo apt-get install ros-$ROS_DISTRO-navigation ros-$ROS_DISTRO-slam-gmapping- WARNING: If gazebo server errors out when running the simulator with a complaint related to tf::TransformBroadcaster() (it has to do with gazebo pluggin), then try either of these options:
- Source the above vector_config.sh file above and try running with
VECTOR_USE_PLATFORM_ODOMETRY=true - If it still does, undo the previous changes and clean/rebuild your catkin workspace, then run the simulator.
- Source the above vector_config.sh file above and try running with
- Open a new terminal or source
~/.bashrc cd ~/vector_wscatkin_makesource devel/setup.bashroslaunch hlpr_gazebo vector.launch
- Once everything is working fine and all components are installed, there is a custom package that pulls together each of these launch files into a single system. The tutorial on this package can be found here
- If you get an error about “bad address” when trying to do catkin_make (and you are not on the real robot)
- Change your file: ~/vector_ws/src/vector_network/env-hooks/50.vector_network_config.sh
- Change the ROS_IP to export ROS_IP=127.0.0.1
- If you get an error about namespaces when launch gazebo see fix here. Listed below:
- Specifically, run these commands
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu trusty main" > /etc/apt/sources.list.d/gazebo-latest.list'wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -- Then open up “Software Updater” and update Gazebo
- If you are trying to use TAB-complete after installing and encounter
Warning: error while crawling...- run
sudo umount /home/<useraccount>/.gvfsthensudo rm -rf .gvfs/replacing with your user account (obviously)
- run
- If you get an error about unmet dependencies for libcheese-gtk23 and libcheese7 while installing Freenect2, when running command
sudo dpkg -i debs/libglfw3*deb; sudo apt-get install -f; sudo apt-get install libgl1-mesa-dri-lts-vivid- instead run
sudo dpkg -i debs/libglfw3*deb; sudo apt-get install -f; sudo apt-get install libgl1-mesa-dri-lts-vivid libcheese-gtk23 libcheese7 libclutter-1.0-0 libclutter-gtk-1.0-0 libcogl15 libclutter-gst-2.0-0 gstreamer1.0-clutter
- instead run