diff --git a/README.md b/README.md index 524ac3c..0602def 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,29 @@ # Learning ROS for Robotics Programming - Second Edition # -**Learning ROS for Robotics Programming - Second Edition** book tutorials source code. +[**Learning ROS for Robotics Programming - Second Edition**](https://www.packtpub.com/hardware-and-creative/learning-ros-robotics-programming-%E2%80%93-second-edition) book tutorials source code. + + ## Authors ## -* Aaron Martínez -* Anil Mahtani -* Enrique Fernández -* Luiz Sánchez +* [Enrique Fernández](https://github.com/efernandez) +* [Luis Sánchez Crespo](https://github.com/LuisSC) +* [Anil Mahtani](https://github.com/Anilm3) +* [Aaron Martínez](https://github.com/AaronMR) ## Installation ## -Install **ROS Hydro** on a compatible **Ubuntu** distro following the official instructions provided [here](http://wiki.ros.org/hydro/Installation/Ubuntu). -Note that **ROS Indigo** might also work for most of the source code. +Install **ROS Jade** on a compatible **Ubuntu** distro following the official instructions provided [here](http://wiki.ros.org/hydro/Installation/Ubuntu). + +For **ROS Hydro** use the [**hydro-devel**](https://github.com/AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition/tree/hydro-devel) branch. + +For **ROS Indigo** use the [**indigo-devel**](https://github.com/AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition/tree/indigo-devel) branch. + +Install the OpenCV non-free repository: +``` bash +sudo add-apt-repository --yes ppa:xqms/opencv-nonfree +sudo apt-get install libopencv-nonfree-dev libopencv-nonfree2.4 +``` Create a workspace: ``` bash @@ -23,7 +34,7 @@ wstool init Download this repository: ``` bash -wstool set ROS_Book_Hydro --git git@github.com:AaronMR/ROS_Book_Hydro.git +wstool set ros_book --git git@github.com:AaronMR/Learning_ROS_for_Robotics_Programming_2nd_edition.git wstool up -j8 ``` @@ -33,17 +44,16 @@ cd .. rosdep install --from-paths src -iy ``` -source /opt/ros/$(rosversion -d)/setup.bash - Build the source code (alternatively, you can use `catkin build` instead of `catkin_make`): ``` bash +source /opt/ros/$(rosversion -d)/setup.bash catkin_make -j4 source devel/setup.bash ``` ## Tutorials ## -* **Chapter 1:** Getting started with ROS Hydro (no source code as it covers the installation) +* **Chapter 1:** Getting started with ROS (no source code as it covers the installation) * **Chapter 2:** ROS Architecture and Concepts * **Chapter 3:** Visualization and Debug Tools * **Chapter 4:** Using Sensors and Actuators with ROS diff --git a/chapter5_tutorials/package.xml b/chapter5_tutorials/package.xml index 8c71442..5880709 100644 --- a/chapter5_tutorials/package.xml +++ b/chapter5_tutorials/package.xml @@ -21,6 +21,8 @@ camera_info_manager tf + libopencv-dev + roscpp message_runtime sensor_msgs @@ -31,4 +33,6 @@ image_transport camera_info_manager tf + + libopencv-dev diff --git a/chapter9_tutorials/CMakeLists.txt b/chapter9_tutorials/CMakeLists.txt index c37b487..fc829c4 100644 --- a/chapter9_tutorials/CMakeLists.txt +++ b/chapter9_tutorials/CMakeLists.txt @@ -1,166 +1,29 @@ cmake_minimum_required(VERSION 2.8.3) project(chapter9_tutorials) -## Find catkin macros and libraries -## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) -## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - rospy + move_base_msgs + actionlib tf ) -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) +catkin_package() - -## Uncomment this if the package has a setup.py. This macro ensures -## modules and global scripts declared therein get installed -## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html -# catkin_python_setup() - -################################################ -## Declare ROS messages, services and actions ## -################################################ - -## To declare and build messages, services or actions from within this -## package, follow these steps: -## * Let MSG_DEP_SET be the set of packages whose message types you use in -## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). -## * In the file package.xml: -## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET -## * If MSG_DEP_SET isn't empty the following dependencies might have been -## pulled in transitively but can be declared for certainty nonetheless: -## * add a build_depend tag for "message_generation" -## * add a run_depend tag for "message_runtime" -## * In this file (CMakeLists.txt): -## * add "message_generation" and every package in MSG_DEP_SET to -## find_package(catkin REQUIRED COMPONENTS ...) -## * add "message_runtime" and every package in MSG_DEP_SET to -## catkin_package(CATKIN_DEPENDS ...) -## * uncomment the add_*_files sections below as needed -## and list every .msg/.srv/.action file to be processed -## * uncomment the generate_messages entry below -## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate actions in the 'action' folder -# add_action_files( -# FILES -# Action1.action -# Action2.action -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs # Or other packages containing msgs -# ) - -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## INCLUDE_DIRS: uncomment this if you package contains header files -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need -catkin_package( -# INCLUDE_DIRS include -# LIBRARIES chapter9_tutorials -# CATKIN_DEPENDS roscpp rospy -# DEPENDS system_lib -) - -########### -## Build ## -########### - -## Specify additional locations of header files -## Your package locations should be listed before other locations -# include_directories(include) include_directories( ${catkin_INCLUDE_DIRS} ) -## Declare a cpp library -# add_library(chapter9_tutorials -# src/${PROJECT_NAME}/chapter9_tutorials.cpp -# ) - -## Declare a cpp executable -# add_executable(chapter9_tutorials_node src/chapter9_tutorials_node.cpp) add_executable(sendGoals src/sendGoals.cpp) - -## Add cmake target dependencies of the executable/library -## as an example, message headers may need to be generated before nodes -# add_dependencies(chapter9_tutorials_node chapter9_tutorials_generate_messages_cpp) - -## Specify libraries to link a library or executable target against -# target_link_libraries(chapter9_tutorials_node -# ${catkin_LIBRARIES} -# ) - target_link_libraries(sendGoals ${catkin_LIBRARIES}) -############# -## Install ## -############# - -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html - -## Mark executable scripts (Python etc.) for installation -## in contrast to setup.py, you can choose the destination -# install(PROGRAMS -# scripts/my_python_script -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark executables and/or libraries for installation -# install(TARGETS chapter9_tutorials chapter9_tutorials_node -# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark cpp header files for installation -# install(DIRECTORY include/${PROJECT_NAME}/ -# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -# FILES_MATCHING PATTERN "*.h" -# PATTERN ".svn" EXCLUDE -# ) - -## Mark other files for installation (e.g. launch and bag files, etc.) -# install(FILES -# # myfile1 -# # myfile2 -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -# ) - -############# -## Testing ## -############# - -## Add gtest based cpp test target and link libraries -# catkin_add_gtest(${PROJECT_NAME}-test test/test_chapter9_tutorials.cpp) -# if(TARGET ${PROJECT_NAME}-test) -# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) -# endif() +install(TARGETS sendGoals + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) -## Add folders to be run by python nosetests -# catkin_add_nosetests(test) +foreach(dir launch maps) + install(DIRECTORY ${dir}/ + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir}) +endforeach(dir) diff --git a/chapter9_tutorials/launch/chapter9_configuration_gazebo.launch b/chapter9_tutorials/launch/chapter9_configuration_gazebo.launch index 9d2065b..1ef5f0e 100644 --- a/chapter9_tutorials/launch/chapter9_configuration_gazebo.launch +++ b/chapter9_tutorials/launch/chapter9_configuration_gazebo.launch @@ -1,23 +1,33 @@ + - + + - - - - + - - + + + + + + + + + + - - - + - + + - + + diff --git a/chapter9_tutorials/package.xml b/chapter9_tutorials/package.xml index 66fab11..cd8a0b2 100644 --- a/chapter9_tutorials/package.xml +++ b/chapter9_tutorials/package.xml @@ -4,54 +4,29 @@ 0.0.0 The chapter9_tutorials package - - - - retrorov-laptop + Enrique Fernandez + Enrique Fernandez + BSD - - - - TODO - - - - - - - - - - - - - - - - - - - - - - - - - catkin - roscpp - rospy - roscpp - rospy - - - - - - - + roscpp + move_base_msgs + actionlib + tf - - \ No newline at end of file + roscpp + move_base_msgs + actionlib + tf + amcl + gazebo_ros + xacro + move_base + map_server + joint_state_publisher + robot_state_publisher + rviz + robot1_description +