Skip to content

Commit

Permalink
添加代码仓库对于 ROS Melodic / Ubuntu 18.04 的支持
Browse files Browse the repository at this point in the history
Merge pull request #52 from anchuanxu/melodic

Melodic
  • Loading branch information
lazyparser committed Jul 30, 2019
2 parents 1e74c3b + 8ad9234 commit 0a3b703
Show file tree
Hide file tree
Showing 405 changed files with 735,936 additions and 8,105 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| **robot_sim_demo** | 机器人仿真程序,大部分示例会用到这个软件包 |
| **topic_demo** | topic通信,自定义msg,包括C++和python两个版本实现 |
| **service_demo** | service通信,自定义srv,分别以C++和python两种语言实现 |
| **action_demo** | action通信,自定义action,C++和python两种语言实现 |
| **action_demo** | action通信,自定义action,C++语言实现 |
| **param_demo** | param操作,分别以C++和python两种语言实现 |
| **msgs_demo** | 演示msg、srv、action文件的格式规范 |
| **tf_demo** | tf相关API操作演示,tf示例包括C++和python两个版本 |
Expand All @@ -30,7 +30,10 @@
| **urdf_demo** | 创建机器人urdf模型,在RViz中显示 |
| **navigation_sim_demo** | 导航演示工具包,包括AMCL, Odometry Navigation等演示 |
| **slam_sim_demo** | 同步定位与建图演示,包括Gmapping, Karto, Hector等SLAM演示 |
| **robot_orbslam2_demo** | ORB_SLAM2的演示 |
| **orbslam2_demo** | ORB_SLAM2的演示 |
| **rtabmap_demo** | rtabmap的演示 |
| **cartographer_demo** | cartographer安装演示包|
| **dependlib** | ubuntu18所依赖的包(melodic不自带) |
| **ros_academy_for_beginners** | Metapacakge示例,依赖了本仓库所有的pacakge |


Expand All @@ -47,7 +50,7 @@ $ git clone https://github.com/DroidAITech/ROS-Academy-for-Beginners.git
2. 安装教学包所需的依赖
```sh
$ cd ~/catkin_ws
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y
```

3. 编译并刷新环境
Expand All @@ -65,6 +68,8 @@ $ source ~/catkin_ws/devel/setup.bash

2. 运行Gazebo仿真程序`robot_sim_demo`前,请将Gazebo升级到7.x版本以上(**推荐7.9版本**)。

3. 如果本地是**Ubuntu18.04**,那么建议升级gazebo版本到9.10.方法类似下步骤.修改对应版本号为gazebo9.

查看Gazebo版本方法
```sh
$ gazebo -v #确认7.0以上,推荐7.9
Expand Down
70 changes: 29 additions & 41 deletions action_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ project(action_demo)
find_package(catkin REQUIRED COMPONENTS
actionlib
actionlib_msgs
genmsg
geometry_msgs
message_generation
roscpp
rospy
std_msgs
)

## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system)
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
Expand All @@ -35,10 +36,10 @@ find_package(Boost REQUIRED COMPONENTS system)
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend tag for "message_generation"
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
## but can be declared for certainty nonetheless:
## * add a run_depend tag for "message_runtime"
## * add a exec_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 ...)
Expand All @@ -48,6 +49,18 @@ find_package(Boost REQUIRED COMPONENTS system)
## 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 ...)
add_action_files(
# FILES
# Action1.action
# Action2.action
DIRECTORY action
FILES Linewalk.action
)

## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES actionlib_msgs geometry_msgs std_msgs
)

## Generate messages in the 'msg' folder
# add_message_files(
Expand All @@ -64,18 +77,17 @@ find_package(Boost REQUIRED COMPONENTS system)
# )

## Generate actions in the 'action' folder
add_action_files(
DIRECTORY action FILES DoDishes.action
# add_action_files(
# FILES
# Action1.action
# Action2.action
)
# )

## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
actionlib_msgs
)
# generate_messages(
# DEPENDENCIES
# actionlib_msgs# geometry_msgs# std_msgs
# )

################################################
## Declare ROS dynamic reconfigure parameters ##
Expand All @@ -84,7 +96,7 @@ DIRECTORY action FILES DoDishes.action
## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
## * add a build_depend and a run_depend tag for "dynamic_reconfigure"
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
## * add "dynamic_reconfigure" to
## find_package(catkin REQUIRED COMPONENTS ...)
Expand All @@ -102,14 +114,14 @@ DIRECTORY action FILES DoDishes.action
###################################
## 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
## INCLUDE_DIRS: uncomment this if your 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 actionlib_demo
CATKIN_DEPENDS actionlib actionlib_msgs genmsg message_generation roscpp rospy std_msgs
# LIBRARIES action_test
CATKIN_DEPENDS actionlib_msgs
# DEPENDS system_lib
)

Expand All @@ -120,20 +132,8 @@ catkin_package(
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
# include
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
add_executable(dishes_Server src/dishes_Server.cpp)

target_link_libraries(
dishes_Server
${catkin_LIBRARIES}
)

add_dependencies(
dishes_Server
${action_demo_EXPORTED_TARGETS}
)

## Declare a C++ library
Expand Down Expand Up @@ -166,18 +166,6 @@ add_dependencies(
# ${catkin_LIBRARIES}
# )

add_executable(dishes_Client src/dishes_Client.cpp)

target_link_libraries(
dishes_Client
${catkin_LIBRARIES}
)

add_dependencies(
dishes_Client
${action_demo_EXPORTED_TARGETS}
)

#############
## Install ##
#############
Expand Down Expand Up @@ -218,7 +206,7 @@ add_dependencies(
#############

## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_actionlib_demo.cpp)
# catkin_add_gtest(${PROJECT_NAME}-test test/test_action_demo.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
Expand Down
13 changes: 13 additions & 0 deletions action_demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# action_demo

### introduce

本demo在课程仿真场景下,演示一个简单的action通讯.运行action之后,会看到xbot在场景中简单的"折返跑".同时,终端打印实时进度,反馈通信进程状态.

### run

1. 打开一个终端:`$ roslaunch robot_sim_demo robot_spawn.launch`

2. 打开一个新终端:`$ rosrun action_test linewalk_server.py`

3. 打开一个新终端 :`$ rosrun action_test linewalk_client.py`
8 changes: 0 additions & 8 deletions action_demo/action/DoDishes.action

This file was deleted.

8 changes: 8 additions & 0 deletions action_demo/action/Linewalk.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#goal definition
int32 order
---
#result definition
int32 finished
---
#feedback
float32 processing
47 changes: 30 additions & 17 deletions action_demo/package.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?xml version="1.0"?>
<package>
<package format="2">
<name>action_demo</name>
<version>0.0.0</version>
<description>The action_demo package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="anchuanxu@todo.todo">anchuanxu</maintainer>
<maintainer email="an@todo.todo">an</maintainer>


<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>BSD</license>
<license>TODO</license>


<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/actionlib_demo</url> -->
<!-- <url type="website">http://wiki.ros.org/action_demo</url> -->


<!-- Author tags are optional, multiple are allowed, one per tag -->
Expand All @@ -28,33 +28,46 @@
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->


<!-- The *_depend tags are used to specify dependencies -->
<!-- The *depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
<!-- <depend>roscpp</depend> -->
<!-- Note that this is equivalent to the following: -->
<!-- <build_depend>roscpp</build_depend> -->
<!-- <exec_depend>roscpp</exec_depend> -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use build_export_depend for packages you need in order to build against this package: -->
<!-- <build_export_depend>message_generation</build_export_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use run_depend for packages you need at runtime: -->
<!-- <run_depend>message_runtime</run_depend> -->
<!-- Use exec_depend for packages you need at runtime: -->
<!-- <exec_depend>message_runtime</exec_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>genmsg</buildtool_depend>
<build_depend>actionlib</build_depend>
<build_depend>actionlib_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
 <build_depend>genmsg</build_depend>
 <build_depend>std_msgs</build_depend>
<run_depend>actionlib</run_depend>
<run_depend>actionlib_msgs</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>genmsg</run_depend>
 <run_depend>message_generation</run_depend>
<run_depend>std_msgs</run_depend>
<build_depend>std_msgs</build_depend>
<build_export_depend>actionlib</build_export_depend>
<build_export_depend>actionlib_msgs</build_export_depend>
<build_export_depend>geometry_msgs</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<exec_depend>actionlib</exec_depend>
<exec_depend>actionlib_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>


<!-- The export tag contains other, unspecified, tags -->
Expand Down
19 changes: 0 additions & 19 deletions action_demo/src/dishes_Client.cpp

This file was deleted.

18 changes: 0 additions & 18 deletions action_demo/src/dishes_Client.py

This file was deleted.

20 changes: 0 additions & 20 deletions action_demo/src/dishes_Server.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions action_demo/src/dishes_Server.py

This file was deleted.

Loading

0 comments on commit 0a3b703

Please sign in to comment.