├── param
├── kp.json
├── greet.json
├── dummy.yaml
├── amcl_config.yaml
├── global_costmap_params.yaml
├── local_costmap_params.yaml
├── smoother.yaml
├── trajectory_local_planner_params.yaml
├── navfn_global_planner_params.yaml
├── global_planner_params.yaml
├── costmap_common_params.yaml
├── move_base_params.yaml
└── dwa_local_planner_params.yaml
├── debian
├── compat
├── source
│ ├── format
│ └── options
├── changelog
├── control
└── rules
├── map
├── compete.pgm
├── 807compete.pgm
├── compete.yaml
└── 807compete.yaml
├── launch
├── rviz_build_map.launch
├── rviz_input_keypoint.launch
├── include
│ ├── map_server.launch
│ ├── velocity_smoother.launch.xml
│ ├── move_base.launch.xml
│ └── amcl.launch.xml
├── input_keypoints.launch
├── navi_carto.launch
├── build_map_carto.launch
├── build_map.launch
└── demo.launch
├── src
├── test.cpp
├── auto_launch.cpp
├── autoCycle.cpp
├── greet_one.cpp
├── environment.cpp
├── pub_3d_model.cpp
└── auto_dock.cpp
├── README.md
├── include
└── auto_dock.h
├── script
├── input_keypoint.py
└── demo.py
├── package.xml
├── CMakeLists.txt
└── rviz
├── input_keypoints.rviz
├── build_map.rviz
└── xbot_input_goal.rviz
/param/kp.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/debian/compat:
--------------------------------------------------------------------------------
1 | 9
--------------------------------------------------------------------------------
/param/greet.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (native)
2 |
--------------------------------------------------------------------------------
/param/dummy.yaml:
--------------------------------------------------------------------------------
1 | #A dummy file loaded when no custom param file is given
2 |
--------------------------------------------------------------------------------
/map/compete.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DroidAITech/xbot_navi/HEAD/map/compete.pgm
--------------------------------------------------------------------------------
/map/807compete.pgm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DroidAITech/xbot_navi/HEAD/map/807compete.pgm
--------------------------------------------------------------------------------
/map/compete.yaml:
--------------------------------------------------------------------------------
1 | image: compete.pgm
2 | resolution: 0.050000
3 | origin: [-25.000000, -25.000000, 0.000000]
4 | negate: 0
5 | occupied_thresh: 0.65
6 | free_thresh: 0.196
7 |
8 |
--------------------------------------------------------------------------------
/map/807compete.yaml:
--------------------------------------------------------------------------------
1 | image: 807compete.pgm
2 | resolution: 0.050000
3 | origin: [-25.000000, -25.000000, 0.000000]
4 | negate: 0
5 | occupied_thresh: 0.65
6 | free_thresh: 0.196
7 |
8 |
--------------------------------------------------------------------------------
/launch/rviz_build_map.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/debian/changelog:
--------------------------------------------------------------------------------
1 | ros-kinetic-xbot-navi (0.0.1) stable; urgency=high
2 |
3 | * Autogenerated, no changelog for this version found in CHANGELOG.rst.
4 |
5 | -- lee Thu, 16 Aug 2018 08:08:11 -0000
6 |
7 |
8 |
--------------------------------------------------------------------------------
/launch/rviz_input_keypoint.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/debian/source/options:
--------------------------------------------------------------------------------
1 | # Automatically add upstream changes to the quilt overlay.
2 | # http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html
3 | # This supports reusing the orig.tar.gz for debian increments.
4 | auto-commit
5 |
6 |
--------------------------------------------------------------------------------
/launch/include/map_server.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/param/amcl_config.yaml:
--------------------------------------------------------------------------------
1 | scan_topic: scan
2 | use_map_topic: true
3 | initial_pose_x: 0.0
4 | initial_pose_y: 0.0
5 | initial_pose_a: 0
6 | pose:
7 | pose:
8 | position:
9 | x: -10.5727825165
10 | y: -3.69539213181
11 | z: 0.0
12 | orientation:
13 | x: 0.0
14 | y: 0.0
15 | z: 0.813573610538
16 | w: 0.581461933608
--------------------------------------------------------------------------------
/param/global_costmap_params.yaml:
--------------------------------------------------------------------------------
1 | global_costmap:
2 | global_frame: /map
3 | robot_base_frame: /base_footprint
4 | update_frequency: 5.0
5 | publish_frequency: 5.0
6 | static_map: true
7 | transform_tolerance: 0.5
8 | plugins:
9 | - {name: static_layer, type: "costmap_2d::StaticLayer"}
10 | - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
11 | - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
12 |
13 |
--------------------------------------------------------------------------------
/param/local_costmap_params.yaml:
--------------------------------------------------------------------------------
1 | local_costmap:
2 | global_frame: odom
3 | robot_base_frame: /base_footprint
4 | update_frequency: 5.0
5 | publish_frequency: 2.0
6 | static_map: false
7 | rolling_window: true
8 | width: 8.0
9 | height: 8.0
10 | resolution: 0.05
11 | transform_tolerance: 0.5
12 | plugins:
13 | - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
14 | - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
15 |
--------------------------------------------------------------------------------
/launch/input_keypoints.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/param/smoother.yaml:
--------------------------------------------------------------------------------
1 | # Default parameters used by the yocs_velocity_smoother module.
2 | # This isn't used by minimal.launch per se, rather by everything
3 | # which runs on top.
4 |
5 | # Mandatory parameters
6 | speed_lim_v: 0.8
7 | speed_lim_w: 5.4
8 |
9 | accel_lim_v: 1.0 # maximum is actually 2.0, but we push it down to be smooth
10 | accel_lim_w: 2.0
11 |
12 | # Optional parameters
13 | frequency: 20.0
14 | decel_factor: 1.5
15 |
16 | # Robot velocity feedback type:
17 | # 0 - none (default)
18 | # 1 - odometry
19 | # 2 - end robot commands
20 | robot_feedback: 1
21 |
--------------------------------------------------------------------------------
/launch/navi_carto.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/test.cpp:
--------------------------------------------------------------------------------
1 | #include "ros/ros.h"
2 | #include "std_msgs/String.h"
3 |
4 | int main(int argc, char **argv)
5 | {
6 | ros::init(argc, argv, "test");
7 | ros::NodeHandle nh;
8 |
9 | ros::Publisher chatter_pub = nh.advertise("chatter", 1000);
10 |
11 | ros::Rate loop_rate(10);
12 | // while (ros::ok())
13 | // {
14 | std_msgs::String msg;
15 | msg.data = "hello world";
16 |
17 | chatter_pub.publish(msg);
18 |
19 | ros::spinOnce();
20 |
21 | loop_rate.sleep();
22 | // }
23 |
24 | return 0;
25 | }
26 |
--------------------------------------------------------------------------------
/launch/build_map_carto.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/auto_launch.cpp:
--------------------------------------------------------------------------------
1 | #include "ros/ros.h"
2 | #include "std_msgs/UInt32.h"
3 |
4 | int main(int argc, char **argv)
5 | {
6 | ros::init(argc, argv, "auto_launch");
7 | ros::NodeHandle nh;
8 |
9 | ros::Publisher auto_launch_pub = nh.advertise("/office/next_loop", 1000);
10 |
11 | ros::Rate loop_rate(1);
12 | int wait_time = 255+60;
13 | while (wait_time >254)
14 | {
15 | std_msgs::UInt32 msg;
16 | msg.data = wait_time;
17 | auto_launch_pub.publish(msg);
18 | ros::spinOnce();
19 | wait_time--;
20 |
21 | loop_rate.sleep();
22 | }
23 |
24 | return 0;
25 | }
26 |
--------------------------------------------------------------------------------
/debian/control:
--------------------------------------------------------------------------------
1 | Source: ros-kinetic-xbot-navi
2 | Section: misc
3 | Priority: extra
4 | Maintainer: lee
5 | Build-Depends: debhelper (>= 9.0.0), ros-kinetic-catkin, ros-kinetic-roscpp, ros-kinetic-rospy, ros-kinetic-std-msgs, ros-kinetic-sensor-msgs, ros-kinetic-visualization-msgs, ros-kinetic-xbot-talker, ros-kinetic-xbot-face
6 | Homepage:
7 | Standards-Version: 3.9.2
8 |
9 | Package: ros-kinetic-xbot-navi
10 | Architecture: any
11 | Depends: ${shlibs:Depends}, ${misc:Depends}, ros-kinetic-catkin, ros-kinetic-roscpp, ros-kinetic-rospy, ros-kinetic-std-msgs, ros-kinetic-sensor-msgs, ros-kinetic-visualization-msgs, ros-kinetic-xbot-talker, ros-kinetic-xbot-face
12 | Description: The xbot_navi package
13 |
--------------------------------------------------------------------------------
/launch/include/velocity_smoother.launch.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/autoCycle.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include "ros/ros.h"
3 | #include "std_msgs/String.h"
4 |
5 | int main(int argc, char **argv)
6 | {
7 | ros::init(argc, argv, "auto_launch");
8 | ros::NodeHandle nh;
9 |
10 | ros::Publisher auto_cycle_pub = nh.advertise("/office/goal_name", 1000);
11 |
12 | ros::Rate loop_rate(1);
13 | int wait_time = 10;
14 | while (wait_time)
15 | {
16 | std_msgs::String msg;
17 | if(wait_time > 1)
18 | {
19 | msg.data = "nothing";
20 | }
21 | else{
22 | msg.data = "A";
23 | }
24 | auto_cycle_pub.publish(msg);
25 | wait_time--;
26 |
27 | loop_rate.sleep();
28 | }
29 |
30 | return 0;
31 | }
32 |
--------------------------------------------------------------------------------
/launch/build_map.launch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/param/trajectory_local_planner_params.yaml:
--------------------------------------------------------------------------------
1 | TrajectoryPlannerROS:
2 |
3 | # Robot Configuration Parameters - Kobuki
4 | max_vel_x: 0.3 # 0.55
5 | min_vel_x: 0.0
6 |
7 | max_vel_y: 0.0 # diff drive robot
8 | min_vel_y: 0.0 # diff drive robot
9 |
10 |
11 |
12 | # Warning!
13 | # do not set min_trans_vel to 0.0 otherwise dwa will always think translational velocities
14 | # are non-negligible and small in place rotational velocities will be created.
15 |
16 | max_vel_theta: 0.5 # choose slightly less than the base's capability
17 | min_vel_theta: -0.5 # this is the min angular velocity when there is negligible translational velocity
18 |
19 |
20 | acc_lim_x: 0.3 # maximum is theoretically 2.0, but we
21 | acc_lim_theta: 1.0
22 | acc_lim_y: 0.0 # diff drive robot
23 |
24 |
25 |
--------------------------------------------------------------------------------
/param/navfn_global_planner_params.yaml:
--------------------------------------------------------------------------------
1 |
2 | NavfnROS:
3 | visualize_potential: false #Publish potential for rviz as pointcloud2, not really helpful, default false
4 | allow_unknown: false #Specifies whether or not to allow navfn to create plans that traverse unknown space, default true
5 | #Needs to have track_unknown_space: true in the obstacle / voxel layer (in costmap_commons_param) to work
6 | planner_window_x: 0.0 #Specifies the x size of an optional window to restrict the planner to, default 0.0
7 | planner_window_y: 0.0 #Specifies the y size of an optional window to restrict the planner to, default 0.0
8 |
9 | default_tolerance: 0.0 #If the goal is in an obstacle, the planer will plan to the nearest point in the radius of default_tolerance, default 0.0
10 | #The area is always searched, so could be slow for big values
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # xbot_navi
2 |
3 | ## 简介
4 |
5 | xbot_navi是用于重德智能XBot-U科研教学平台机器人的**导航定位**ROS程序包。
6 |
7 | 该程序包具有建图、定位、导航、规划以及服务功能实现等多种功能。
8 |
9 |
10 |
11 | ## 使用方法
12 | ### 建立地图
13 |
14 | 在机器人上运行
15 |
16 | ```
17 | roslaunch xbot_navi build_map.launch
18 | ```
19 |
20 | 然后在作为ROS从机的PC上运行可视化程序:
21 |
22 | ```
23 | roslaunch xbot_navi rviz_build_map.launch
24 | ```
25 |
26 | 或者也可以选择使用google开源的cartographer来建图:
27 |
28 | ```
29 | roslaunch xbot_navi build_map_carto.launch
30 | ```
31 |
32 |
33 |
34 | ### SLAM导航程序
35 |
36 | 在机器人上运行
37 |
38 | ```
39 | roslaunch xbot_navi demo.launch
40 | ```
41 |
42 | 或者使用cartographer:
43 |
44 | ```
45 | roslaunch xbot_navi navi_carto.launch
46 | ```
47 |
48 |
49 |
50 | ### 服务功能实现
51 |
52 | 该服务功能将导航、人脸识别、语音对话集合成一个整体的服务。
53 |
54 | 用户需要修改配置文件param/kp.json和param/greet.json来管理关键点和人脸问候语。
55 |
56 | 运行可参考
57 |
58 | ```
59 | roslaunch xbot_navi demo.launch
60 | ```
61 |
62 |
63 |
64 | ## 参考链接
65 |
66 | - [ROSwiki xbot tutorials]()
67 | - [ROSwiki xbot_navi软件说明](http://wiki.ros.org/xbot_navi)
68 | - [重德智能](https://www.droid.ac.cn/)
69 | - [XBot-U机器人网站介绍](https://www.droid.ac.cn/xbot_u.html)
70 | - [中国大学慕课-机器人操作系统入门](https://www.icourse163.org/course/0802ISCAS001-1002580008)
71 |
72 | ## 联系我们
73 |
74 | **商务合作**:bd@droid.ac.cn
75 |
76 | **技术咨询**:wangpeng@droid.ac.cn或添加微信:18046501051(注明XBot-U咨询)
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/param/global_planner_params.yaml:
--------------------------------------------------------------------------------
1 |
2 | GlobalPlanner: # Also see: http://wiki.ros.org/global_planner
3 | old_navfn_behavior: false # Exactly mirror behavior of navfn, use defaults for other boolean parameters, default false
4 | use_quadratic: true # Use the quadratic approximation of the potential. Otherwise, use a simpler calculation, default true
5 | use_dijkstra: true # Use dijkstra's algorithm. Otherwise, A*, default true
6 | use_grid_path: false # Create a path that follows the grid boundaries. Otherwise, use a gradient descent method, default false
7 |
8 | visualize_potential: true
9 | allow_unknown: true # Allow planner to plan through unknown space, default true
10 | #Needs to have track_unknown_space: true in the obstacle / voxel layer (in costmap_commons_param) to work
11 | planner_window_x: 0.0 # default 0.0
12 | planner_window_y: 0.0 # default 0.0
13 | default_tolerance: 0.0 # If goal in obstacle, plan to the closest point in radius default_tolerance, default 0.0
14 |
15 | publish_scale: 100 # Scale by which the published potential gets multiplied, default 100
16 | planner_costmap_publish_frequency: 0.0 # default 0.0
17 |
18 | lethal_cost: 253 # default 253
19 | neutral_cost: 50 #50 # default 50
20 | cost_factor: 3.0 #3.0 # Factor to multiply each cost from costmap by, default 3.0
21 | publish_potential: true # Publish Potential Costmap (this is not like the navfn pointcloud2 potential), default true
22 |
--------------------------------------------------------------------------------
/include/auto_dock.h:
--------------------------------------------------------------------------------
1 | /*************************************************************************
2 | > File Name: auto_dock.h
3 | > Author:Rocwang
4 | > Mail: yowlings@gmail.com; Github:https://github.com/yowlings
5 | > Created Time: 2018年06月04日 星期一 14时41分20秒
6 | ************************************************************************/
7 |
8 | #ifndef _AUTO_DOCK_H
9 | #define _AUTO_DOCK_H
10 | #include "ros/ros.h"
11 | #include