## page was renamed from android/Tutorials/hydro/Ros Installation ## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Installation - ROS Development Environment ## multi-line description to be displayed in search ## description = Preparing a ros environment for development. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link=[[rosjava_build_tools/Tutorials/hydro/Creating Android Packages|Creating Android Packages]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = android installation #################################### <<IncludeCSTemplate(TutorialCSHeaderTemplate)>> <<TableOfContents(4)>> == Overview == This tutorial shows how to setup the usual ros environment for development. That is dependencies are installed via debs and a source workspace with multiple stacks containing catkin packages. It is useful when building across multiple libraries (android .aars) and repositories and also for automated continuous integration builds. == Android Studio & SDK == * Download and install the new [[android/Android Studio/Download|android studio+sdk]]. == RosJava == From debs on ubuntu {{{ > sudo apt-get install ros-hydro-catkin ros-hydro-ros ros-hydro-rosjava python-wstool }}} You could also install the [[http://wiki.ros.org/rosjava/Tutorials/hydro/Source%20Installation|rosjava sources]] and chain that workspace to the ones below. == Sources == === Fat Workspace === For the full suite of official repositories: {{{ > mkdir -p ~/android > wstool init -j4 ~/android/src https://raw.github.com/rosjava/rosjava/hydro/android_core.rosinstall # or if you want the android_apps/android remocons repos as well: # wstool init -j4 ~/android/src https://raw.github.com/rosjava/rosjava/hydro/android_apps.rosinstall > source /opt/ros/hydro/setup.bash > cd ~/android > catkin_make }}} === Diet Workspace === You don't need to compile all .aar's yourself - the official .aar's exist in our maven repo which will automatically download when they are listed as a gradle dependency of your project. In this case, you can just work on your own sources (saves a great deal of compilation time!). {{{ > mkdir -p ~/android > wstool init -j4 ~/android/src my_sources.rosinstall > source /opt/ros/hydro/setup.bash > cd ~/android > catkin_make }}} == Usage == You can now either continue to develop in one of three ways: * On the command line with `catkin_make`. * Source `devel/setup.bash` and just run gradle in each android package. * [[android/Android Studio#Importing|Import]] your packages into android studio and use the IDE. == Testing an App == === Android === Install the android_tutorial_camera app via Android Studio to your device. Refer to the [[android/Android Studio|Android Studio]] notes for instructions on how to do this and other things that will mercilessly coerce Android Studio into aligning your evil plans. Feel free to add to these. Launch the app and connect to a pc master configured in the following way. === PC === {{{ > source ~/android/devel/setup.bash }}} * Start a roscore on your machine * Launch the app on your device and enter your machine's ip when prompted * Start the image viewer on your machine {{{ > rosrun image_view image_view image:=camera/image _image_transport:=compressed }}} == Creating an App == Make use [[rosjava_build_tools/hydro|rosjava_build_tools]], it has a couple of `catkin_create_xxx` scripts which are useful. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE