-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1c15e17
Showing
23 changed files
with
1,466 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(mecanumrover_samples) | ||
|
||
## Compile as C++11, supported in ROS Kinetic and newer | ||
# add_compile_options(-std=c++11) | ||
|
||
## 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 | ||
geometry_msgs | ||
nav_msgs | ||
roscpp | ||
rospy | ||
sensor_msgs | ||
std_msgs | ||
tf | ||
tf2 | ||
#move_base | ||
) | ||
|
||
## System dependencies are found with CMake's conventions | ||
# find_package(Boost REQUIRED COMPONENTS system) | ||
|
||
|
||
## 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 tag for "message_generation" | ||
## * 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 dependency has been pulled in | ||
## but can be declared for certainty nonetheless: | ||
## * 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 | ||
# geometry_msgs# nav_msgs# sensor_msgs# std_msgs | ||
# ) | ||
|
||
################################################ | ||
## Declare ROS dynamic reconfigure parameters ## | ||
################################################ | ||
|
||
## 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" | ||
## * In this file (CMakeLists.txt): | ||
## * add "dynamic_reconfigure" to | ||
## find_package(catkin REQUIRED COMPONENTS ...) | ||
## * uncomment the "generate_dynamic_reconfigure_options" section below | ||
## and list every .cfg file to be processed | ||
|
||
## Generate dynamic reconfigure parameters in the 'cfg' folder | ||
# generate_dynamic_reconfigure_options( | ||
# cfg/DynReconf1.cfg | ||
# cfg/DynReconf2.cfg | ||
# ) | ||
|
||
################################### | ||
## 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 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 megarover_slam | ||
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy sensor_msgs std_msgs tf tf2 move_base | ||
# DEPENDS system_lib | ||
) | ||
|
||
########### | ||
## Build ## | ||
########### | ||
|
||
## Specify additional locations of header files | ||
## Your package locations should be listed before other locations | ||
include_directories( | ||
# include | ||
${catkin_INCLUDE_DIRS} | ||
) | ||
|
||
## Declare a C++ library | ||
# add_library(${PROJECT_NAME} | ||
# src/${PROJECT_NAME}/megarover_slam.cpp | ||
# ) | ||
|
||
## Add cmake target dependencies of the library | ||
## as an example, code may need to be generated before libraries | ||
## either from message generation or dynamic reconfigure | ||
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Declare a C++ executable | ||
## With catkin_make all packages are built within a single CMake context | ||
## The recommended prefix ensures that target names across packages don't collide | ||
add_executable(mecanum_pub_odom src/pub_odom.cpp) | ||
add_executable(mecanum_joycon src/joycon.cpp) | ||
|
||
## Rename C++ executable without prefix | ||
## The above recommended prefix causes long target names, the following renames the | ||
## target back to the shorter version for ease of user use | ||
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" | ||
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") | ||
|
||
## Add cmake target dependencies of the executable | ||
## same as for the library above | ||
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Specify libraries to link a library or executable target against | ||
target_link_libraries(mecanum_pub_odom | ||
${catkin_LIBRARIES} | ||
) | ||
target_link_libraries(mecanum_joycon | ||
${catkin_LIBRARIES} | ||
) | ||
|
||
set_target_properties(mecanum_pub_odom | ||
PROPERTIES OUTPUT_NAME pub_odom | ||
PREFIX "") | ||
|
||
set_target_properties(mecanum_joycon | ||
PROPERTIES OUTPUT_NAME joycon | ||
PREFIX "") | ||
|
||
############# | ||
## 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 ${PROJECT_NAME} ${PROJECT_NAME}_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(DIRECTORY | ||
launch | ||
configuration_files | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
) | ||
|
||
|
||
############# | ||
## Testing ## | ||
############# | ||
|
||
## Add gtest based cpp test target and link libraries | ||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_megarover_slam.cpp) | ||
# if(TARGET ${PROJECT_NAME}-test) | ||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) | ||
# endif() | ||
|
||
## Add folders to be run by python nosetests | ||
# catkin_add_nosetests(test) |
50 changes: 50 additions & 0 deletions
50
configuration_files/cartographer/megarover_2d_cartographer.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
-- Copyright 2016 The Cartographer Authors | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
|
||
include "map_builder.lua" | ||
include "trajectory_builder.lua" | ||
|
||
options = { | ||
map_builder = MAP_BUILDER, | ||
trajectory_builder = TRAJECTORY_BUILDER, | ||
map_frame = "map", | ||
tracking_frame = "base_link", | ||
published_frame = "base_link", | ||
odom_frame = "odom", | ||
provide_odom_frame = true, | ||
publish_frame_projected_to_2d = false, | ||
use_odometry = false, | ||
use_nav_sat = false, | ||
num_laser_scans = 1, | ||
num_multi_echo_laser_scans = 0, | ||
num_subdivisions_per_laser_scan = 10, | ||
num_point_clouds = 0, | ||
lookup_transform_timeout_sec = 0.2, | ||
submap_publish_period_sec = 0.3, | ||
pose_publish_period_sec = 5e-3, | ||
trajectory_publish_period_sec = 30e-3, | ||
rangefinder_sampling_ratio = 1., | ||
odometry_sampling_ratio = 1., | ||
fixed_frame_pose_sampling_ratio = 1., | ||
imu_sampling_ratio = 1., | ||
} | ||
|
||
MAP_BUILDER.use_trajectory_builder_2d = true | ||
TRAJECTORY_BUILDER_2D.use_imu_data = false | ||
TRAJECTORY_BUILDER_2D.num_accumulated_range_data = 10 | ||
|
||
-- TRAJECTORY_BUILDER_2D.laser_min_range = 0.02 | ||
-- TRAJECTORY_BUILDER_2D.laser_max_range = 5.6 | ||
|
||
return options |
45 changes: 45 additions & 0 deletions
45
configuration_files/cartographer/megarover_cartographer.urdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- | ||
Copyright 2016 The Cartographer Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<robot name="megarover"> | ||
<material name="orange"> | ||
<color rgba="1.0 0.5 0.2 1" /> | ||
</material> | ||
<material name="gray"> | ||
<color rgba="0.2 0.2 0.2 1" /> | ||
</material> | ||
|
||
|
||
<link name="horizontal_laser_link"> | ||
<visual> | ||
<origin xyz="0 0 0" /> | ||
<geometry> | ||
<cylinder length="0.05" radius="0.03" /> | ||
</geometry> | ||
<material name="gray" /> | ||
</visual> | ||
</link> | ||
|
||
<link name="base_link" /> | ||
|
||
|
||
<joint name="horizontal_laser_link_joint" type="fixed"> | ||
<parent link="base_link" /> | ||
<child link="horizontal_laser_link" /> | ||
<origin xyz="0.1 0 0.06" rpy="3.14159 0.0 0.0"/> | ||
</joint> | ||
|
||
</robot> |
21 changes: 21 additions & 0 deletions
21
configuration_files/mecanumrover_base_local_planner_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# base local planner params for MEGAROVER | ||
|
||
TrajectoryPlannerROS: | ||
max_vel_x: 0.3 | ||
min_vel_x: 0.05 | ||
max_vel_theta: 0.7 | ||
min_vel_theta: 0.08 | ||
min_in_place_vel_theta: 0.08 | ||
|
||
acc_lim_theta: 0.1 | ||
acc_lim_x: 0.04 | ||
acc_lim_y: 0.04 | ||
|
||
yaw_goal_tolerance: 0.2 | ||
xy_goal_tolerance: 0.2 | ||
|
||
holonomic_robot: false | ||
|
||
meter_scoring: true | ||
|
||
|
18 changes: 18 additions & 0 deletions
18
configuration_files/mecanumrover_costmap_common_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#costmap common params for MEGAROVER | ||
|
||
# これ以下の距離にある物体を障害物として扱う | ||
obstacle_range: 3.5 | ||
# これ以下の距離に物体が検出された場合、ロボットとその物体との間に障害物はないものとして扱う | ||
raytrace_range: 5.0 | ||
|
||
# ロボットの大きさに関するパラメータ | ||
footprint: [[0.2, -0.2], [0.2, 0.2], [-0.2, 0.2], [-0.2, -0.2]] | ||
inflation_radius: 0.6 | ||
|
||
# コストマップのタイプの設定 | ||
map_type: costmap | ||
|
||
# LRFの設定 | ||
observation_sources: scan | ||
scan: {sensor_frame: horizontal_laser_link, data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: -1.0, max_obstacle_height: 1.0} | ||
|
38 changes: 38 additions & 0 deletions
38
configuration_files/mecanumrover_dwa_local_planner_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# DWA Planner params for MEGAROVER | ||
# 各パラメータについては http://wiki.ros.org/dwa_local_planner?distro=kinetic を参照してください。 | ||
|
||
DWAPlannerROS: | ||
acc_lim_x: 0.2 | ||
acc_lim_y: 0.0 | ||
acc_lim_th: 0.1 | ||
max_trans_vel: 0.5 | ||
min_trans_vel: 0.1 | ||
max_vel_x: 0.5 | ||
min_vel_x: 0.1 | ||
max_vel_y: 0.0 | ||
min_vel_y: 0.0 | ||
max_rot_vel: 0.5 | ||
min_rot_vel: 0.1 | ||
|
||
yaw_goal_tolerance: 0.3 | ||
xy_goal_tolerance: 0.2 | ||
latch_xy_goal_tolerance: true | ||
|
||
sim_time: 4.0 | ||
sim_granularity: 0.025 | ||
vx_samples: 10 | ||
vtheta_samples: 20 | ||
|
||
path_distance_bias: 72.0 | ||
goal_distance_bias: 24.0 | ||
occdist_scale: 0.5 | ||
forward_point_distance: 0.2 | ||
scaling_speed: 0.25 | ||
max_scaling_factor: 0.2 | ||
|
||
oscillation_reset_dist: 0.05 | ||
|
||
publish_traj_pc: true | ||
publish_cost_grid_pc: true | ||
global_frame_id: odom | ||
|
Oops, something went wrong.