first commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
/.catkin_tools
|
||||
/.catkin_workspace
|
||||
/.vscode
|
||||
/build
|
||||
/devel
|
||||
@@ -0,0 +1,17 @@
|
||||
MAPPING:
|
||||
source devel/setup.bash && roslaunch p3dx_slam p3dx_slam.launch
|
||||
source devel/setup.bash && roslaunch robot robot.launch
|
||||
rosrun map_server map_saver -f ~/arena
|
||||
|
||||
|
||||
WAYPOINTS:
|
||||
source devel/setup.bash && roslaunch p3dx_navigation p3dx_navigation.launch map_file:=$HOME/arena.yaml
|
||||
source devel/setup.bash && roslaunch robot robot.launch
|
||||
source devel/setup.bash && rosrun waypoints waypoints_server
|
||||
|
||||
|
||||
OBJECT DETECTION:
|
||||
# ASTRA RIGT PORT | HOKUYO + SILVER LEFT PORT
|
||||
# password: OKojs34df+aS
|
||||
source devel/setup.bash && ROS_MASTER_URI=http://10.8.0.18:11311 && roslaunch darknet_ros darknet_ros.launch
|
||||
source devel/setup.bash && roslaunch object_detection object_detection
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/opt/ros/noetic/share/catkin/cmake/toplevel.cmake
|
||||
@@ -0,0 +1,189 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(estop)
|
||||
|
||||
## 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
|
||||
std_msgs
|
||||
std_srvs
|
||||
)
|
||||
|
||||
## 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
|
||||
# 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 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 random_walk
|
||||
CATKIN_DEPENDS roscpp std_msgs std_srvs
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
# include_directories(include)
|
||||
include_directories(
|
||||
include ${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
## Declare a C++ library
|
||||
# add_library(random_walk
|
||||
# src/${PROJECT_NAME}/random_walk.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(random_walk ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Declare a C++ executable
|
||||
add_executable(estop src/emergency_stop.cpp)
|
||||
|
||||
## Add cmake target dependencies of the executable
|
||||
## same as for the library above
|
||||
# add_dependencies(random_walk_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(random_walk_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
target_link_libraries(estop ${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 random_walk random_walk_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
|
||||
# rndw_tsbot_lrf.launch
|
||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
#)
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_random_walk.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)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
|
||||
<!--- run robot's driver and Hokuyo node -->
|
||||
<include file="$(find tsbot_drivers)/launch/sbot_lrf.launch"/>
|
||||
|
||||
<!--- run random_walk node -->
|
||||
<include file="$(find random_walk)/launch/rndw_tsbot_lrf.launch"/>
|
||||
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
|
||||
<!--- run robot's driver and Hokuyo node -->
|
||||
<include file="$(find tsbot_drivers)/launch/sbot.launch"/>
|
||||
|
||||
<!--- run random_walk node -->
|
||||
<include file="$(find random_walk)/launch/rndw_tsbot_sonars.launch"/>
|
||||
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
|
||||
<!--- run robot's driver and Hokuyo node -->
|
||||
<include file="$(find tsbot_drivers)/launch/tbot_lrf.launch"/>
|
||||
|
||||
<!--- run random_walk node -->
|
||||
<include file="$(find random_walk)/launch/rndw_tsbot_lrf.launch"/>
|
||||
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
|
||||
<!--- run robot's driver and Hokuyo node -->
|
||||
<include file="$(find tsbot_drivers)/launch/tbot.launch"/>
|
||||
|
||||
<!--- run random_walk node -->
|
||||
<include file="$(find random_walk)/launch/rndw_tsbot_sonars.launch"/>
|
||||
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<node pkg="random_walk" type="random_walk" name="random_walk" output="screen">
|
||||
<param name="max_linear_speed" value="0.15" />
|
||||
<param name="max_angular_speed" value="1.25" />
|
||||
<param name="safe_dist_th" value="0.75" />
|
||||
<param name="detour_obst_th" value="0.60" />
|
||||
<param name="stop_dist_th" value="0.40" />
|
||||
<param name="diff_th" value="0.1" />
|
||||
<param name="verbose" value="1" />
|
||||
<param name="useLRF" value="1" />
|
||||
</node>
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<node pkg="random_walk" type="random_walk" name="random_walk" output="screen">
|
||||
<param name="max_linear_speed" value="0.15" />
|
||||
<param name="max_angular_speed" value="1.25" />
|
||||
<param name="safe_dist_th" value="0.75" />
|
||||
<param name="detour_obst_th" value="0.60" />
|
||||
<param name="stop_dist_th" value="0.40" />
|
||||
<param name="diff_th" value="0.1" />
|
||||
<param name="verbose" value="1" />
|
||||
<param name="useLRF" value="0" />
|
||||
</node>
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>estop</name>
|
||||
<version>2.0.0</version>
|
||||
<description>
|
||||
This package contains a node that allows to stop the robot's motors in an emergency by hitting any key. It also allows to enable the robot's motion by hitting the key 'G'.
|
||||
The node finishes cleanly by hitting upper case 'Q' (not 'q').
|
||||
</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<maintainer email="rprocha@isr.uc.pt">Rui P. Rocha</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>LGPLv3</license>
|
||||
|
||||
<!-- Url tags are optional, but mutiple are allowed, one per tag -->
|
||||
<!-- Optional attribute type can be: website, bugtracker, or repository -->
|
||||
<!-- Example: -->
|
||||
<!-- <url type="website">http://wiki.ros.org/random_walk</url> -->
|
||||
|
||||
<!-- Author tags are optional, mutiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintianers, but could be -->
|
||||
<!-- Example: -->
|
||||
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
|
||||
<author>Rui P. Rocha</author>
|
||||
|
||||
<!-- The *_depend tags are used to specify dependencies -->
|
||||
<!-- Dependencies can be catkin packages or system dependencies -->
|
||||
<!-- Examples: -->
|
||||
<!-- Use build_depend for packages you need at compile time: -->
|
||||
<!-- <build_depend>message_generation</build_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 test_depend for packages you need only for testing: -->
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<depend>roscpp</depend>
|
||||
<depend>std_msgs</depend>
|
||||
<depend>std_srvs</depend>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<!-- Other tools can request additional information be placed here -->
|
||||
|
||||
</export>
|
||||
|
||||
</package>
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
#include <ros/ros.h>
|
||||
#include <std_msgs/Bool.h>
|
||||
#include <std_srvs/Empty.h>
|
||||
#include <stdio.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
bool state = true; // current robot's motors state (default is true)
|
||||
|
||||
void stateChanged(const std_msgs::Bool::ConstPtr& pt){
|
||||
state = pt->data;
|
||||
if (state) ROS_INFO("[estop] robot's motors have been ENABLED");
|
||||
else ROS_INFO("[estop] robot's motors have been DISABLED");
|
||||
}
|
||||
|
||||
static struct termios olds, news;
|
||||
|
||||
/* Initialize new terminal i/o settings */
|
||||
void initTermios(int echo)
|
||||
{
|
||||
tcgetattr(0, &olds); /* grab old terminal i/o settings */
|
||||
news = olds; /* make new settings same as old settings */
|
||||
news.c_lflag &= ~ICANON; /* disable buffered i/o */
|
||||
news.c_lflag &= echo ? ECHO : ~ECHO; /* set echo mode */
|
||||
tcsetattr(0, TCSANOW, &news); /* use these new terminal i/o settings now */
|
||||
}
|
||||
|
||||
/* Restore old terminal i/o settings */
|
||||
void resetTermios(void)
|
||||
{
|
||||
tcsetattr(0, TCSANOW, &olds);
|
||||
}
|
||||
|
||||
/* Read 1 character - echo defines echo mode */
|
||||
char getch_(int echo)
|
||||
{
|
||||
char ch;
|
||||
initTermios(echo);
|
||||
ch = getchar();
|
||||
resetTermios();
|
||||
return ch;
|
||||
}
|
||||
|
||||
/* Read 1 character without echo */
|
||||
char getch(void)
|
||||
{
|
||||
return getch_(0);
|
||||
}
|
||||
|
||||
/* Read 1 character with echo */
|
||||
char getche(void)
|
||||
{
|
||||
return getch_(1);
|
||||
}
|
||||
|
||||
bool kbhit(void)
|
||||
{
|
||||
struct termios oldt, newt;
|
||||
int ch;
|
||||
int oldf;
|
||||
|
||||
tcgetattr(STDIN_FILENO, &oldt);
|
||||
newt = oldt;
|
||||
newt.c_lflag &= ~(ICANON | ECHO);
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &newt);
|
||||
oldf = fcntl(STDIN_FILENO, F_GETFL, 0);
|
||||
fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK);
|
||||
|
||||
ch = getchar();
|
||||
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &oldt);
|
||||
fcntl(STDIN_FILENO, F_SETFL, oldf);
|
||||
|
||||
if(ch != EOF)
|
||||
{
|
||||
ungetc(ch, stdin);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv){
|
||||
|
||||
ros::init(argc, argv, "estop");
|
||||
ros::NodeHandle n;
|
||||
ros::NodeHandle pn("~");
|
||||
ros::Rate rate(50.0);
|
||||
char c;
|
||||
bool r;
|
||||
|
||||
// ROS subscriber
|
||||
ros::Subscriber motors_st_sub;
|
||||
motors_st_sub = n.subscribe<std_msgs::Bool>("/motors_state", 50, stateChanged);
|
||||
|
||||
// ROS clients
|
||||
ros::ServiceClient clEnable = n.serviceClient<std_srvs::Empty>("enable_motors");
|
||||
ros::ServiceClient clDisable = n.serviceClient<std_srvs::Empty>("disable_motors");
|
||||
std_srvs::Empty req;
|
||||
|
||||
// node's main loop
|
||||
while (n.ok() && c != 'Q') {
|
||||
if (kbhit()) {
|
||||
c = getch();
|
||||
ROS_INFO("[estop] The key \'%c\' has been hitted", c);
|
||||
if (state) {
|
||||
ROS_INFO("[estop] Call service disable_motors");
|
||||
r = clDisable.call(req);
|
||||
if (!r) ROS_WARN("[estop] Service returned an error");
|
||||
}
|
||||
else if (c == 'g' || c == 'G') {
|
||||
ROS_INFO("[estop] Call service enable_motors");
|
||||
r = clEnable.call(req);
|
||||
if (!r) ROS_WARN("[estop] Service returned an error");
|
||||
}
|
||||
|
||||
if (c == 'Q') ROS_INFO("[estop] Exit key (\'Q\') has been hitted!");
|
||||
}
|
||||
|
||||
ros::spinOnce(); // trigger callbacks once
|
||||
rate.sleep(); // sleep some time to attain desired processing rate
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package laser_proc
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
0.1.6 (2020-04-24)
|
||||
------------------
|
||||
* Update required cmake version
|
||||
* Contributors: Jon Binney
|
||||
|
||||
0.1.5 (2018-08-09)
|
||||
------------------
|
||||
* update to use non deprecated pluginlib macro
|
||||
* Contributors: Jonathan Binney, Mikael Arguedas
|
||||
|
||||
0.1.4 (2014-03-30)
|
||||
------------------
|
||||
* Install fix for Android.
|
||||
* Contributors: Chad Rockey
|
||||
|
||||
0.1.3 (2013-08-21)
|
||||
------------------
|
||||
* No more Willow Garage email.
|
||||
* Contributors: Chad Rockey
|
||||
|
||||
0.1.2 (2013-03-14)
|
||||
------------------
|
||||
* Uncaught except when subscribing to most_intense on non-intensity scans.
|
||||
* Updated function to be const.
|
||||
* Contributors: chadrockey
|
||||
|
||||
0.1.1 (2013-03-08)
|
||||
------------------
|
||||
* Merge pull request `#1 <https://github.com/ros-perception/laser_proc/issues/1>`_ from ros-perception/fix_pluginlib_depend
|
||||
Add missing dependency on pluginlib
|
||||
* Add missing dependency on pluginlib
|
||||
* Contributors: Chad Rockey, William Woodall
|
||||
|
||||
0.1.0 (2013-03-04)
|
||||
------------------
|
||||
* Minor fixes.
|
||||
* Added ROS nodelet/node.
|
||||
* Adjusted advertiseLaser to be more standard. Fixed seg fault with first and laser publishers.
|
||||
* Preparing to test with urg_node
|
||||
* Initial commit
|
||||
* Contributors: Chad Rockey, chadrockey
|
||||
@@ -0,0 +1,88 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(laser_proc)
|
||||
|
||||
## 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 sensor_msgs rosconsole nodelet pluginlib)
|
||||
|
||||
###################################################
|
||||
## Declare things to be passed to other projects ##
|
||||
###################################################
|
||||
|
||||
## 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 laser_proc_library laser_publisher laser_transport laser_proc_ROS LaserProcNodelet
|
||||
CATKIN_DEPENDS roscpp sensor_msgs rosconsole nodelet
|
||||
DEPENDS
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
include_directories(include ${catkin_INCLUDE_DIRS})
|
||||
|
||||
## Library that does actual conversion
|
||||
add_library(laser_proc_library src/LaserProc.cpp)
|
||||
target_link_libraries(laser_proc_library ${catkin_LIBRARIES})
|
||||
|
||||
## Publisher library
|
||||
add_library(laser_publisher src/LaserPublisher.cpp)
|
||||
target_link_libraries(laser_publisher laser_proc_library ${catkin_LIBRARIES})
|
||||
|
||||
## Factory for making LaserPublishers
|
||||
add_library(laser_transport src/LaserTransport.cpp)
|
||||
target_link_libraries(laser_transport laser_publisher ${catkin_LIBRARIES})
|
||||
|
||||
## ROS Library
|
||||
add_library(laser_proc_ROS src/LaserProcROS.cpp)
|
||||
target_link_libraries(laser_proc_ROS laser_transport ${catkin_LIBRARIES})
|
||||
|
||||
## Nodelet wrapper
|
||||
add_library(LaserProcNodelet src/LaserProcNodelet.cpp)
|
||||
target_link_libraries(LaserProcNodelet laser_proc_ROS ${catkin_LIBRARIES})
|
||||
|
||||
## Node wrapper
|
||||
add_executable(laser_proc src/laser_proc.cpp)
|
||||
target_link_libraries(laser_proc laser_proc_ROS ${catkin_LIBRARIES})
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
## Mark executables and/or libraries for installation
|
||||
install(TARGETS laser_proc_library laser_publisher laser_transport laser_proc_ROS LaserProcNodelet laser_proc
|
||||
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 nodelets.xml
|
||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
)
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test.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)
|
||||
@@ -0,0 +1,4 @@
|
||||
laser_proc
|
||||
==========
|
||||
|
||||
Converts representations of sensor_msgs/LaserScan and sensor_msgs/MultiEchoLaserScan
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#ifndef LASER_PROC_H
|
||||
#define LASER_PROC_H
|
||||
|
||||
#include <sensor_msgs/LaserScan.h>
|
||||
#include <sensor_msgs/MultiEchoLaserScan.h>
|
||||
#include <sensor_msgs/LaserEcho.h>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <limits.h>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
namespace laser_proc
|
||||
{
|
||||
class LaserProc
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
static sensor_msgs::LaserScanPtr getFirstScan(const sensor_msgs::MultiEchoLaserScan& msg);
|
||||
|
||||
static sensor_msgs::LaserScanPtr getLastScan(const sensor_msgs::MultiEchoLaserScan& msg);
|
||||
|
||||
static sensor_msgs::LaserScanPtr getMostIntenseScan(const sensor_msgs::MultiEchoLaserScan& msg);
|
||||
|
||||
private:
|
||||
|
||||
static void fillLaserScan(const sensor_msgs::MultiEchoLaserScan& msg, sensor_msgs::LaserScan& out);
|
||||
|
||||
static size_t getFirstValue(const sensor_msgs::LaserEcho& ranges, float& range);
|
||||
|
||||
static size_t getLastValue(const sensor_msgs::LaserEcho& ranges, float& range);
|
||||
|
||||
static void getMostIntenseValue(const sensor_msgs::LaserEcho& ranges, const sensor_msgs::LaserEcho& intensities, float& range, float& intensity);
|
||||
|
||||
};
|
||||
|
||||
|
||||
}; // laser_proc
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#ifndef LASER_PROC_ROS_H
|
||||
#define LASER_PROC_ROS_H
|
||||
|
||||
#include <ros/ros.h>
|
||||
#include <laser_proc/LaserTransport.h>
|
||||
#include <sensor_msgs/LaserScan.h>
|
||||
#include <sensor_msgs/MultiEchoLaserScan.h>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
|
||||
namespace laser_proc
|
||||
{
|
||||
class LaserProcROS
|
||||
{
|
||||
public:
|
||||
LaserProcROS(ros::NodeHandle& n, ros::NodeHandle& pnh);
|
||||
|
||||
~LaserProcROS();
|
||||
|
||||
private:
|
||||
|
||||
void scanCb(const sensor_msgs::MultiEchoLaserScanConstPtr& msg) const;
|
||||
|
||||
/**
|
||||
* Callback that is called when there is a new subscriber.
|
||||
*
|
||||
* Will not subscribe until we have a subscriber for our LaserScans (lazy subscribing).
|
||||
*
|
||||
*/
|
||||
void connectCb(const ros::SingleSubscriberPublisher& pub);
|
||||
|
||||
/**
|
||||
* Callback called when a subscriber unsubscribes.
|
||||
*
|
||||
* If all current subscribers of our LaserScans stop listening, stop subscribing (lazy subscribing).
|
||||
*
|
||||
*/
|
||||
void disconnectCb(const ros::SingleSubscriberPublisher& pub);
|
||||
|
||||
ros::NodeHandle nh_; ///< Nodehandle used to subscribe in the connectCb.
|
||||
laser_proc::LaserPublisher pub_; ///< Publisher
|
||||
ros::Subscriber sub_; ///< Multi echo subscriber
|
||||
|
||||
boost::mutex connect_mutex_; ///< Prevents the connectCb and disconnectCb from being called until everything is initialized.
|
||||
};
|
||||
|
||||
|
||||
}; // depthimage_to_laserscan
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#ifndef IMAGE_PROC_LASER_PUBLISHER_H
|
||||
#define IMAGE_PROC_LASER_PUBLISHER_H
|
||||
|
||||
#include <ros/ros.h>
|
||||
|
||||
#include <sensor_msgs/LaserScan.h>
|
||||
#include <sensor_msgs/MultiEchoLaserScan.h>
|
||||
#include <sensor_msgs/LaserEcho.h>
|
||||
|
||||
#include <laser_proc/LaserProc.h>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <limits.h>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
|
||||
namespace laser_proc
|
||||
{
|
||||
|
||||
class LaserTransport;
|
||||
|
||||
class LaserPublisher
|
||||
{
|
||||
public:
|
||||
LaserPublisher() {}
|
||||
|
||||
/*!
|
||||
* \brief Returns the number of subscribers that are currently connected to
|
||||
* this LaserPublisher.
|
||||
*
|
||||
* Returns sum of all child publishers.
|
||||
*/
|
||||
uint32_t getNumSubscribers() const;
|
||||
|
||||
/*!
|
||||
* \brief Returns the topics of this LaserPublisher.
|
||||
*/
|
||||
std::vector<std::string> getTopics() const;
|
||||
|
||||
/*!
|
||||
* \brief Publish a MultiEchoLaserScan on the topics associated with this LaserPublisher.
|
||||
*/
|
||||
void publish(const sensor_msgs::MultiEchoLaserScan& msg) const;
|
||||
|
||||
/*!
|
||||
* \brief Publish a MultiEchoLaserScan on the topics associated with this LaserPublisher.
|
||||
*/
|
||||
void publish(const sensor_msgs::MultiEchoLaserScanConstPtr& msg) const;
|
||||
|
||||
/*!
|
||||
* \brief Shutdown the advertisements associated with this Publisher.
|
||||
*/
|
||||
void shutdown();
|
||||
|
||||
operator void*() const;
|
||||
bool operator< (const LaserPublisher& rhs) const { return impl_ < rhs.impl_; }
|
||||
bool operator!=(const LaserPublisher& rhs) const { return impl_ != rhs.impl_; }
|
||||
bool operator==(const LaserPublisher& rhs) const { return impl_ == rhs.impl_; }
|
||||
|
||||
private:
|
||||
LaserPublisher(ros::NodeHandle& nh, uint32_t queue_size,
|
||||
const ros::SubscriberStatusCallback& connect_cb,
|
||||
const ros::SubscriberStatusCallback& disconnect_cb,
|
||||
const ros::VoidPtr& tracked_object, bool latch, bool publish_echoes = true);
|
||||
|
||||
struct Impl;
|
||||
typedef boost::shared_ptr<Impl> ImplPtr;
|
||||
typedef boost::weak_ptr<Impl> ImplWPtr;
|
||||
|
||||
ImplPtr impl_;
|
||||
|
||||
friend class LaserTransport;
|
||||
};
|
||||
|
||||
}; // laser_proc
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#ifndef IMAGE_PROC_LASER_TRANSPORT_H
|
||||
#define IMAGE_PROC_LASER_TRANSPORT_H
|
||||
|
||||
#include <ros/ros.h>
|
||||
|
||||
#include <laser_proc/LaserPublisher.h>
|
||||
|
||||
namespace laser_proc
|
||||
{
|
||||
class LaserTransport
|
||||
{
|
||||
public:
|
||||
static LaserPublisher advertiseLaser(ros::NodeHandle& nh, uint32_t queue_size, bool latch=false);
|
||||
|
||||
static LaserPublisher advertiseLaser(ros::NodeHandle& nh, uint32_t queue_size,
|
||||
const ros::SubscriberStatusCallback& connect_cb,
|
||||
const ros::SubscriberStatusCallback& disconnect_cb=ros::SubscriberStatusCallback(),
|
||||
const ros::VoidPtr& tracked_object=ros::VoidPtr(), bool latch=false, bool publish_echoes=true);
|
||||
|
||||
};
|
||||
|
||||
}; // laser_proc
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
<library path="lib/libLaserProcNodelet">
|
||||
|
||||
<class name="laser_proc/LaserProcNodelet"
|
||||
type="laser_proc::LaserProcNodelet"
|
||||
base_class_type="nodelet::Nodelet">
|
||||
<description>
|
||||
Nodelet to convert sensor_msgs/MultiEchoLaserScans to sensor_msgs/LaserScans.
|
||||
</description>
|
||||
</class>
|
||||
|
||||
</library>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>laser_proc</name>
|
||||
<version>0.1.6</version>
|
||||
<description>laser_proc</description>
|
||||
|
||||
<maintainer email="chadrockey@willowgarage.com">Chad Rockey</maintainer>
|
||||
|
||||
<license>BSD</license>
|
||||
|
||||
<url type="website">http://ros.org/wiki/laser_proc</url>
|
||||
<url type="bugtracker">https://github.com/ros-perception/laser_proc/issues</url>
|
||||
<url type="repository">https://github.com/ros-perception/laser_proce</url>
|
||||
|
||||
<author email="chadrockey@willowgarage.com">Chad Rockey</author>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>rosconsole</build_depend>
|
||||
<build_depend>sensor_msgs</build_depend>
|
||||
<build_depend>pluginlib</build_depend>
|
||||
<build_depend>nodelet</build_depend>
|
||||
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>rosconsole</run_depend>
|
||||
<run_depend>sensor_msgs</run_depend>
|
||||
<run_depend>pluginlib</run_depend>
|
||||
<run_depend>nodelet</run_depend>
|
||||
|
||||
<export>
|
||||
<nodelet plugin="${prefix}/nodelets.xml"/>
|
||||
</export>
|
||||
</package>
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#include <laser_proc/LaserProc.h>
|
||||
|
||||
using namespace laser_proc;
|
||||
|
||||
sensor_msgs::LaserScanPtr LaserProc::getFirstScan(const sensor_msgs::MultiEchoLaserScan& msg){
|
||||
sensor_msgs::LaserScanPtr out(new sensor_msgs::LaserScan());
|
||||
fillLaserScan(msg, *out);
|
||||
out->ranges.resize(msg.ranges.size());
|
||||
if(msg.ranges.size() == msg.intensities.size()){
|
||||
out->intensities.resize(msg.intensities.size());
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < out->ranges.size(); i++){
|
||||
size_t index = getFirstValue(msg.ranges[i], out->ranges[i]);
|
||||
if(out->intensities.size() > 0){
|
||||
if(msg.intensities[i].echoes.size() > 0){
|
||||
out->intensities[i] = msg.intensities[i].echoes[index];
|
||||
} else {
|
||||
out->intensities[i] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
sensor_msgs::LaserScanPtr LaserProc::getLastScan(const sensor_msgs::MultiEchoLaserScan& msg){
|
||||
sensor_msgs::LaserScanPtr out(new sensor_msgs::LaserScan());
|
||||
fillLaserScan(msg, *out);
|
||||
out->ranges.resize(msg.ranges.size());
|
||||
if(msg.ranges.size() == msg.intensities.size()){
|
||||
out->intensities.resize(msg.intensities.size());
|
||||
}
|
||||
for(size_t i = 0; i < out->ranges.size(); i++){
|
||||
size_t index = getLastValue(msg.ranges[i], out->ranges[i]);
|
||||
if(out->intensities.size() > 0){
|
||||
if(msg.intensities[i].echoes.size() > 0){
|
||||
out->intensities[i] = msg.intensities[i].echoes[index];
|
||||
} else {
|
||||
out->intensities[i] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
sensor_msgs::LaserScanPtr LaserProc::getMostIntenseScan(const sensor_msgs::MultiEchoLaserScan& msg){
|
||||
sensor_msgs::LaserScanPtr out(new sensor_msgs::LaserScan());
|
||||
fillLaserScan(msg, *out);
|
||||
if(msg.ranges.size() == msg.intensities.size()){
|
||||
out->ranges.resize(msg.ranges.size());
|
||||
out->intensities.resize(msg.intensities.size());
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << "getMostIntenseScan::Size of ranges does not equal size of intensities, cannot create scan.";
|
||||
throw std::runtime_error(ss.str());
|
||||
}
|
||||
for(size_t i = 0; i < out->intensities.size(); i++){
|
||||
getMostIntenseValue(msg.ranges[i], msg.intensities[i], out->ranges[i], out->intensities[i]);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
void LaserProc::fillLaserScan(const sensor_msgs::MultiEchoLaserScan& msg, sensor_msgs::LaserScan& out){
|
||||
out.header = msg.header;
|
||||
out.angle_min = msg.angle_min;
|
||||
out.angle_max = msg.angle_max;
|
||||
out.angle_increment = msg.angle_increment;
|
||||
out.time_increment = msg.time_increment;
|
||||
out.scan_time = msg.scan_time;
|
||||
out.range_min = msg.range_min;
|
||||
out.range_max = msg.range_max;
|
||||
}
|
||||
|
||||
///< @TODO I'm assuming all laserscanners/drivers output the ranges in order received (shortest to longest). If this is not the case, please make an issue.
|
||||
size_t LaserProc::getFirstValue(const sensor_msgs::LaserEcho& ranges, float& range){
|
||||
if(ranges.echoes.size() > 0){
|
||||
size_t index = 0;
|
||||
range = ranges.echoes[index];
|
||||
return index;
|
||||
}
|
||||
|
||||
range = std::numeric_limits<float>::quiet_NaN();
|
||||
return 0; // Value doesn't matter
|
||||
}
|
||||
|
||||
///< @TODO I'm assuming all laserscanners/drivers output the ranges in order received (shortest to longest). If this is not the case, please make an issue.
|
||||
size_t LaserProc::getLastValue(const sensor_msgs::LaserEcho& ranges, float& range){
|
||||
if(ranges.echoes.size() > 0){
|
||||
size_t index = ranges.echoes.size()-1;
|
||||
range = ranges.echoes[index];
|
||||
return index;
|
||||
}
|
||||
|
||||
range = std::numeric_limits<float>::quiet_NaN();
|
||||
return 0; // Value doesn't matter
|
||||
}
|
||||
|
||||
void LaserProc::getMostIntenseValue(const sensor_msgs::LaserEcho& ranges, const sensor_msgs::LaserEcho& intensities, float& range, float& intensity){
|
||||
if(intensities.echoes.size() == 0){
|
||||
range = std::numeric_limits<float>::quiet_NaN();
|
||||
intensity = 0.0;
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<float>::const_iterator max_iter = std::max_element(intensities.echoes.begin(), intensities.echoes.end());
|
||||
size_t index = std::distance(intensities.echoes.begin(), max_iter);
|
||||
|
||||
if(ranges.echoes.size() > 0){
|
||||
range = ranges.echoes[index];
|
||||
intensity = *max_iter;
|
||||
} else {
|
||||
range = std::numeric_limits<float>::quiet_NaN();
|
||||
intensity = 0.0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#include <laser_proc/LaserProcROS.h>
|
||||
#include <nodelet/nodelet.h>
|
||||
|
||||
|
||||
namespace laser_proc
|
||||
{
|
||||
|
||||
class LaserProcNodelet : public nodelet::Nodelet
|
||||
{
|
||||
public:
|
||||
LaserProcNodelet() {};
|
||||
|
||||
~LaserProcNodelet() {}
|
||||
|
||||
private:
|
||||
virtual void onInit()
|
||||
{
|
||||
lp.reset(new LaserProcROS(getNodeHandle(), getPrivateNodeHandle()));
|
||||
};
|
||||
|
||||
boost::shared_ptr<LaserProcROS> lp;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#include <pluginlib/class_list_macros.h>
|
||||
PLUGINLIB_EXPORT_CLASS(laser_proc::LaserProcNodelet, nodelet::Nodelet)
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#include <laser_proc/LaserProcROS.h>
|
||||
|
||||
using namespace laser_proc;
|
||||
|
||||
LaserProcROS::LaserProcROS(ros::NodeHandle& n, ros::NodeHandle& pnh):nh_(n){
|
||||
boost::mutex::scoped_lock lock(connect_mutex_);
|
||||
|
||||
// Lazy subscription to multi echo topic
|
||||
pub_ = laser_proc::LaserTransport::advertiseLaser(n, 10, boost::bind(&LaserProcROS::connectCb, this, _1), boost::bind(&LaserProcROS::disconnectCb, this, _1), ros::VoidPtr(), false, false);
|
||||
}
|
||||
|
||||
LaserProcROS::~LaserProcROS(){
|
||||
sub_.shutdown();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LaserProcROS::scanCb(const sensor_msgs::MultiEchoLaserScanConstPtr& msg) const{
|
||||
pub_.publish(msg);
|
||||
}
|
||||
|
||||
void LaserProcROS::connectCb(const ros::SingleSubscriberPublisher& pub){
|
||||
boost::mutex::scoped_lock lock(connect_mutex_);
|
||||
if (!sub_ && pub_.getNumSubscribers() > 0) {
|
||||
ROS_DEBUG("Connecting to multi echo topic.");
|
||||
sub_ = nh_.subscribe("echoes", 10, &LaserProcROS::scanCb, this);
|
||||
}
|
||||
}
|
||||
|
||||
void LaserProcROS::disconnectCb(const ros::SingleSubscriberPublisher& pub){
|
||||
boost::mutex::scoped_lock lock(connect_mutex_);
|
||||
if (pub_.getNumSubscribers() == 0) {
|
||||
ROS_DEBUG("Unsubscribing from multi echo topic.");
|
||||
sub_.shutdown();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#include <laser_proc/LaserPublisher.h>
|
||||
|
||||
namespace laser_proc {
|
||||
|
||||
typedef sensor_msgs::LaserScanPtr (*PublishFunction)(const sensor_msgs::MultiEchoLaserScan& msg);
|
||||
|
||||
struct LaserPublisher::Impl
|
||||
{
|
||||
Impl()
|
||||
: unadvertised_(false)
|
||||
{
|
||||
}
|
||||
|
||||
~Impl()
|
||||
{
|
||||
shutdown();
|
||||
}
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return !unadvertised_;
|
||||
}
|
||||
|
||||
void shutdown()
|
||||
{
|
||||
if (!unadvertised_) {
|
||||
unadvertised_ = true;
|
||||
for(size_t i = 0; i < pubs_.size(); i++){
|
||||
pubs_[i].shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ros::Publisher echo_pub_;
|
||||
std::vector<ros::Publisher> pubs_;
|
||||
std::vector<PublishFunction> functs_;
|
||||
bool unadvertised_;
|
||||
};
|
||||
|
||||
///< @TODO Make a static class that creates these
|
||||
LaserPublisher::LaserPublisher(ros::NodeHandle& nh, uint32_t queue_size,
|
||||
const ros::SubscriberStatusCallback& connect_cb,
|
||||
const ros::SubscriberStatusCallback& disconnect_cb,
|
||||
const ros::VoidPtr& tracked_object, bool latch, bool publish_echoes)
|
||||
: impl_(new Impl)
|
||||
{
|
||||
if(publish_echoes){
|
||||
impl_->echo_pub_ = nh.advertise<sensor_msgs::MultiEchoLaserScan>("echoes", queue_size, connect_cb, disconnect_cb, tracked_object, latch);
|
||||
}
|
||||
impl_->pubs_.push_back(nh.advertise<sensor_msgs::LaserScan>("first", queue_size, connect_cb, disconnect_cb, tracked_object, latch));
|
||||
impl_->functs_.push_back(laser_proc::LaserProc::getFirstScan);
|
||||
impl_->pubs_.push_back(nh.advertise<sensor_msgs::LaserScan>("last", queue_size, connect_cb, disconnect_cb, tracked_object, latch));
|
||||
impl_->functs_.push_back(laser_proc::LaserProc::getLastScan);
|
||||
impl_->pubs_.push_back(nh.advertise<sensor_msgs::LaserScan>("most_intense", queue_size, connect_cb, disconnect_cb, tracked_object, latch));
|
||||
impl_->functs_.push_back(laser_proc::LaserProc::getMostIntenseScan);
|
||||
}
|
||||
|
||||
uint32_t LaserPublisher::getNumSubscribers() const
|
||||
{
|
||||
if (impl_ && impl_->isValid()){
|
||||
uint32_t num = impl_->echo_pub_.getNumSubscribers();
|
||||
for(size_t i = 0; i < impl_->pubs_.size(); i++){
|
||||
num = num + impl_->pubs_[i].getNumSubscribers();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<std::string> LaserPublisher::getTopics() const
|
||||
{
|
||||
std::vector<std::string> topics;
|
||||
topics.push_back(impl_->echo_pub_.getTopic());
|
||||
if (impl_ && impl_->isValid()){
|
||||
for(size_t i = 0; i < impl_->pubs_.size(); i++){
|
||||
topics.push_back(impl_->pubs_[i].getTopic());
|
||||
}
|
||||
}
|
||||
return topics;
|
||||
}
|
||||
|
||||
void LaserPublisher::publish(const sensor_msgs::MultiEchoLaserScan& msg) const
|
||||
{
|
||||
if (!impl_ || !impl_->isValid()) {
|
||||
ROS_ASSERT_MSG(false, "Call to publish() on an invalid image_transport::LaserPublisher");
|
||||
return;
|
||||
}
|
||||
|
||||
// Publish original MultiEchoLaserScan
|
||||
if(impl_->echo_pub_){
|
||||
if(impl_->echo_pub_.getNumSubscribers() > 0){
|
||||
impl_->echo_pub_.publish(msg);
|
||||
}
|
||||
}
|
||||
|
||||
// If needed, publish LaserScans
|
||||
for(size_t i = 0; i < impl_->pubs_.size(); i++){
|
||||
if(impl_->pubs_[i].getNumSubscribers() > 0){
|
||||
try{
|
||||
impl_->pubs_[i].publish(impl_->functs_[i](msg));
|
||||
} catch(std::runtime_error& e){
|
||||
ROS_ERROR_THROTTLE(1.0, "Could not publish to topic %s: %s", impl_->pubs_[i].getTopic().c_str(), e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LaserPublisher::publish(const sensor_msgs::MultiEchoLaserScanConstPtr& msg) const
|
||||
{
|
||||
if (!impl_ || !impl_->isValid()) {
|
||||
ROS_ASSERT_MSG(false, "Call to publish() on an invalid image_transport::LaserPublisher");
|
||||
return;
|
||||
}
|
||||
|
||||
// Publish original MultiEchoLaserScan
|
||||
if(impl_->echo_pub_){
|
||||
impl_->echo_pub_.publish(msg);
|
||||
}
|
||||
|
||||
// If needed, publish LaserScans
|
||||
for(size_t i = 0; i < impl_->pubs_.size(); i++){
|
||||
if(impl_->pubs_[i].getNumSubscribers() > 0){
|
||||
try{
|
||||
impl_->pubs_[i].publish(impl_->functs_[i](*msg));
|
||||
} catch(std::runtime_error& e){
|
||||
ROS_ERROR_THROTTLE(1.0, "Could not publish to topic %s: %s", impl_->pubs_[i].getTopic().c_str(), e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LaserPublisher::shutdown()
|
||||
{
|
||||
if (impl_) {
|
||||
impl_->shutdown();
|
||||
impl_.reset();
|
||||
}
|
||||
}
|
||||
|
||||
LaserPublisher::operator void*() const
|
||||
{
|
||||
return (impl_ && impl_->isValid()) ? (void*)1 : (void*)0;
|
||||
}
|
||||
|
||||
} //namespace laser_proc
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#include <laser_proc/LaserTransport.h>
|
||||
|
||||
namespace laser_proc {
|
||||
|
||||
LaserPublisher LaserTransport::advertiseLaser(ros::NodeHandle& nh, uint32_t queue_size, bool latch){
|
||||
return advertiseLaser(nh, queue_size, ros::SubscriberStatusCallback(), ros::SubscriberStatusCallback(), ros::VoidPtr(), latch);
|
||||
}
|
||||
|
||||
LaserPublisher LaserTransport::advertiseLaser(ros::NodeHandle& nh, uint32_t queue_size,
|
||||
const ros::SubscriberStatusCallback& connect_cb,
|
||||
const ros::SubscriberStatusCallback& disconnect_cb,
|
||||
const ros::VoidPtr& tracked_object, bool latch, bool publish_echoes){
|
||||
return LaserPublisher(nh, queue_size, connect_cb, disconnect_cb, tracked_object, latch, publish_echoes);
|
||||
}
|
||||
|
||||
} //namespace laser_proc
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the Willow Garage, Inc. nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Chad Rockey
|
||||
*/
|
||||
|
||||
#include <laser_proc/LaserProcROS.h>
|
||||
|
||||
int main(int argc, char **argv){
|
||||
ros::init(argc, argv, "laser_proc");
|
||||
ros::NodeHandle n;
|
||||
ros::NodeHandle pnh("~");
|
||||
|
||||
laser_proc::LaserProcROS lp(n, pnh);
|
||||
|
||||
ros::spin();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(object_detection)
|
||||
|
||||
## 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)
|
||||
|
||||
## 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 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 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 ...)
|
||||
## * 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
|
||||
# darknet_ros_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 exec_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 object_detection
|
||||
CATKIN_DEPENDS message_runtime
|
||||
# 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}/object_detection.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(${PROJECT_NAME}_node src/object_detection_node.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(${PROJECT_NAME}_node
|
||||
# ${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
|
||||
catkin_install_python(PROGRAMS
|
||||
scripts/object_detection.py
|
||||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
)
|
||||
|
||||
## Mark executables for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
|
||||
# install(TARGETS ${PROJECT_NAME}_node
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark libraries for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
|
||||
# install(TARGETS ${PROJECT_NAME}
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_GLOBAL_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_object_detection.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)
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>object_detection</name>
|
||||
<version>0.0.0</version>
|
||||
<description>The object_detection package</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
|
||||
<maintainer email="ryken@todo.todo">ryken</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>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/object_detection</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, multiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintainers, but could be -->
|
||||
<!-- Example: -->
|
||||
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
|
||||
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<depend>message_generation</depend>
|
||||
<depend>message_runtime</depend>
|
||||
|
||||
<!-- Use build_depend for packages you need at compile time: -->
|
||||
<!-- Use build_export_depend for packages you need in order to build against this package: -->
|
||||
<!-- Use buildtool_depend for build tool packages: -->
|
||||
<!-- <buildtool_depend>catkin</buildtool_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>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<!-- Other tools can request additional information be placed here -->
|
||||
|
||||
</export>
|
||||
</package>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import rospy
|
||||
import csv
|
||||
import cv2
|
||||
|
||||
from message_filters import ApproximateTimeSynchronizer, Subscriber
|
||||
from darknet_ros_msgs.msg import BoundingBoxes
|
||||
from sensor_msgs.msg import Image
|
||||
from nav_msgs.msg import Odometry
|
||||
|
||||
from cv_bridge import CvBridge
|
||||
|
||||
|
||||
def calc_center(xmin, xmax, ymin, ymax):
|
||||
|
||||
x0 = (xmin + xmax)/2
|
||||
y0 = (ymin + ymax)/2
|
||||
|
||||
return [x0, y0]
|
||||
|
||||
def calc_centroid(xmin, xmax, ymin, ymax):
|
||||
|
||||
dx = abs(xmax - xmin)
|
||||
dy = abs(ymax - ymin)
|
||||
|
||||
[x0, y0] = calc_center(xmin, xmax, ymin, ymax)
|
||||
|
||||
c_xmin = x0 - dx/4
|
||||
c_xmax = x0 + dx/4
|
||||
c_ymin = y0 - dy/4
|
||||
c_ymax = y0 + dy/4
|
||||
|
||||
return c_xmin, c_xmax, c_ymin, c_ymax
|
||||
|
||||
def new_object(box, image, odom):
|
||||
|
||||
FLAG = False
|
||||
|
||||
b_xmin, b_xmax, b_ymin, b_ymax = calc_centroid(box.xmin, box.xmax, box.ymin, box.ymax)
|
||||
x0, y0 = calc_center(box.xmin, box.xmax, box.ymin, box.ymax)
|
||||
|
||||
rospy.loginfo("%s: %f, %f", box.Class, x0, y0)
|
||||
|
||||
with open("/home/ryken/Desktop/real/src/object_detection/buffer/buffer.csv") as file_in:
|
||||
reader = csv.reader(file_in.readlines())
|
||||
|
||||
with open("/home/ryken/Desktop/real/src/object_detection/buffer/buffer.csv", "w") as file_out:
|
||||
writer = csv.writer(file_out)
|
||||
|
||||
for row in reader:
|
||||
|
||||
if box.Class == row[0]:
|
||||
|
||||
x0, y0 = calc_center(box.xmin, box.xmax, box.ymin, box.ymax)
|
||||
c_xmin, c_xmax, c_ymin, c_ymax = float(row[1]), float(row[2]), float(row[3]), float(row[4])
|
||||
|
||||
if x0 < c_xmax and x0 > c_xmin and y0 < c_ymax and y0 > c_ymin:
|
||||
FLAG = True
|
||||
writer.writerow([box.Class, b_xmin, b_xmax, b_ymin, b_ymax, box.probability, odom.pose.pose.position.x, odom.pose.pose.position.y])
|
||||
img = bridge. imgmsg_to_cv2(image, "bgr8")
|
||||
cv2.imwrite("/home/ryken/Desktop/real/src/object_detection/results/"+box.Class+".jpeg", img)
|
||||
else:
|
||||
FLAG = False
|
||||
else:
|
||||
writer.writerow(row)
|
||||
|
||||
if not FLAG:
|
||||
writer.writerow([box.Class, b_xmin, b_xmax, b_ymin, b_ymax, box.probability, odom.pose.pose.position.x, odom.pose.pose.position.y])
|
||||
img = bridge. imgmsg_to_cv2(image, "bgr8")
|
||||
cv2.imwrite("/home/ryken/Desktop/real/src/object_detection/results/"+box.Class+".jpeg", img)
|
||||
|
||||
def callback(boxes, image, odom):
|
||||
for box in boxes.bounding_boxes:
|
||||
if box.probability >= 0.7:
|
||||
new_object(box, image, odom)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
with open("/home/ryken/Desktop/real/src/object_detection/buffer/buffer.csv", "w") as file_out:
|
||||
writer = csv.writer(file_out)
|
||||
|
||||
rospy.init_node('object_detection')
|
||||
|
||||
bridge = CvBridge()
|
||||
|
||||
boxes = Subscriber("darknet_ros/bounding_boxes", BoundingBoxes, queue_size=1)
|
||||
image = Subscriber("darknet_ros/detection_image", Image, queue_size=1)
|
||||
odom = Subscriber("odom", Odometry, queue_size=1)
|
||||
ts = ApproximateTimeSynchronizer([boxes, image, odom], 5, 0.2, allow_headerless=False)
|
||||
ts.registerCallback(callback)
|
||||
|
||||
try:
|
||||
rospy.loginfo("Started Object Detection...")
|
||||
rospy.spin()
|
||||
except rospy.ROSInterruptException:
|
||||
rospy.loginfo("Shutting down Object Detection...")
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>p3dx_description</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,88 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(p3dx_description)
|
||||
|
||||
## 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
|
||||
urdf
|
||||
)
|
||||
|
||||
## 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 and services ##
|
||||
#######################################
|
||||
|
||||
## 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 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 p3dx_description
|
||||
# CATKIN_DEPENDS roscpp rospy urdf
|
||||
# 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(p3dx_description
|
||||
# src/${PROJECT_NAME}/p3dx_description.cpp
|
||||
# )
|
||||
|
||||
## Declare a cpp executable
|
||||
# add_executable(p3dx_description src/main.cpp)
|
||||
|
||||
## Add cmake target dependencies of the executable/library
|
||||
## as an example, message headers may need to be generated before nodes
|
||||
# add_dependencies(p3dx_description_node p3dx_description_generate_messages_cpp)
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(p3dx_description_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<arg name="tf_prefix" default="robot_0"/>
|
||||
<arg name="model" default="$(find p3dx_description)/urdf/pioneer3dx_fixed_joints.xml"/>
|
||||
<!--<arg name="gui" default="False" />-->
|
||||
|
||||
<param name="robot_description" textfile="$(arg model)" />
|
||||
<!--<param name="use_gui" value="$(arg gui)"/>-->
|
||||
|
||||
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
|
||||
<param name="tf_prefix" value="$(arg tf_prefix)"/>
|
||||
</node>
|
||||
|
||||
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<arg name="model" default="$(find p3dx_description)/urdf/pioneer3dx.xml"/>
|
||||
<arg name="gui" default="False" />
|
||||
<!--<arg name="prefix" default="" />-->
|
||||
|
||||
<param name="robot_description" textfile="$(arg model)" />
|
||||
<param name="use_gui" value="$(arg gui)"/>
|
||||
<!--<param name="tf_prefix" value="$(arg prefix)"/>-->
|
||||
|
||||
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>
|
||||
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
|
||||
<!--<node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_tutorial)/urdf.rviz" /> open standard rviz window -->
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
<arg name="model" default="$(find p3dx_description)/urdf/pioneer3dx.xml"/>
|
||||
<arg name="gui" default="False" />
|
||||
<arg name="robot_name" default="ugv1" />
|
||||
|
||||
<param name="robot_description" textfile="$(arg model)" />
|
||||
<param name="use_gui" value="$(arg gui)"/>
|
||||
<param name="tf_prefix" value="$(arg robot_name)"/>
|
||||
|
||||
<node name="joint_state_publisher_$(arg robot_name)" pkg="joint_state_publisher" type="joint_state_publisher"/>
|
||||
<node name="robot_state_publisher_$(arg robot_name)" pkg="robot_state_publisher" type="state_publisher" />
|
||||
<!--<node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_tutorial)/urdf.rviz" /> open standard rviz window -->
|
||||
</launch>
|
||||
@@ -0,0 +1,20 @@
|
||||
=========================================
|
||||
Location Coordinates (x,y,z)
|
||||
=========================================
|
||||
|
||||
Chassis : -0.045 0 0.148
|
||||
Top : -0.045 0 0.234
|
||||
|
||||
Swivel : -0.185 0 0.055
|
||||
Center Hubcap : -0.211 0 0.037
|
||||
Center Wheel : -0.211 0 0.038
|
||||
|
||||
Right Hubcap : 0 0.158 0.091
|
||||
Right Wheel : 0 0.158 0.091
|
||||
|
||||
Left Hubcap : 0 -0.158 0.091
|
||||
Left Wheel : 0 -0.158 0.091
|
||||
|
||||
Front Sonar : -0.2 0 0.209
|
||||
Back Sonar : 0.109 0 0.209
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>p3dx_description</name>
|
||||
<version>0.1.0</version>
|
||||
<description>
|
||||
A Pioneer 3DX description for Gazebo. First working version
|
||||
</description>
|
||||
|
||||
<maintainer email="rafael.berkvens@uantwerpen.be">Rafael Berkvens</maintainer>
|
||||
<license>GPLv3</license>
|
||||
<url>https://github.com/RafBerkvens/ua_ros_p3dx</url>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>rospy</build_depend>
|
||||
<build_depend>urdf</build_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>rospy</run_depend>
|
||||
<run_depend>urdf</run_depend>
|
||||
</package>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
These are some material descriptions of the Pioneer 3DX.
|
||||
Copyright (C) 2013 Rafael Berkvens rafael.berkvens@uantwerpen.be
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This project is based on work by Tracy Davies, where it was in turn based on
|
||||
work original in ucs-ros-pkg.
|
||||
-->
|
||||
|
||||
<robot>
|
||||
|
||||
<material name="ChassisRed">
|
||||
<color rgba="0.851 0.0 0.0 1.0"/>
|
||||
</material>
|
||||
|
||||
<material name="SonarYellow">
|
||||
<color rgba="0.715 0.583 0.210 1.0"/>
|
||||
</material>
|
||||
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1.0"/>
|
||||
</material>
|
||||
|
||||
<material name="HubcapYellow">
|
||||
<color rgba="1.0 0.811 0.151 1.0"/>
|
||||
</material>
|
||||
|
||||
<material name="ChassisRed">
|
||||
<color rgba="0.8 0.0 0.0 1.0"/>
|
||||
</material>
|
||||
|
||||
<material name="TopBlack">
|
||||
<color rgba="0.038 0.038 0.038 1.0"/>
|
||||
</material>
|
||||
|
||||
</robot>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
This is the gazebo urdf description of a Pioneer 3DX.
|
||||
Copyright (C) 2013 Rafael Berkvens rafael.berkvens@uantwerpen.be
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<robot>
|
||||
|
||||
<!-- properties (constants) -->
|
||||
<property name="ns" value="p3dx" />
|
||||
|
||||
<!-- ros_control plugin -->
|
||||
<gazebo>
|
||||
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
|
||||
<robotNamespace>/${ns}</robotNamespace>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
<!-- base_link -->
|
||||
<gazebo reference="base_link">
|
||||
<material>Gazebo/Red</material>
|
||||
</gazebo>
|
||||
|
||||
<!-- top_plate -->
|
||||
<gazebo reference="top_plate">
|
||||
<material>Gazebo/Black</material>
|
||||
</gazebo>
|
||||
|
||||
<!-- swivel -->
|
||||
<gazebo reference="swivel">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
|
||||
<!-- center_hubcap -->
|
||||
<gazebo reference="center_hubcap">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
|
||||
<!-- center_wheel -->
|
||||
<gazebo reference="center_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>10.0</mu1>
|
||||
<mu2>10.0</mu2>
|
||||
<kp>1000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
|
||||
<!-- front_sonar -->
|
||||
<gazebo reference="front_sonar">
|
||||
<material value="Gazebo/Yellow" />
|
||||
</gazebo>
|
||||
|
||||
<!-- differential drive -->
|
||||
<gazebo>
|
||||
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>100</updateRate>
|
||||
<leftJoint>base_right_wheel_joint</leftJoint>
|
||||
<rightJoint>base_left_wheel_joint</rightJoint>
|
||||
<wheelSeparation>0.39</wheelSeparation>
|
||||
<wheelDiameter>0.15</wheelDiameter>
|
||||
<torque>5</torque>
|
||||
<commandTopic>cmd_vel</commandTopic>
|
||||
<odometryTopic>odom</odometryTopic>
|
||||
<odometryFrame>odom</odometryFrame>
|
||||
<robotBaseFrame>base_link</robotBaseFrame>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
<!-- ground truth -->
|
||||
<gazebo>
|
||||
<plugin name="p3d_base_controller" filename="libgazebo_ros_p3d.so">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>100.0</updateRate>
|
||||
<bodyName>base_link</bodyName>
|
||||
<topicName>${ns}/base_pose_ground_truth</topicName>
|
||||
<gaussianNoise>0.01</gaussianNoise>
|
||||
<frameName>map</frameName>
|
||||
<!-- initialize odometry for fake localization -->
|
||||
<xyzOffsets>0 0 0</xyzOffsets>
|
||||
<rpyOffsets>0 0 0</rpyOffsets>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
|
||||
<!-- lms100 -->
|
||||
<gazebo reference="lms100">
|
||||
<sensor type="ray" name="head_hokuyo_sensor">
|
||||
<pose>0 0 0 0 0 0</pose>
|
||||
<visualize>false</visualize>
|
||||
<update_rate>50</update_rate>
|
||||
<ray>
|
||||
<scan>
|
||||
<horizontal>
|
||||
<samples>360</samples>
|
||||
<resolution>1</resolution>
|
||||
<min_angle>-1.570796</min_angle>
|
||||
<max_angle>1.570796</max_angle>
|
||||
</horizontal>
|
||||
</scan>
|
||||
<range>
|
||||
<min>0.10</min>
|
||||
<max>30.0</max>
|
||||
<resolution>0.01</resolution>
|
||||
</range>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<!-- Noise parameters based on published spec for Hokuyo laser achieving
|
||||
"+-30mm" accuracy at range < 10m. A mean of 0.0m and stddev of 0.01m will
|
||||
put 99.7% of samples within 0.03m of the true reading. -->
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</ray>
|
||||
<plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_laser.so">
|
||||
<topicName>${ns}/laser/scan</topicName>
|
||||
<frameName>lms100</frameName>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</gazebo>
|
||||
|
||||
</robot>
|
||||
@@ -0,0 +1,262 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
This is the xacro description of a Pioneer 3DX, to be used in rviz and gazebo.
|
||||
Copyright (C) 2013 Rafael Berkvens rafael.berkvens@uantwerpen.be
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This project is based on work by Tracy Davies, where it was in turn based on
|
||||
work original in ucs-ros-pkg.
|
||||
-->
|
||||
|
||||
<robot name="pioneer3dx" xmlns:xacro="http://ros.org/wiki/xacro">
|
||||
|
||||
<!-- import all gazebo-customization elements, including gazebo colors -->
|
||||
<xacro:include filename="$(find p3dx_description)/urdf/pioneer3dx.gazebo" />
|
||||
<!-- import the pioneer 3dx's wheels -->
|
||||
<xacro:include filename="$(find p3dx_description)/urdf/pioneer3dx_wheel.xacro" />
|
||||
|
||||
<!-- chassis -->
|
||||
<link name="base_link">
|
||||
<inertial>
|
||||
<mass value="3.5" />
|
||||
<!--<origin xyz="-0.025 0 -0.223"/> -->
|
||||
<origin xyz="-0.05 0 0" />
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="-0.045 0 0.148" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/chassis.stl" />
|
||||
</geometry>
|
||||
<material name="ChassisRed">
|
||||
<color rgba="0.851 0.0 0.0 1.0" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="-0.045 0 0.145" rpy="0 0 0" />
|
||||
<geometry>
|
||||
<box size="0.35 0.25 0.14" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<!-- top_plate -->
|
||||
<link name="top_plate">
|
||||
<inertial>
|
||||
<mass value="0.01" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry name="top_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/top.stl" />
|
||||
</geometry>
|
||||
|
||||
<material name="TopBlack">
|
||||
<color rgba="0.038 0.038 0.038 1.0" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0.0 0 0" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<box size="0.45 0.38 0.01" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_top_joint" type="fixed">
|
||||
<origin xyz="-0.045 0 0.234" rpy="0 0 0" />
|
||||
<parent link="base_link" />
|
||||
<child link="top_plate" />
|
||||
</joint>
|
||||
|
||||
<!-- swivel -->
|
||||
<link name="swivel">
|
||||
<inertial>
|
||||
<mass value="0.1" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/swivel.stl" />
|
||||
</geometry>
|
||||
<material name="swivel">
|
||||
<color rgba="0.5 0.5 0.5 1" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry>
|
||||
<box size="0 0 0" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_swivel_joint" type="continuous">
|
||||
<origin xyz="-0.185 0 0.055" rpy="0 0 0" />
|
||||
<axis xyz="0 0 1" />
|
||||
<anchor xyz="0 0 0" />
|
||||
<limit effort="100" velocity="100" k_velocity="0" />
|
||||
<joint_properties damping="0.0" friction="0.0" />
|
||||
<parent link="base_link" />
|
||||
<child link="swivel" />
|
||||
</joint>
|
||||
|
||||
<!-- center_hubcap -->
|
||||
<link name="center_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983"
|
||||
iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/center_hubcap.stl" />
|
||||
</geometry>
|
||||
<material name="swivel">
|
||||
<color rgba="0.5 0.5 0.5 1" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry>
|
||||
<box size="0 0 0" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="swivel_hubcap_joint" type="continuous">
|
||||
<origin xyz="-0.026 0 -0.016" rpy="0 0 0" />
|
||||
<axis xyz="0 1 0" />
|
||||
<anchor xyz="0 0 0" />
|
||||
<limit effort="100" velocity="100" k_velocity="0" />
|
||||
<joint_properties damping="0.0" friction="0.0" />
|
||||
<parent link="swivel" />
|
||||
<child link="center_wheel" />
|
||||
</joint>
|
||||
|
||||
<!-- center_wheel -->
|
||||
<link name="center_wheel">
|
||||
<inertial>
|
||||
<mass value="0.1" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983"
|
||||
iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/center_wheel.stl" />
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="${-3.1415927/2.0} 0 0" />
|
||||
<geometry>
|
||||
<cylinder radius="0.0375" length="0.01" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="center_wheel_joint" type="fixed">
|
||||
<origin xyz="-0.0035 0 -0.001" rpy="0 0 0"/>
|
||||
<parent link="center_wheel"/>
|
||||
<child link="center_hubcap"/>
|
||||
</joint>
|
||||
|
||||
<xacro:p3dx_wheel suffix="left" parent="base_link" reflect="1"/>
|
||||
<xacro:p3dx_wheel suffix="right" parent="base_link" reflect="-1"/>
|
||||
|
||||
<!-- front_sonar -->
|
||||
<link name="front_sonar">
|
||||
<inertial>
|
||||
<mass value="0.0001" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />
|
||||
</inertial>
|
||||
|
||||
<visual name="front_sonar_vis">
|
||||
<origin rpy="0 0 0" xyz="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/front_sonar.stl" />
|
||||
</geometry>
|
||||
<material name="SonarYellow">
|
||||
<color rgba="0.715 0.583 0.210 1.0" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0" />
|
||||
<geometry>
|
||||
<box size="0 0 0" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_front_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0.109 0 0.209" />
|
||||
<parent link="base_link" />
|
||||
<child link="front_sonar" />
|
||||
</joint>
|
||||
|
||||
<!-- lms100 laser -->
|
||||
<link name="lms100">
|
||||
<inertial>
|
||||
<mass value="1e-5" />
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
|
||||
</inertial>
|
||||
|
||||
<visual>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry>
|
||||
<mesh filename="package://p3dx_description/meshes/lms100.dae" />
|
||||
</geometry>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry>
|
||||
<box size="0.1 0.1 0.1" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="lms100_joint" type="fixed">
|
||||
<axis xyz="0 1 0" />
|
||||
<origin xyz="0.16 0 0.15" rpy="0 0 0" />
|
||||
<parent link="base_link" />
|
||||
<child link="lms100" />
|
||||
</joint>
|
||||
|
||||
</robot>
|
||||
@@ -0,0 +1,470 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- =================================================================================== -->
|
||||
<!-- | This document was autogenerated by xacro from pioneer3dx.xacro | -->
|
||||
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
|
||||
<!-- =================================================================================== -->
|
||||
<!--
|
||||
This is the xacro description of a Pioneer 3DX, to be used in rviz and gazebo.
|
||||
Copyright (C) 2013 Rafael Berkvens rafael.berkvens@uantwerpen.be
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This project is based on work by Tracy Davies, where it was in turn based on
|
||||
work original in ucs-ros-pkg.
|
||||
-->
|
||||
<robot name="pioneer3dx" xmlns:xacro="http://ros.org/wiki/xacro">
|
||||
<!-- import all gazebo-customization elements, including gazebo colors -->
|
||||
<gazebo>
|
||||
<plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control">
|
||||
<robotNamespace>/p3dx</robotNamespace>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
<gazebo reference="base_link">
|
||||
<material>Gazebo/Red</material>
|
||||
</gazebo>
|
||||
<gazebo reference="top_plate">
|
||||
<material>Gazebo/Black</material>
|
||||
</gazebo>
|
||||
<gazebo reference="swivel">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
<gazebo reference="center_hubcap">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
<gazebo reference="center_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>10.0</mu1>
|
||||
<mu2>10.0</mu2>
|
||||
<kp>1000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
<gazebo reference="front_sonar">
|
||||
<material value="Gazebo/Yellow"/>
|
||||
</gazebo>
|
||||
<gazebo>
|
||||
<plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>100</updateRate>
|
||||
<leftJoint>base_right_wheel_joint</leftJoint>
|
||||
<rightJoint>base_left_wheel_joint</rightJoint>
|
||||
<wheelSeparation>0.39</wheelSeparation>
|
||||
<wheelDiameter>0.15</wheelDiameter>
|
||||
<torque>5</torque>
|
||||
<commandTopic>cmd_vel</commandTopic>
|
||||
<odometryTopic>odom</odometryTopic>
|
||||
<odometryFrame>odom</odometryFrame>
|
||||
<robotBaseFrame>base_link</robotBaseFrame>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
<gazebo>
|
||||
<plugin filename="libgazebo_ros_p3d.so" name="p3d_base_controller">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>100.0</updateRate>
|
||||
<bodyName>base_link</bodyName>
|
||||
<topicName>p3dx/base_pose_ground_truth</topicName>
|
||||
<gaussianNoise>0.01</gaussianNoise>
|
||||
<frameName>map</frameName>
|
||||
<!-- initialize odometry for fake localization -->
|
||||
<xyzOffsets>0 0 0</xyzOffsets>
|
||||
<rpyOffsets>0 0 0</rpyOffsets>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
<gazebo reference="lms100">
|
||||
<sensor name="head_hokuyo_sensor" type="ray">
|
||||
<pose>0 0 0 0 0 0</pose>
|
||||
<visualize>false</visualize>
|
||||
<update_rate>50</update_rate>
|
||||
<ray>
|
||||
<scan>
|
||||
<horizontal>
|
||||
<samples>360</samples>
|
||||
<resolution>1</resolution>
|
||||
<min_angle>-1.570796</min_angle>
|
||||
<max_angle>1.570796</max_angle>
|
||||
</horizontal>
|
||||
</scan>
|
||||
<range>
|
||||
<min>0.10</min>
|
||||
<max>30.0</max>
|
||||
<resolution>0.01</resolution>
|
||||
</range>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<!-- Noise parameters based on published spec for Hokuyo laser achieving
|
||||
"+-30mm" accuracy at range < 10m. A mean of 0.0m and stddev of 0.01m will
|
||||
put 99.7% of samples within 0.03m of the true reading. -->
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</ray>
|
||||
<plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_head_hokuyo_controller">
|
||||
<topicName>p3dx/laser/scan</topicName>
|
||||
<frameName>lms100</frameName>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</gazebo>
|
||||
<!-- import the pioneer 3dx's wheels -->
|
||||
<!-- chassis -->
|
||||
<link name="base_link">
|
||||
<inertial>
|
||||
<mass value="3.5"/>
|
||||
<!--<origin xyz="-0.025 0 -0.223"/> -->
|
||||
<origin xyz="-0.05 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="-0.045 0 0.148"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/chassis.stl"/>
|
||||
</geometry>
|
||||
<material name="ChassisRed">
|
||||
<color rgba="0.851 0.0 0.0 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="-0.045 0 0.145"/>
|
||||
<geometry>
|
||||
<box size="0.35 0.25 0.14"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<!-- top_plate -->
|
||||
<link name="top_plate">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="top_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/top.stl"/>
|
||||
</geometry>
|
||||
<material name="TopBlack">
|
||||
<color rgba="0.038 0.038 0.038 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0.0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<box size="0.45 0.38 0.01"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_top_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="-0.045 0 0.234"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="top_plate"/>
|
||||
</joint>
|
||||
<!-- swivel -->
|
||||
<link name="swivel">
|
||||
<inertial>
|
||||
<mass value="0.1"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/swivel.stl"/>
|
||||
</geometry>
|
||||
<material name="swivel">
|
||||
<color rgba="0.5 0.5 0.5 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_swivel_joint" type="continuous">
|
||||
<origin rpy="0 0 0" xyz="-0.185 0 0.055"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" k_velocity="0" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="swivel"/>
|
||||
</joint>
|
||||
<!-- center_hubcap -->
|
||||
<link name="center_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/center_hubcap.stl"/>
|
||||
</geometry>
|
||||
<material name="swivel">
|
||||
<color rgba="0.5 0.5 0.5 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="swivel_hubcap_joint" type="continuous">
|
||||
<origin rpy="0 0 0" xyz="-0.026 0 -0.016"/>
|
||||
<axis xyz="0 1 0"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" k_velocity="0" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<parent link="swivel"/>
|
||||
<child link="center_wheel"/>
|
||||
</joint>
|
||||
<!-- center_wheel -->
|
||||
<link name="center_wheel">
|
||||
<inertial>
|
||||
<mass value="0.1"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/center_wheel.stl"/>
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="-1.57079635 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.01" radius="0.0375"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="center_wheel_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="-0.0035 0 -0.001"/>
|
||||
<parent link="center_wheel"/>
|
||||
<child link="center_hubcap"/>
|
||||
</joint>
|
||||
<link name="p3dx_left_wheel">
|
||||
<inertial>
|
||||
<mass value="0.5"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/left_wheel.stl"/>
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="-1.57079635 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<!--<mesh filename="package://p3dx_description/meshes/${suffix}_wheel.stl"/> -->
|
||||
<cylinder length="0.01" radius="0.09"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_left_hubcap_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<parent link="p3dx_left_wheel"/>
|
||||
<child link="p3dx_left_hubcap"/>
|
||||
</joint>
|
||||
<link name="p3dx_left_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/left_hubcap.stl"/>
|
||||
</geometry>
|
||||
<material name="HubcapYellow">
|
||||
<color rgba="1.0 0.811 0.151 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_left_wheel_joint" type="continuous">
|
||||
<axis xyz="0 1 0"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 0" xyz="0 0.158 0.091"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="p3dx_left_wheel"/>
|
||||
</joint>
|
||||
<transmission name="base_link_left_wheel_trans">
|
||||
<type>pr2_mechanism_model/SimpleTransmission</type>
|
||||
<joint name="base_left_wheel_joint"/>
|
||||
<actuator name="base_left_wheel_motor">
|
||||
<hardwareInterface>EffortJointInterface</hardwareInterface>
|
||||
<mechanicalReduction>75.0676691729</mechanicalReduction>
|
||||
</actuator>
|
||||
</transmission>
|
||||
<gazebo reference="p3dx_left_hubcap">
|
||||
<material>Gazebo/Yellow</material>
|
||||
</gazebo>
|
||||
<gazebo reference="p3dx_left_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>0.5</mu1>
|
||||
<mu2>50.0</mu2>
|
||||
<kp>100000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
<link name="p3dx_right_wheel">
|
||||
<inertial>
|
||||
<mass value="0.5"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/right_wheel.stl"/>
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="-1.57079635 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<!--<mesh filename="package://p3dx_description/meshes/${suffix}_wheel.stl"/> -->
|
||||
<cylinder length="0.01" radius="0.09"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_right_hubcap_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<parent link="p3dx_right_wheel"/>
|
||||
<child link="p3dx_right_hubcap"/>
|
||||
</joint>
|
||||
<link name="p3dx_right_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/right_hubcap.stl"/>
|
||||
</geometry>
|
||||
<material name="HubcapYellow">
|
||||
<color rgba="1.0 0.811 0.151 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_right_wheel_joint" type="continuous">
|
||||
<axis xyz="0 1 0"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>
|
||||
<origin rpy="0 0 0" xyz="0 -0.158 0.091"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="p3dx_right_wheel"/>
|
||||
</joint>
|
||||
<transmission name="base_link_right_wheel_trans">
|
||||
<type>pr2_mechanism_model/SimpleTransmission</type>
|
||||
<joint name="base_right_wheel_joint"/>
|
||||
<actuator name="base_right_wheel_motor">
|
||||
<hardwareInterface>EffortJointInterface</hardwareInterface>
|
||||
<mechanicalReduction>-75.0676691729</mechanicalReduction>
|
||||
</actuator>
|
||||
</transmission>
|
||||
<gazebo reference="p3dx_right_hubcap">
|
||||
<material>Gazebo/Yellow</material>
|
||||
</gazebo>
|
||||
<gazebo reference="p3dx_right_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>0.5</mu1>
|
||||
<mu2>50.0</mu2>
|
||||
<kp>100000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
<!-- front_sonar -->
|
||||
<link name="front_sonar">
|
||||
<inertial>
|
||||
<mass value="0.0001"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
<visual name="front_sonar_vis">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/front_sonar.stl"/>
|
||||
</geometry>
|
||||
<material name="SonarYellow">
|
||||
<color rgba="0.715 0.583 0.210 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_front_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0.109 0 0.209"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="front_sonar"/>
|
||||
</joint>
|
||||
<!-- lms100 laser -->
|
||||
<link name="lms100">
|
||||
<inertial>
|
||||
<mass value="1e-5"/>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/>
|
||||
</inertial>
|
||||
<visual>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://p3dx_description/meshes/lms100.dae"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0.1 0.1 0.1"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="lms100_joint" type="fixed">
|
||||
<axis xyz="0 1 0"/>
|
||||
<origin rpy="0 0 0" xyz="0.16 0 0.15"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="lms100"/>
|
||||
</joint>
|
||||
</robot>
|
||||
@@ -0,0 +1,470 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- =================================================================================== -->
|
||||
<!-- | This document was autogenerated by xacro from pioneer3dx.xacro | -->
|
||||
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
|
||||
<!-- =================================================================================== -->
|
||||
<!--
|
||||
This is the xacro description of a Pioneer 3DX, to be used in rviz and gazebo.
|
||||
Copyright (C) 2013 Rafael Berkvens rafael.berkvens@uantwerpen.be
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This project is based on work by Tracy Davies, where it was in turn based on
|
||||
work original in ucs-ros-pkg.
|
||||
-->
|
||||
<robot name="pioneer3dx" xmlns:xacro="http://ros.org/wiki/xacro">
|
||||
<!-- import all gazebo-customization elements, including gazebo colors -->
|
||||
<gazebo>
|
||||
<plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control">
|
||||
<robotNamespace>/p3dx</robotNamespace>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
<gazebo reference="base_link">
|
||||
<material>Gazebo/Red</material>
|
||||
</gazebo>
|
||||
<gazebo reference="top_plate">
|
||||
<material>Gazebo/Black</material>
|
||||
</gazebo>
|
||||
<gazebo reference="swivel">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
<gazebo reference="center_hubcap">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
<gazebo reference="center_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>10.0</mu1>
|
||||
<mu2>10.0</mu2>
|
||||
<kp>1000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
<gazebo reference="front_sonar">
|
||||
<material value="Gazebo/Yellow"/>
|
||||
</gazebo>
|
||||
<gazebo>
|
||||
<plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>100</updateRate>
|
||||
<leftJoint>base_right_wheel_joint</leftJoint>
|
||||
<rightJoint>base_left_wheel_joint</rightJoint>
|
||||
<wheelSeparation>0.39</wheelSeparation>
|
||||
<wheelDiameter>0.15</wheelDiameter>
|
||||
<torque>5</torque>
|
||||
<commandTopic>cmd_vel</commandTopic>
|
||||
<odometryTopic>odom</odometryTopic>
|
||||
<odometryFrame>odom</odometryFrame>
|
||||
<robotBaseFrame>base_link</robotBaseFrame>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
<gazebo>
|
||||
<plugin filename="libgazebo_ros_p3d.so" name="p3d_base_controller">
|
||||
<alwaysOn>true</alwaysOn>
|
||||
<updateRate>100.0</updateRate>
|
||||
<bodyName>base_link</bodyName>
|
||||
<topicName>p3dx/base_pose_ground_truth</topicName>
|
||||
<gaussianNoise>0.01</gaussianNoise>
|
||||
<frameName>map</frameName>
|
||||
<!-- initialize odometry for fake localization -->
|
||||
<xyzOffsets>0 0 0</xyzOffsets>
|
||||
<rpyOffsets>0 0 0</rpyOffsets>
|
||||
</plugin>
|
||||
</gazebo>
|
||||
<gazebo reference="lms100">
|
||||
<sensor name="head_hokuyo_sensor" type="ray">
|
||||
<pose>0 0 0 0 0 0</pose>
|
||||
<visualize>false</visualize>
|
||||
<update_rate>50</update_rate>
|
||||
<ray>
|
||||
<scan>
|
||||
<horizontal>
|
||||
<samples>360</samples>
|
||||
<resolution>1</resolution>
|
||||
<min_angle>-1.570796</min_angle>
|
||||
<max_angle>1.570796</max_angle>
|
||||
</horizontal>
|
||||
</scan>
|
||||
<range>
|
||||
<min>0.10</min>
|
||||
<max>30.0</max>
|
||||
<resolution>0.01</resolution>
|
||||
</range>
|
||||
<noise>
|
||||
<type>gaussian</type>
|
||||
<!-- Noise parameters based on published spec for Hokuyo laser achieving
|
||||
"+-30mm" accuracy at range < 10m. A mean of 0.0m and stddev of 0.01m will
|
||||
put 99.7% of samples within 0.03m of the true reading. -->
|
||||
<mean>0.0</mean>
|
||||
<stddev>0.01</stddev>
|
||||
</noise>
|
||||
</ray>
|
||||
<plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_head_hokuyo_controller">
|
||||
<topicName>p3dx/laser/scan</topicName>
|
||||
<frameName>lms100</frameName>
|
||||
</plugin>
|
||||
</sensor>
|
||||
</gazebo>
|
||||
<!-- import the pioneer 3dx's wheels -->
|
||||
<!-- chassis -->
|
||||
<link name="base_link">
|
||||
<inertial>
|
||||
<mass value="3.5"/>
|
||||
<!--<origin xyz="-0.025 0 -0.223"/> -->
|
||||
<origin xyz="-0.05 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="-0.045 0 0.148"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/chassis.stl"/>
|
||||
</geometry>
|
||||
<material name="ChassisRed">
|
||||
<color rgba="0.851 0.0 0.0 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="-0.045 0 0.145"/>
|
||||
<geometry>
|
||||
<box size="0.35 0.25 0.14"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<!-- top_plate -->
|
||||
<link name="top_plate">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="top_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/top.stl"/>
|
||||
</geometry>
|
||||
<material name="TopBlack">
|
||||
<color rgba="0.038 0.038 0.038 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0.0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<box size="0.45 0.38 0.01"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_top_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="-0.045 0 0.234"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="top_plate"/>
|
||||
</joint>
|
||||
<!-- swivel -->
|
||||
<link name="swivel">
|
||||
<inertial>
|
||||
<mass value="0.1"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/swivel.stl"/>
|
||||
</geometry>
|
||||
<material name="swivel">
|
||||
<color rgba="0.5 0.5 0.5 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_swivel_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="-0.185 0 0.055"/>
|
||||
<!--<axis xyz="0 0 1"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" k_velocity="0" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>-->
|
||||
<parent link="base_link"/>
|
||||
<child link="swivel"/>
|
||||
</joint>
|
||||
<!-- center_hubcap -->
|
||||
<link name="center_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/center_hubcap.stl"/>
|
||||
</geometry>
|
||||
<material name="swivel">
|
||||
<color rgba="0.5 0.5 0.5 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="swivel_hubcap_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="-0.026 0 -0.016"/>
|
||||
<!--<axis xyz="0 1 0"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" k_velocity="0" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>-->
|
||||
<parent link="swivel"/>
|
||||
<child link="center_wheel"/>
|
||||
</joint>
|
||||
<!-- center_wheel -->
|
||||
<link name="center_wheel">
|
||||
<inertial>
|
||||
<mass value="0.1"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="-0.000711733678" ixz="0.00050272983" iyy="0.015218160428" iyz="-0.000004273467" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/center_wheel.stl"/>
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="-1.57079635 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="0.01" radius="0.0375"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="center_wheel_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="-0.0035 0 -0.001"/>
|
||||
<parent link="center_wheel"/>
|
||||
<child link="center_hubcap"/>
|
||||
</joint>
|
||||
<link name="p3dx_left_wheel">
|
||||
<inertial>
|
||||
<mass value="0.5"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/left_wheel.stl"/>
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="-1.57079635 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<!--<mesh filename="package://p3dx_description/meshes/${suffix}_wheel.stl"/> -->
|
||||
<cylinder length="0.01" radius="0.09"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_left_hubcap_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<parent link="p3dx_left_wheel"/>
|
||||
<child link="p3dx_left_hubcap"/>
|
||||
</joint>
|
||||
<link name="p3dx_left_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/left_hubcap.stl"/>
|
||||
</geometry>
|
||||
<material name="HubcapYellow">
|
||||
<color rgba="1.0 0.811 0.151 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_left_wheel_joint" type="fixed">
|
||||
<!--<axis xyz="0 1 0"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>-->
|
||||
<origin rpy="0 0 0" xyz="0 0.158 0.091"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="p3dx_left_wheel"/>
|
||||
</joint>
|
||||
<transmission name="base_link_left_wheel_trans">
|
||||
<type>pr2_mechanism_model/SimpleTransmission</type>
|
||||
<joint name="base_left_wheel_joint"/>
|
||||
<actuator name="base_left_wheel_motor">
|
||||
<hardwareInterface>EffortJointInterface</hardwareInterface>
|
||||
<mechanicalReduction>75.0676691729</mechanicalReduction>
|
||||
</actuator>
|
||||
</transmission>
|
||||
<gazebo reference="p3dx_left_hubcap">
|
||||
<material>Gazebo/Yellow</material>
|
||||
</gazebo>
|
||||
<gazebo reference="p3dx_left_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>0.5</mu1>
|
||||
<mu2>50.0</mu2>
|
||||
<kp>100000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
<link name="p3dx_right_wheel">
|
||||
<inertial>
|
||||
<mass value="0.5"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/right_wheel.stl"/>
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="-1.57079635 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<!--<mesh filename="package://p3dx_description/meshes/${suffix}_wheel.stl"/> -->
|
||||
<cylinder length="0.01" radius="0.09"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_right_hubcap_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<parent link="p3dx_right_wheel"/>
|
||||
<child link="p3dx_right_hubcap"/>
|
||||
</joint>
|
||||
<link name="p3dx_right_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428" iyz="0" izz="0.011763977943"/>
|
||||
</inertial>
|
||||
<visual name="base_visual">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/right_hubcap.stl"/>
|
||||
</geometry>
|
||||
<material name="HubcapYellow">
|
||||
<color rgba="1.0 0.811 0.151 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_right_wheel_joint" type="fixed">
|
||||
<!--<axis xyz="0 1 0"/>
|
||||
<anchor xyz="0 0 0"/>
|
||||
<limit effort="100" velocity="100"/>
|
||||
<joint_properties damping="0.0" friction="0.0"/>-->
|
||||
<origin rpy="0 0 0" xyz="0 -0.158 0.091"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="p3dx_right_wheel"/>
|
||||
</joint>
|
||||
<transmission name="base_link_right_wheel_trans">
|
||||
<type>pr2_mechanism_model/SimpleTransmission</type>
|
||||
<joint name="base_right_wheel_joint"/>
|
||||
<actuator name="base_right_wheel_motor">
|
||||
<hardwareInterface>EffortJointInterface</hardwareInterface>
|
||||
<mechanicalReduction>-75.0676691729</mechanicalReduction>
|
||||
</actuator>
|
||||
</transmission>
|
||||
<gazebo reference="p3dx_right_hubcap">
|
||||
<material>Gazebo/Yellow</material>
|
||||
</gazebo>
|
||||
<gazebo reference="p3dx_right_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>0.5</mu1>
|
||||
<mu2>50.0</mu2>
|
||||
<kp>100000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
<!-- front_sonar -->
|
||||
<link name="front_sonar">
|
||||
<inertial>
|
||||
<mass value="0.0001"/>
|
||||
<origin xyz="0 0 0"/>
|
||||
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
|
||||
</inertial>
|
||||
<visual name="front_sonar_vis">
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/front_sonar.stl"/>
|
||||
</geometry>
|
||||
<material name="SonarYellow">
|
||||
<color rgba="0.715 0.583 0.210 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0 0 0"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="base_front_joint" type="fixed">
|
||||
<origin rpy="0 0 0" xyz="0.109 0 0.209"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="front_sonar"/>
|
||||
</joint>
|
||||
<!-- lms100 laser -->
|
||||
<link name="lms100">
|
||||
<inertial>
|
||||
<mass value="1e-5"/>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/>
|
||||
</inertial>
|
||||
<visual>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="package://p3dx_description/meshes/lms100.dae"/>
|
||||
</geometry>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin rpy="0 0 0" xyz="0 0 0"/>
|
||||
<geometry>
|
||||
<box size="0.1 0.1 0.1"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
<joint name="lms100_joint" type="fixed">
|
||||
<axis xyz="0 1 0"/>
|
||||
<origin rpy="0 0 0" xyz="0.16 0 0.15"/>
|
||||
<parent link="base_link"/>
|
||||
<child link="lms100"/>
|
||||
</joint>
|
||||
</robot>
|
||||
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
This is the xacro description of a wheel of the Pioneer 3DX.
|
||||
Copyright (C) 2013 Rafael Berkvens rafael.berkvens@uantwerpen.be
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This project is based on work by Tracy Davies, where it was in turn based on
|
||||
work original in ucs-ros-pkg.
|
||||
-->
|
||||
|
||||
<robot xmlns:xacro="http://ros.org/wiki/xacro">
|
||||
|
||||
<!-- properties (constants) -->
|
||||
<property name="M_PI" value="3.14159" />
|
||||
|
||||
<!-- right/left hubcap + wheel -->
|
||||
<xacro:macro name="p3dx_wheel" params="suffix parent reflect">
|
||||
|
||||
<!-- wheel -->
|
||||
<link name="p3dx_${suffix}_wheel">
|
||||
<inertial>
|
||||
<mass value="0.5" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428"
|
||||
iyz="0" izz="0.011763977943" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/${suffix}_wheel.stl" />
|
||||
</geometry>
|
||||
<material name="WheelBlack">
|
||||
<color rgba="0.117 0.117 0.117 1" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="${-3.1415927/2} 0 0" />
|
||||
<geometry>
|
||||
<!--<mesh filename="package://p3dx_description/meshes/${suffix}_wheel.stl"/> -->
|
||||
<cylinder radius="0.09" length="0.01" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_${suffix}_hubcap_joint" type="fixed">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<parent link="p3dx_${suffix}_wheel" />
|
||||
<child link="p3dx_${suffix}_hubcap" />
|
||||
</joint>
|
||||
|
||||
<!-- hubcap -->
|
||||
<link name="p3dx_${suffix}_hubcap">
|
||||
<inertial>
|
||||
<mass value="0.01" />
|
||||
<origin xyz="0 0 0" />
|
||||
<inertia ixx="0.012411765597" ixy="0" ixz="0" iyy="0.015218160428"
|
||||
iyz="0" izz="0.011763977943" />
|
||||
</inertial>
|
||||
|
||||
<visual name="base_visual">
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry name="pioneer_geom">
|
||||
<mesh filename="package://p3dx_description/meshes/${suffix}_hubcap.stl" />
|
||||
</geometry>
|
||||
|
||||
<material name="HubcapYellow">
|
||||
<color rgba="1.0 0.811 0.151 1.0" />
|
||||
</material>
|
||||
</visual>
|
||||
|
||||
<collision>
|
||||
<origin xyz="0 0 0" rpy="0 0 0" />
|
||||
<geometry>
|
||||
<box size="0 0 0" />
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base_${suffix}_wheel_joint" type="continuous">
|
||||
<axis xyz="0 1 0" />
|
||||
<anchor xyz="0 0 0" />
|
||||
<limit effort="100" velocity="100" />
|
||||
<joint_properties damping="0.0" friction="0.0" />
|
||||
<origin xyz="0 ${reflect*0.158} 0.091" rpy="0 0 0" />
|
||||
<parent link="base_link" />
|
||||
<child link="p3dx_${suffix}_wheel" />
|
||||
</joint>
|
||||
|
||||
<!-- gazebo elements -->
|
||||
|
||||
<transmission name="${parent}_${suffix}_wheel_trans">
|
||||
<type>pr2_mechanism_model/SimpleTransmission</type>
|
||||
<joint name="base_${suffix}_wheel_joint" />
|
||||
<actuator name="base_${suffix}_wheel_motor">
|
||||
<hardwareInterface>EffortJointInterface</hardwareInterface>
|
||||
<mechanicalReduction>${reflect * 624/35 * 80/19}</mechanicalReduction>
|
||||
</actuator>
|
||||
</transmission>
|
||||
|
||||
<gazebo reference="p3dx_${suffix}_hubcap">
|
||||
<material>Gazebo/Yellow</material>
|
||||
</gazebo>
|
||||
|
||||
<gazebo reference="p3dx_${suffix}_wheel">
|
||||
<material>Gazebo/Black</material>
|
||||
<mu1>0.5</mu1>
|
||||
<mu2>50.0</mu2>
|
||||
<kp>100000000.0</kp>
|
||||
<kd>1.0</kd>
|
||||
</gazebo>
|
||||
|
||||
</xacro:macro>
|
||||
|
||||
</robot>
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(p3dx_navigation)
|
||||
|
||||
## 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)
|
||||
|
||||
## 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 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 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 ...)
|
||||
## * 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
|
||||
# )
|
||||
|
||||
################################################
|
||||
## 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 exec_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 p3dx_navigation
|
||||
# CATKIN_DEPENDS other_catkin_pkg
|
||||
# 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}/p3dx_navigation.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(${PROJECT_NAME}_node src/p3dx_navigation_node.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(${PROJECT_NAME}_node
|
||||
# ${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
|
||||
# catkin_install_python(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
|
||||
# install(TARGETS ${PROJECT_NAME}_node
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark libraries for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
|
||||
# install(TARGETS ${PROJECT_NAME}
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_GLOBAL_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_p3dx_navigation.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)
|
||||
@@ -0,0 +1,46 @@
|
||||
<launch>
|
||||
<!-- Arguments -->
|
||||
<arg name="scan_topic" default="scan"/>
|
||||
<arg name="initial_pose_x" default="0.0"/>
|
||||
<arg name="initial_pose_y" default="0.0"/>
|
||||
<arg name="initial_pose_a" default="0.0"/>
|
||||
|
||||
<!-- AMCL -->
|
||||
<node pkg="amcl" type="amcl" name="amcl">
|
||||
|
||||
<param name="min_particles" value="500"/>
|
||||
<param name="max_particles" value="3000"/>
|
||||
<param name="kld_err" value="0.02"/>
|
||||
<param name="update_min_d" value="0.20"/>
|
||||
<param name="update_min_a" value="0.20"/>
|
||||
<param name="resample_interval" value="1"/>
|
||||
<param name="transform_tolerance" value="0.5"/>
|
||||
<param name="recovery_alpha_slow" value="0.00"/>
|
||||
<param name="recovery_alpha_fast" value="0.00"/>
|
||||
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
|
||||
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
|
||||
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
|
||||
<param name="gui_publish_rate" value="50.0"/>
|
||||
|
||||
<remap from="scan" to="$(arg scan_topic)"/>
|
||||
<param name="laser_max_range" value="3.5"/>
|
||||
<param name="laser_max_beams" value="180"/>
|
||||
<param name="laser_z_hit" value="0.5"/>
|
||||
<param name="laser_z_short" value="0.05"/>
|
||||
<param name="laser_z_max" value="0.05"/>
|
||||
<param name="laser_z_rand" value="0.5"/>
|
||||
<param name="laser_sigma_hit" value="0.2"/>
|
||||
<param name="laser_lambda_short" value="0.1"/>
|
||||
<param name="laser_likelihood_max_dist" value="2.0"/>
|
||||
<param name="laser_model_type" value="likelihood_field"/>
|
||||
|
||||
<param name="odom_model_type" value="diff"/>
|
||||
<param name="odom_alpha1" value="0.1"/>
|
||||
<param name="odom_alpha2" value="0.1"/>
|
||||
<param name="odom_alpha3" value="0.1"/>
|
||||
<param name="odom_alpha4" value="0.1"/>
|
||||
<param name="odom_frame_id" value="odom"/>
|
||||
<param name="base_frame_id" value="base_link"/>
|
||||
|
||||
</node>
|
||||
</launch>
|
||||
@@ -0,0 +1,21 @@
|
||||
<launch>
|
||||
<!-- Arguments -->
|
||||
<arg name="model" default="waffle_pi" doc="model type [burger, waffle, waffle_pi]"/>
|
||||
<arg name="cmd_vel_topic" default="/cmd_vel" />
|
||||
<arg name="odom_topic" default="/odom" />
|
||||
<arg name="move_forward_only" default="false"/>
|
||||
|
||||
<!-- move_base -->
|
||||
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
|
||||
<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
|
||||
<rosparam file="$(find p3dx_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="global_costmap" />
|
||||
<rosparam file="$(find p3dx_navigation)/param/costmap_common_params_$(arg model).yaml" command="load" ns="local_costmap" />
|
||||
<rosparam file="$(find p3dx_navigation)/param/local_costmap_params.yaml" command="load" />
|
||||
<rosparam file="$(find p3dx_navigation)/param/global_costmap_params.yaml" command="load" />
|
||||
<rosparam file="$(find p3dx_navigation)/param/move_base_params.yaml" command="load" />
|
||||
<rosparam file="$(find p3dx_navigation)/param/dwa_local_planner_params_$(arg model).yaml" command="load" />
|
||||
<remap from="cmd_vel" to="$(arg cmd_vel_topic)"/>
|
||||
<remap from="odom" to="$(arg odom_topic)"/>
|
||||
<param name="DWAPlannerROS/min_vel_x" value="0.0" if="$(arg move_forward_only)" />
|
||||
</node>
|
||||
</launch>
|
||||
@@ -0,0 +1,30 @@
|
||||
<launch>
|
||||
<!-- Arguments -->
|
||||
<arg name="model" default="waffle_pi" doc="model type [burger, waffle, waffle_pi]"/>
|
||||
<arg name="map_file" default="$(find turtlebot3_navigation)/maps/map.yaml"/>
|
||||
<arg name="open_rviz" default="true"/>
|
||||
<arg name="move_forward_only" default="true"/>
|
||||
|
||||
<!-- Turtlebot3 -->
|
||||
<!-- include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
|
||||
<arg name="model" value="$(arg model)"/>
|
||||
</include -->
|
||||
|
||||
<!-- Map server -->
|
||||
<node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)"/>
|
||||
|
||||
<!-- AMCL -->
|
||||
<include file="$(find p3dx_navigation)/launch/amcl.launch"/>
|
||||
|
||||
<!-- move_base -->
|
||||
<include file="$(find p3dx_navigation)/launch/move_base.launch">
|
||||
<arg name="model" value="$(arg model)" />
|
||||
<arg name="move_forward_only" value="$(arg move_forward_only)"/>
|
||||
</include>
|
||||
|
||||
<!-- rviz -->
|
||||
<group if="$(arg open_rviz)">
|
||||
<node pkg="rviz" type="rviz" name="rviz" required="true"
|
||||
args="-d $(find p3dx_navigation)/rviz/p3dx_navigation.rviz"/>
|
||||
</group>
|
||||
</launch>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>p3dx_navigation</name>
|
||||
<version>0.0.0</version>
|
||||
<description>The p3dx_navigation package</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
|
||||
<maintainer email="ryken@todo.todo">ryken</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>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/p3dx_navigation</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, multiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintainers, but could be -->
|
||||
<!-- Example: -->
|
||||
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
|
||||
|
||||
|
||||
<!-- 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 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>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<!-- Other tools can request additional information be placed here -->
|
||||
|
||||
</export>
|
||||
</package>
|
||||
@@ -0,0 +1,26 @@
|
||||
TrajectoryPlannerROS:
|
||||
|
||||
# Robot Configuration Parameters
|
||||
max_vel_x: 0.18
|
||||
min_vel_x: 0.08
|
||||
|
||||
max_vel_theta: 1.0
|
||||
min_vel_theta: -1.0
|
||||
min_in_place_vel_theta: 1.0
|
||||
|
||||
acc_lim_x: 1.0
|
||||
acc_lim_y: 0.0
|
||||
acc_lim_theta: 0.6
|
||||
|
||||
# Goal Tolerance Parameters
|
||||
xy_goal_tolerance: 0.10
|
||||
yaw_goal_tolerance: 0.05
|
||||
|
||||
# Differential-drive robot configuration
|
||||
holonomic_robot: false
|
||||
|
||||
# Forward Simulation Parameters
|
||||
sim_time: 0.8
|
||||
vx_samples: 18
|
||||
vtheta_samples: 20
|
||||
sim_granularity: 0.05
|
||||
@@ -0,0 +1,12 @@
|
||||
obstacle_range: 3.0
|
||||
raytrace_range: 3.5
|
||||
|
||||
footprint: [[-0.205, -0.155], [-0.205, 0.155], [0.077, 0.155], [0.077, -0.155]]
|
||||
#robot_radius: 0.17
|
||||
|
||||
inflation_radius: 1.0
|
||||
cost_scaling_factor: 3.0
|
||||
|
||||
map_type: costmap
|
||||
observation_sources: scan
|
||||
scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}
|
||||
@@ -0,0 +1,47 @@
|
||||
DWAPlannerROS:
|
||||
|
||||
# Robot Configuration Parameters
|
||||
max_vel_x: 0.26
|
||||
min_vel_x: -0.26
|
||||
|
||||
max_vel_y: 0.0
|
||||
min_vel_y: 0.0
|
||||
|
||||
# The velocity when robot is moving in a straight line
|
||||
max_vel_trans: 0.26
|
||||
min_vel_trans: 0.13
|
||||
|
||||
max_vel_theta: 1.82
|
||||
min_vel_theta: 0.9
|
||||
|
||||
acc_lim_x: 2.5
|
||||
acc_lim_y: 0.0
|
||||
acc_lim_theta: 3.2
|
||||
|
||||
# Goal Tolerance Parametes
|
||||
xy_goal_tolerance: 0.05
|
||||
yaw_goal_tolerance: 0.17
|
||||
latch_xy_goal_tolerance: false
|
||||
|
||||
# Forward Simulation Parameters
|
||||
sim_time: 2.0
|
||||
vx_samples: 20
|
||||
vy_samples: 0
|
||||
vth_samples: 40
|
||||
controller_frequency: 10.0
|
||||
|
||||
# Trajectory Scoring Parameters
|
||||
path_distance_bias: 32.0
|
||||
goal_distance_bias: 20.0
|
||||
occdist_scale: 0.02
|
||||
forward_point_distance: 0.325
|
||||
stop_time_buffer: 0.2
|
||||
scaling_speed: 0.25
|
||||
max_scaling_factor: 0.2
|
||||
|
||||
# Oscillation Prevention Parameters
|
||||
oscillation_reset_dist: 0.05
|
||||
|
||||
# Debugging
|
||||
publish_traj_pc : true
|
||||
publish_cost_grid_pc: true
|
||||
@@ -0,0 +1,10 @@
|
||||
global_costmap:
|
||||
global_frame: map
|
||||
robot_base_frame: base_link
|
||||
|
||||
update_frequency: 10.0
|
||||
publish_frequency: 10.0
|
||||
transform_tolerance: 0.5
|
||||
|
||||
static_map: true
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
local_costmap:
|
||||
global_frame: odom
|
||||
robot_base_frame: base_link
|
||||
|
||||
update_frequency: 10.0
|
||||
publish_frequency: 10.0
|
||||
transform_tolerance: 0.5
|
||||
|
||||
static_map: false
|
||||
rolling_window: true
|
||||
width: 3
|
||||
height: 3
|
||||
resolution: 0.05
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
shutdown_costmaps: false
|
||||
controller_frequency: 10.0
|
||||
planner_patience: 5.0
|
||||
controller_patience: 15.0
|
||||
conservative_reset_dist: 3.0
|
||||
planner_frequency: 5.0
|
||||
oscillation_timeout: 10.0
|
||||
oscillation_distance: 0.2
|
||||
|
||||
@@ -0,0 +1,426 @@
|
||||
Panels:
|
||||
- Class: rviz/Displays
|
||||
Help Height: 0
|
||||
Name: Displays
|
||||
Property Tree Widget:
|
||||
Expanded:
|
||||
- /TF1/Frames1
|
||||
- /TF1/Tree1
|
||||
- /Global Map1/Costmap1
|
||||
- /Global Map1/Planner1
|
||||
- /Local Map1/Polygon1
|
||||
- /Local Map1/Costmap1
|
||||
- /Local Map1/Planner1
|
||||
Splitter Ratio: 0.5
|
||||
Tree Height: 231
|
||||
- Class: rviz/Selection
|
||||
Name: Selection
|
||||
- Class: rviz/Tool Properties
|
||||
Expanded:
|
||||
- /2D Pose Estimate1
|
||||
- /2D Nav Goal1
|
||||
- /Waypoints1
|
||||
Name: Tool Properties
|
||||
Splitter Ratio: 0.5886790156364441
|
||||
- Class: rviz/Views
|
||||
Expanded:
|
||||
- /Current View1
|
||||
Name: Views
|
||||
Splitter Ratio: 0.5
|
||||
- Class: rviz/Time
|
||||
Name: Time
|
||||
SyncMode: 0
|
||||
SyncSource: LaserScan
|
||||
- Class: rviz/Tool Properties
|
||||
Expanded:
|
||||
- /Waypoints1
|
||||
Name: Tool Properties
|
||||
Splitter Ratio: 0.5
|
||||
- Class: waypoints/waypointPanel
|
||||
Name: waypointPanel
|
||||
- Class: waypoints/waypointPanel
|
||||
Name: waypointPanel
|
||||
- Class: waypoints/waypointPanel
|
||||
Name: waypointPanel
|
||||
Preferences:
|
||||
PromptSaveOnExit: true
|
||||
Toolbars:
|
||||
toolButtonStyle: 2
|
||||
Visualization Manager:
|
||||
Class: ""
|
||||
Displays:
|
||||
- Alpha: 0.5
|
||||
Cell Size: 1
|
||||
Class: rviz/Grid
|
||||
Color: 160; 160; 164
|
||||
Enabled: true
|
||||
Line Style:
|
||||
Line Width: 0.029999999329447746
|
||||
Value: Lines
|
||||
Name: Grid
|
||||
Normal Cell Count: 0
|
||||
Offset:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
Plane: XY
|
||||
Plane Cell Count: 42
|
||||
Reference Frame: <Fixed Frame>
|
||||
Value: true
|
||||
- Class: rviz/TF
|
||||
Enabled: false
|
||||
Filter (blacklist): ""
|
||||
Filter (whitelist): ""
|
||||
Frame Timeout: 15
|
||||
Frames:
|
||||
All Enabled: false
|
||||
Marker Alpha: 1
|
||||
Marker Scale: 1
|
||||
Name: TF
|
||||
Show Arrows: true
|
||||
Show Axes: true
|
||||
Show Names: false
|
||||
Tree:
|
||||
{}
|
||||
Update Interval: 0
|
||||
Value: false
|
||||
- Alpha: 1
|
||||
Autocompute Intensity Bounds: true
|
||||
Autocompute Value Bounds:
|
||||
Max Value: 10
|
||||
Min Value: -10
|
||||
Value: true
|
||||
Axis: Z
|
||||
Channel Name: intensity
|
||||
Class: rviz/LaserScan
|
||||
Color: 0; 255; 0
|
||||
Color Transformer: FlatColor
|
||||
Decay Time: 0
|
||||
Enabled: true
|
||||
Invert Rainbow: false
|
||||
Max Color: 255; 255; 255
|
||||
Min Color: 0; 0; 0
|
||||
Name: LaserScan
|
||||
Position Transformer: XYZ
|
||||
Queue Size: 10
|
||||
Selectable: true
|
||||
Size (Pixels): 3
|
||||
Size (m): 0.030000001192092896
|
||||
Style: Flat Squares
|
||||
Topic: /scan
|
||||
Unreliable: false
|
||||
Use Fixed Frame: true
|
||||
Use rainbow: true
|
||||
Value: true
|
||||
- Alpha: 0.699999988079071
|
||||
Class: rviz/Map
|
||||
Color Scheme: map
|
||||
Draw Behind: false
|
||||
Enabled: true
|
||||
Name: Map
|
||||
Topic: /map
|
||||
Unreliable: false
|
||||
Use Timestamp: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Buffer Length: 1
|
||||
Class: rviz/Path
|
||||
Color: 0; 0; 0
|
||||
Enabled: true
|
||||
Head Diameter: 0.30000001192092896
|
||||
Head Length: 0.20000000298023224
|
||||
Length: 0.30000001192092896
|
||||
Line Style: Lines
|
||||
Line Width: 0.029999999329447746
|
||||
Name: Planner Plan
|
||||
Offset:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
Pose Color: 255; 85; 255
|
||||
Pose Style: None
|
||||
Queue Size: 10
|
||||
Radius: 0.029999999329447746
|
||||
Shaft Diameter: 0.10000000149011612
|
||||
Shaft Length: 0.10000000149011612
|
||||
Topic: /move_base/NavfnROS/plan
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Class: rviz/Group
|
||||
Displays:
|
||||
- Alpha: 0.699999988079071
|
||||
Class: rviz/Map
|
||||
Color Scheme: costmap
|
||||
Draw Behind: true
|
||||
Enabled: true
|
||||
Name: Costmap
|
||||
Topic: /move_base/global_costmap/costmap
|
||||
Unreliable: false
|
||||
Use Timestamp: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Buffer Length: 1
|
||||
Class: rviz/Path
|
||||
Color: 255; 0; 0
|
||||
Enabled: true
|
||||
Head Diameter: 0.30000001192092896
|
||||
Head Length: 0.20000000298023224
|
||||
Length: 0.30000001192092896
|
||||
Line Style: Lines
|
||||
Line Width: 0.029999999329447746
|
||||
Name: Planner
|
||||
Offset:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
Pose Color: 255; 85; 255
|
||||
Pose Style: None
|
||||
Queue Size: 10
|
||||
Radius: 0.029999999329447746
|
||||
Shaft Diameter: 0.10000000149011612
|
||||
Shaft Length: 0.10000000149011612
|
||||
Topic: /move_base/DWAPlannerROS/global_plan
|
||||
Unreliable: false
|
||||
Value: true
|
||||
Enabled: true
|
||||
Name: Global Map
|
||||
- Class: rviz/Group
|
||||
Displays:
|
||||
- Alpha: 1
|
||||
Class: rviz/Polygon
|
||||
Color: 0; 0; 0
|
||||
Enabled: true
|
||||
Name: Polygon
|
||||
Queue Size: 10
|
||||
Topic: /move_base/local_costmap/footprint
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 0.699999988079071
|
||||
Class: rviz/Map
|
||||
Color Scheme: costmap
|
||||
Draw Behind: false
|
||||
Enabled: true
|
||||
Name: Costmap
|
||||
Topic: /move_base/local_costmap/costmap
|
||||
Unreliable: false
|
||||
Use Timestamp: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Buffer Length: 1
|
||||
Class: rviz/Path
|
||||
Color: 255; 255; 0
|
||||
Enabled: true
|
||||
Head Diameter: 0.30000001192092896
|
||||
Head Length: 0.20000000298023224
|
||||
Length: 0.30000001192092896
|
||||
Line Style: Lines
|
||||
Line Width: 0.029999999329447746
|
||||
Name: Planner
|
||||
Offset:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
Pose Color: 255; 85; 255
|
||||
Pose Style: None
|
||||
Queue Size: 10
|
||||
Radius: 0.029999999329447746
|
||||
Shaft Diameter: 0.10000000149011612
|
||||
Shaft Length: 0.10000000149011612
|
||||
Topic: /move_base/DWAPlannerROS/local_plan
|
||||
Unreliable: false
|
||||
Value: true
|
||||
Enabled: true
|
||||
Name: Local Map
|
||||
- Alpha: 1
|
||||
Arrow Length: 0.05000000074505806
|
||||
Axes Length: 0.30000001192092896
|
||||
Axes Radius: 0.009999999776482582
|
||||
Class: rviz/PoseArray
|
||||
Color: 0; 192; 0
|
||||
Enabled: true
|
||||
Head Length: 0.07000000029802322
|
||||
Head Radius: 0.029999999329447746
|
||||
Name: Amcl Particles
|
||||
Queue Size: 10
|
||||
Shaft Length: 0.23000000417232513
|
||||
Shaft Radius: 0.009999999776482582
|
||||
Shape: Arrow (Flat)
|
||||
Topic: /particlecloud
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Axes Length: 1
|
||||
Axes Radius: 0.10000000149011612
|
||||
Class: rviz/Pose
|
||||
Color: 255; 25; 0
|
||||
Enabled: true
|
||||
Head Length: 0.30000001192092896
|
||||
Head Radius: 0.10000000149011612
|
||||
Name: Goal
|
||||
Queue Size: 10
|
||||
Shaft Length: 0.5
|
||||
Shaft Radius: 0.05000000074505806
|
||||
Shape: Arrow
|
||||
Topic: /move_base_simple/goal
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Axes Length: 1
|
||||
Axes Radius: 0.10000000149011612
|
||||
Class: rviz/PoseWithCovariance
|
||||
Color: 255; 25; 0
|
||||
Covariance:
|
||||
Orientation:
|
||||
Alpha: 0.5
|
||||
Color: 255; 255; 127
|
||||
Color Style: Unique
|
||||
Frame: Local
|
||||
Offset: 1
|
||||
Scale: 1
|
||||
Value: true
|
||||
Position:
|
||||
Alpha: 0.30000001192092896
|
||||
Color: 204; 51; 204
|
||||
Scale: 1
|
||||
Value: true
|
||||
Value: true
|
||||
Enabled: true
|
||||
Head Length: 0.30000001192092896
|
||||
Head Radius: 0.10000000149011612
|
||||
Name: PoseWithCovariance
|
||||
Queue Size: 10
|
||||
Shaft Length: 1
|
||||
Shaft Radius: 0.05000000074505806
|
||||
Shape: Arrow
|
||||
Topic: /amcl_pose
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Arrow Length: 0.30000001192092896
|
||||
Axes Length: 0.30000001192092896
|
||||
Axes Radius: 0.009999999776482582
|
||||
Class: rviz/PoseArray
|
||||
Color: 255; 25; 0
|
||||
Enabled: true
|
||||
Head Length: 0.07000000029802322
|
||||
Head Radius: 0.029999999329447746
|
||||
Name: PoseArray
|
||||
Queue Size: 10
|
||||
Shaft Length: 0.23000000417232513
|
||||
Shaft Radius: 0.009999999776482582
|
||||
Shape: Arrow (Flat)
|
||||
Topic: /particlecloud
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 0.699999988079071
|
||||
Class: rviz/Map
|
||||
Color Scheme: map
|
||||
Draw Behind: false
|
||||
Enabled: true
|
||||
Name: Map
|
||||
Topic: /move_base/local_costmap/costmap
|
||||
Unreliable: false
|
||||
Use Timestamp: false
|
||||
Value: true
|
||||
- Class: rviz/Image
|
||||
Enabled: false
|
||||
Image Topic: /astra/rgb/image_raw
|
||||
Max Value: 1
|
||||
Median window: 5
|
||||
Min Value: 0
|
||||
Name: Image
|
||||
Normalize Range: true
|
||||
Queue Size: 2
|
||||
Transport Hint: compressed
|
||||
Unreliable: false
|
||||
Value: false
|
||||
- Class: rviz/Image
|
||||
Enabled: true
|
||||
Image Topic: /darknet_ros/detection_image
|
||||
Max Value: 1
|
||||
Median window: 5
|
||||
Min Value: 0
|
||||
Name: Image
|
||||
Normalize Range: true
|
||||
Queue Size: 2
|
||||
Transport Hint: raw
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Axes Length: 1
|
||||
Axes Radius: 0.10000000149011612
|
||||
Class: rviz/Pose
|
||||
Color: 255; 25; 0
|
||||
Enabled: true
|
||||
Head Length: 0.30000001192092896
|
||||
Head Radius: 0.10000000149011612
|
||||
Name: Pose
|
||||
Queue Size: 10
|
||||
Shaft Length: 1
|
||||
Shaft Radius: 0.05000000074505806
|
||||
Shape: Arrow
|
||||
Topic: /move_base_simple/goal
|
||||
Unreliable: false
|
||||
Value: true
|
||||
Enabled: true
|
||||
Global Options:
|
||||
Background Color: 48; 48; 48
|
||||
Default Light: true
|
||||
Fixed Frame: map
|
||||
Frame Rate: 30
|
||||
Name: root
|
||||
Tools:
|
||||
- Class: rviz/MoveCamera
|
||||
- Class: rviz/Interact
|
||||
Hide Inactive Objects: true
|
||||
- Class: rviz/Select
|
||||
- Class: rviz/SetInitialPose
|
||||
Theta std deviation: 0.2617993950843811
|
||||
Topic: /initialpose
|
||||
X std deviation: 0.5
|
||||
Y std deviation: 0.5
|
||||
- Class: rviz/SetGoal
|
||||
Topic: /move_base_simple/goal
|
||||
- Class: rviz/Measure
|
||||
- Class: waypoints/Waypoints
|
||||
Topic: waypoint
|
||||
Value: true
|
||||
Views:
|
||||
Current:
|
||||
Angle: -1.5307965278625488
|
||||
Class: rviz/TopDownOrtho
|
||||
Enable Stereo Rendering:
|
||||
Stereo Eye Separation: 0.05999999865889549
|
||||
Stereo Focal Distance: 1
|
||||
Swap Stereo Eyes: false
|
||||
Value: false
|
||||
Invert Z Axis: false
|
||||
Name: Current View
|
||||
Near Clip Distance: 0.009999999776482582
|
||||
Scale: 70.76335906982422
|
||||
Target Frame: <Fixed Frame>
|
||||
X: -0.1558832973241806
|
||||
Y: 1.6944838762283325
|
||||
Saved: ~
|
||||
Window Geometry:
|
||||
Displays:
|
||||
collapsed: false
|
||||
Height: 1016
|
||||
Hide Left Dock: false
|
||||
Hide Right Dock: true
|
||||
Image:
|
||||
collapsed: false
|
||||
QMainWindow State: 000000ff00000000fd00000004000000000000021f0000039efc0200000010fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000124000000c900fffffffb0000000a0049006d0061006700650000000119000000ef0000001600fffffffb0000000a0049006d0061006700650100000167000000a00000001600fffffffb0000000a0049006d00610067006500000001130000008e0000000000000000fb0000000a0049006d00610067006501000001e1000000bf0000000000000000fb0000000a0049006d00610067006500000001a5000000ca0000000000000000fb0000000a0049006d00610067006501000002a6000001350000000000000000fb0000001e0054006f006f006c002000500072006f0070006500720074006900650073000000032e000000ad0000005c00fffffffb0000000a0049006d00610067006501000002a10000013a0000000000000000fb0000001a0077006100790070006f0069006e007400500061006e0065006c0000000369000000720000001600fffffffb0000001a0077006100790070006f0069006e007400500061006e0065006c0000000254000001870000001600fffffffb0000001a0077006100790070006f0069006e007400500061006e0065006c010000020d000001ce0000001600ffffff000000010000010f0000039efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d0000039e000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004a00000003efc0100000002fb0000000800540069006d00650000000000000004a00000041800fffffffb0000000800540069006d00650100000000000004500000000000000000000002450000039e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
|
||||
Selection:
|
||||
collapsed: false
|
||||
Time:
|
||||
collapsed: false
|
||||
Tool Properties:
|
||||
collapsed: false
|
||||
Views:
|
||||
collapsed: true
|
||||
Width: 1130
|
||||
X: 72
|
||||
Y: 27
|
||||
waypointPanel:
|
||||
collapsed: false
|
||||
@@ -0,0 +1,202 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(p3dx_slam)
|
||||
|
||||
## 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)
|
||||
|
||||
## 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 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 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 ...)
|
||||
## * 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
|
||||
# )
|
||||
|
||||
################################################
|
||||
## 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 exec_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 p3dx_slam
|
||||
# CATKIN_DEPENDS other_catkin_pkg
|
||||
# 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}/p3dx_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(${PROJECT_NAME}_node src/p3dx_slam_node.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(${PROJECT_NAME}_node
|
||||
# ${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
|
||||
# catkin_install_python(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
|
||||
# install(TARGETS ${PROJECT_NAME}_node
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark libraries for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
|
||||
# install(TARGETS ${PROJECT_NAME}
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_GLOBAL_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_p3dx_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)
|
||||
@@ -0,0 +1,29 @@
|
||||
map_update_interval: 2.0
|
||||
maxUrange: 20.0
|
||||
sigma: 0.05
|
||||
kernelSize: 1
|
||||
lstep: 0.05
|
||||
astep: 0.05
|
||||
iterations: 5
|
||||
lsigma: 0.075
|
||||
ogain: 3.0
|
||||
lskip: 0
|
||||
minimumScore: 50
|
||||
srr: 0.1
|
||||
srt: 0.2
|
||||
str: 0.1
|
||||
stt: 0.2
|
||||
linearUpdate: 1.0
|
||||
angularUpdate: 0.2
|
||||
temporalUpdate: 0.5
|
||||
resampleThreshold: 0.5
|
||||
particles: 100
|
||||
xmin: -10.0
|
||||
ymin: -10.0
|
||||
xmax: 10.0
|
||||
ymax: 10.0
|
||||
delta: 0.05
|
||||
llsamplerange: 0.01
|
||||
llsamplestep: 0.01
|
||||
lasamplerange: 0.005
|
||||
lasamplestep: 0.005
|
||||
@@ -0,0 +1,16 @@
|
||||
<launch>
|
||||
<!-- Arguments -->
|
||||
<arg name="model" default="waffle_pi" doc="model type [burger, waffle, waffle_pi]"/>
|
||||
<arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>
|
||||
<arg name="set_base_frame" default="base_link"/>
|
||||
<arg name="set_odom_frame" default="odom"/>
|
||||
<arg name="set_map_frame" default="map"/>
|
||||
|
||||
<!-- Gmapping -->
|
||||
<node pkg="gmapping" type="slam_gmapping" name="p3dx_slam_gmapping" output="screen">
|
||||
<param name="base_frame" value="$(arg set_base_frame)"/>
|
||||
<param name="odom_frame" value="$(arg set_odom_frame)"/>
|
||||
<param name="map_frame" value="$(arg set_map_frame)"/>
|
||||
<rosparam command="load" file="$(find p3dx_slam)/config/gmapping_params.yaml" />
|
||||
</node>
|
||||
</launch>
|
||||
@@ -0,0 +1,19 @@
|
||||
<launch>
|
||||
<!-- Arguments -->
|
||||
<arg name="model" default="waffle_pi" doc="model type [burger, waffle, waffle_pi]"/>
|
||||
<arg name="slam_methods" default="gmapping" doc="slam type [gmapping, cartographer, hector, karto, frontier_exploration]"/>
|
||||
<arg name="configuration_basename" default="turtlebot3_lds_2d.lua"/>
|
||||
<arg name="open_rviz" default="true"/>
|
||||
|
||||
<!-- SLAM: Gmapping, Cartographer, Hector, Karto, Frontier_exploration, RTAB-Map -->
|
||||
<include file="$(find p3dx_slam)/launch/p3dx_$(arg slam_methods).launch">
|
||||
<arg name="model" value="$(arg model)"/>
|
||||
<arg name="configuration_basename" value="$(arg configuration_basename)"/>
|
||||
</include>
|
||||
|
||||
<!-- rviz -->
|
||||
<group if="$(arg open_rviz)">
|
||||
<node pkg="rviz" type="rviz" name="rviz" required="true"
|
||||
args="-d $(find p3dx_slam)/rviz/p3dx_$(arg slam_methods).rviz"/>
|
||||
</group>
|
||||
</launch>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>p3dx_slam</name>
|
||||
<version>0.0.0</version>
|
||||
<description>The p3dx_slam package</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
|
||||
<maintainer email="ryken@todo.todo">ryken</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>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/p3dx_slam</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, multiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintainers, but could be -->
|
||||
<!-- Example: -->
|
||||
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
|
||||
|
||||
|
||||
<!-- 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 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>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<!-- Other tools can request additional information be placed here -->
|
||||
|
||||
</export>
|
||||
</package>
|
||||
@@ -0,0 +1,266 @@
|
||||
Panels:
|
||||
- Class: rviz/Displays
|
||||
Help Height: 78
|
||||
Name: Displays
|
||||
Property Tree Widget:
|
||||
Expanded:
|
||||
- /RobotModel1
|
||||
- /RobotModel1/Status1
|
||||
- /TF1/Frames1
|
||||
Splitter Ratio: 0.594406008720398
|
||||
Tree Height: 204
|
||||
- Class: rviz/Selection
|
||||
Name: Selection
|
||||
- Class: rviz/Tool Properties
|
||||
Expanded:
|
||||
- /2D Pose Estimate1
|
||||
- /2D Nav Goal1
|
||||
- /Publish Point1
|
||||
Name: Tool Properties
|
||||
Splitter Ratio: 0.5886790156364441
|
||||
- Class: rviz/Views
|
||||
Expanded:
|
||||
- /Current View1
|
||||
Name: Views
|
||||
Splitter Ratio: 0.5
|
||||
- Class: rviz/Time
|
||||
Name: Time
|
||||
SyncMode: 0
|
||||
SyncSource: LaserScan
|
||||
Preferences:
|
||||
PromptSaveOnExit: true
|
||||
Toolbars:
|
||||
toolButtonStyle: 2
|
||||
Visualization Manager:
|
||||
Class: ""
|
||||
Displays:
|
||||
- Alpha: 0.5
|
||||
Cell Size: 1
|
||||
Class: rviz/Grid
|
||||
Color: 160; 160; 164
|
||||
Enabled: true
|
||||
Line Style:
|
||||
Line Width: 0.029999999329447746
|
||||
Value: Lines
|
||||
Name: Grid
|
||||
Normal Cell Count: 0
|
||||
Offset:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
Plane: XY
|
||||
Plane Cell Count: 100
|
||||
Reference Frame: map
|
||||
Value: true
|
||||
- Alpha: 1
|
||||
Class: rviz/RobotModel
|
||||
Collision Enabled: false
|
||||
Enabled: true
|
||||
Links:
|
||||
All Links Enabled: true
|
||||
Expand Joint Details: false
|
||||
Expand Link Details: false
|
||||
Expand Tree: false
|
||||
Link Tree Style: Links in Alphabetic Order
|
||||
base_link:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
center_hubcap:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
center_wheel:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
front_sonar:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
lms100:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
p3dx_left_hubcap:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
p3dx_left_wheel:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
p3dx_right_hubcap:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
p3dx_right_wheel:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
swivel:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
top_plate:
|
||||
Alpha: 1
|
||||
Show Axes: false
|
||||
Show Trail: false
|
||||
Value: true
|
||||
Name: RobotModel
|
||||
Robot Description: robot_description
|
||||
TF Prefix: ""
|
||||
Update Interval: 0
|
||||
Value: true
|
||||
Visual Enabled: true
|
||||
- Class: rviz/TF
|
||||
Enabled: false
|
||||
Filter (blacklist): ""
|
||||
Filter (whitelist): ""
|
||||
Frame Timeout: 15
|
||||
Frames:
|
||||
All Enabled: true
|
||||
Marker Alpha: 1
|
||||
Marker Scale: 1
|
||||
Name: TF
|
||||
Show Arrows: true
|
||||
Show Axes: true
|
||||
Show Names: true
|
||||
Tree:
|
||||
{}
|
||||
Update Interval: 0
|
||||
Value: false
|
||||
- Alpha: 1
|
||||
Autocompute Intensity Bounds: true
|
||||
Autocompute Value Bounds:
|
||||
Max Value: 10
|
||||
Min Value: -10
|
||||
Value: true
|
||||
Axis: Z
|
||||
Channel Name: intensity
|
||||
Class: rviz/LaserScan
|
||||
Color: 0; 255; 0
|
||||
Color Transformer: FlatColor
|
||||
Decay Time: 0
|
||||
Enabled: true
|
||||
Invert Rainbow: false
|
||||
Max Color: 255; 255; 255
|
||||
Min Color: 0; 0; 0
|
||||
Name: LaserScan
|
||||
Position Transformer: XYZ
|
||||
Queue Size: 10
|
||||
Selectable: true
|
||||
Size (Pixels): 3
|
||||
Size (m): 0.030000001192092896
|
||||
Style: Flat Squares
|
||||
Topic: /scan
|
||||
Unreliable: false
|
||||
Use Fixed Frame: true
|
||||
Use rainbow: true
|
||||
Value: true
|
||||
- Class: rviz/Image
|
||||
Enabled: true
|
||||
Image Topic: /astra/rgb/image_raw
|
||||
Max Value: 1
|
||||
Median window: 5
|
||||
Min Value: 0
|
||||
Name: Image
|
||||
Normalize Range: true
|
||||
Queue Size: 2
|
||||
Transport Hint: compressed
|
||||
Unreliable: false
|
||||
Value: true
|
||||
- Alpha: 0.699999988079071
|
||||
Class: rviz/Map
|
||||
Color Scheme: map
|
||||
Draw Behind: false
|
||||
Enabled: true
|
||||
Name: Map
|
||||
Topic: /map
|
||||
Unreliable: false
|
||||
Use Timestamp: false
|
||||
Value: true
|
||||
- Class: rviz/Image
|
||||
Enabled: true
|
||||
Image Topic: /astra/depth_registered/image
|
||||
Max Value: 1
|
||||
Median window: 5
|
||||
Min Value: 0
|
||||
Name: Image
|
||||
Normalize Range: true
|
||||
Queue Size: 2
|
||||
Transport Hint: raw
|
||||
Unreliable: false
|
||||
Value: true
|
||||
Enabled: true
|
||||
Global Options:
|
||||
Background Color: 48; 48; 48
|
||||
Default Light: true
|
||||
Fixed Frame: map
|
||||
Frame Rate: 30
|
||||
Name: root
|
||||
Tools:
|
||||
- Class: rviz/Interact
|
||||
Hide Inactive Objects: true
|
||||
- Class: rviz/MoveCamera
|
||||
- Class: rviz/Select
|
||||
- Class: rviz/FocusCamera
|
||||
- Class: rviz/Measure
|
||||
- Class: rviz/SetInitialPose
|
||||
Theta std deviation: 0.2617993950843811
|
||||
Topic: /initialpose
|
||||
X std deviation: 0.5
|
||||
Y std deviation: 0.5
|
||||
- Class: rviz/SetGoal
|
||||
Topic: /move_base_simple/goal
|
||||
- Class: rviz/PublishPoint
|
||||
Single click: true
|
||||
Topic: /clicked_point
|
||||
Value: true
|
||||
Views:
|
||||
Current:
|
||||
Angle: -1.5707963705062866
|
||||
Class: rviz/TopDownOrtho
|
||||
Enable Stereo Rendering:
|
||||
Stereo Eye Separation: 0.05999999865889549
|
||||
Stereo Focal Distance: 1
|
||||
Swap Stereo Eyes: false
|
||||
Value: false
|
||||
Invert Z Axis: false
|
||||
Name: Current View
|
||||
Near Clip Distance: 0.009999999776482582
|
||||
Scale: -42.45056915283203
|
||||
Target Frame: map
|
||||
X: 0
|
||||
Y: 0
|
||||
Saved: ~
|
||||
Window Geometry:
|
||||
Displays:
|
||||
collapsed: false
|
||||
Height: 1016
|
||||
Hide Left Dock: false
|
||||
Hide Right Dock: true
|
||||
Image:
|
||||
collapsed: false
|
||||
QMainWindow State: 000000ff00000000fd0000000400000000000002e30000035afc020000000afb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000157000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d006100670065010000019a000000f00000001600fffffffb0000000a0049006d0061006700650100000290000001070000001600ffffff000000010000010f0000035cfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007300000000430000035c000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004ff0000003efc0100000002fb0000000800540069006d00650100000000000004ff000003bc00fffffffb0000000800540069006d00650100000000000004500000000000000000000002160000035a00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
|
||||
Selection:
|
||||
collapsed: false
|
||||
Time:
|
||||
collapsed: false
|
||||
Tool Properties:
|
||||
collapsed: false
|
||||
Views:
|
||||
collapsed: true
|
||||
Width: 1279
|
||||
X: 72
|
||||
Y: 27
|
||||
@@ -0,0 +1,31 @@
|
||||
# This config file for Travis CI utilizes ros-industrial/industrial_ci package.
|
||||
# For more info for the package, see https://github.com/ros-industrial/industrial_ci/blob/master/README.rst
|
||||
sudo: required
|
||||
dist: trusty
|
||||
services:
|
||||
- docker
|
||||
language: generic
|
||||
compiler:
|
||||
- gcc
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
||||
on_failure: always
|
||||
recipients:
|
||||
- gm130s@gmail.com
|
||||
env:
|
||||
matrix:
|
||||
- ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu USE_DEB=true
|
||||
- ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu USE_DEB=true
|
||||
- ROS_DISTRO="indigo" PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1
|
||||
- ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu USE_DEB=true
|
||||
- ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu USE_DEB=true
|
||||
- ROS_DISTRO="jade" PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1
|
||||
matrix:
|
||||
allow_failures:
|
||||
# Run docker-based ROS prerelease test http://wiki.ros.org/bloom/Tutorials/PrereleaseTest Because we might not want to run prerelease test for all PRs, it's omitted from pass-fail criteria.
|
||||
- env: ROS_DISTRO="indigo" PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1
|
||||
- env: ROS_DISTRO="jade" PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1
|
||||
install:
|
||||
- git clone https://github.com/ros-industrial/industrial_ci.git .ci_config && source .ci_config/travis.sh
|
||||
# - source ./travis.sh # Enable this when you have a package-local script
|
||||
@@ -0,0 +1,44 @@
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Changelog for package rgbd_launch
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
2.1.3 (2016-09-10)
|
||||
------------------
|
||||
* [feat] add prefix to nodelet name `#28 <https://github.com/ros-drivers/rgbd_launch/issues/28>`_
|
||||
* [maintenance] Enable rostest `#29 <https://github.com/ros-drivers/rgbd_launch/issues/29>`_, `#31 <https://github.com/ros-drivers/rgbd_launch/issues/31>`_
|
||||
* Contributors: Isaac I.Y. Saito, Kentaro Wada, Yuki Furuta
|
||||
|
||||
2.1.2 (2016-05-07)
|
||||
------------------
|
||||
* [feat] depth_registered_filtered injection `#25 <https://github.com/ros-drivers/rgbd_launch/issues/25>`_
|
||||
* [sys] [Travis CI] Update config to using industrial_ci with Prerelease Test. `#23 <https://github.com/ros-drivers/rgbd_launch/issues/23>`_
|
||||
* Contributors: Jonathan Bohren, Isaac I.Y. Saito
|
||||
|
||||
2.1.1 (2015-11-16)
|
||||
------------------
|
||||
* 1st ROS Jade release
|
||||
* [feat] Add convert_metric nodes to depth_registered.launch.xml (`#13 <https://github.com/ros-drivers/rgbd_launch/issues/13>`_ from kbogert/hydro-devel)
|
||||
* [feat] Add the metric nodes to output a depth image
|
||||
* [fix] Merge pull request `#1 <https://github.com/ros-drivers/rgbd_launch/issues/1>`_ from piyushk/piyush/kbogert-depth-registered-metric
|
||||
fixed rect convert metric to conform to both s/w and h/w pipelines. fixe...
|
||||
* Contributors: Kenneth Bogert, Piyush Khandelwal
|
||||
|
||||
2.1.0 (2014-05-05)
|
||||
------------------
|
||||
* Revert "Add machine parameter". closes `#5 <https://github.com/ros-drivers/rgbd_launch/issues/5>`_
|
||||
* Contributors: Piyush Khandelwal
|
||||
|
||||
2.0.1 (2013-09-06)
|
||||
------------------
|
||||
* Merge pull request `#2 <https://github.com/ros-drivers/rgbd_launch/issues/2>`_ - added machine parameter to launch nodelet manager on a remote machine.
|
||||
* Merge pull request `#1 <https://github.com/ros-drivers/rgbd_launch/issues/1>`_ - added debayer_processing argument
|
||||
|
||||
2.0.0 (2013-08-19)
|
||||
------------------
|
||||
* explicit s/w and h/w processing chains with flags to enable/disable
|
||||
* marked and moved all launch files as internal
|
||||
* added a script to serve as an upgrade notice for ROS Hydro. This notice should be removed for ROS Indigo
|
||||
* fixed cloud processing when device registration is enabled
|
||||
* added tf prefix resolution to kinect_frames
|
||||
* Migrated from openni_launch v1.9.1 and removed all openni specific files
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(rgbd_launch)
|
||||
|
||||
find_package(catkin)
|
||||
|
||||
catkin_package()
|
||||
|
||||
install(DIRECTORY launch
|
||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/
|
||||
)
|
||||
|
||||
install(PROGRAMS scripts/hydro-upgrade-notice
|
||||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}/
|
||||
)
|
||||
|
||||
if(CATKIN_ENABLE_TESTING)
|
||||
find_package(roslaunch REQUIRED)
|
||||
find_package(rostest REQUIRED)
|
||||
roslaunch_add_file_check(launch)
|
||||
roslaunch_add_file_check(test)
|
||||
add_rostest(test/camera.test)
|
||||
endif()
|
||||
@@ -0,0 +1,48 @@
|
||||
<!-- Load processing nodelets for the depth camera -->
|
||||
<launch>
|
||||
|
||||
<arg name="manager" />
|
||||
<arg name="points_xyz" default="true" />
|
||||
<arg name="rectify" default="true" />
|
||||
<arg name="respawn" default="false" />
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
<arg name="depth" />
|
||||
|
||||
<!-- Rectified raw image (internal use) -->
|
||||
<node if="$(arg rectify)" pkg="nodelet" type="nodelet" name="$(arg depth)_rectify_depth"
|
||||
args="load image_proc/rectify $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_mono" to="$(arg depth)/image_raw" />
|
||||
<remap from="image_rect" to="$(arg depth)/image_rect_raw" />
|
||||
<!-- Use nearest neighbor (0) interpolation so we don't streak across
|
||||
depth boundaries -->
|
||||
<param name="interpolation" value="0" />
|
||||
</node>
|
||||
|
||||
<!-- Rectified depth image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg depth)_metric_rect"
|
||||
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_raw" to="$(arg depth)/image_rect_raw" />
|
||||
<remap from="image" to="$(arg depth)/image_rect" />
|
||||
</node>
|
||||
|
||||
<!-- Unrectified depth image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg depth)_metric"
|
||||
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_raw" to="$(arg depth)/image_raw" />
|
||||
<remap from="image" to="$(arg depth)/image" />
|
||||
</node>
|
||||
|
||||
<!-- XYZ point cloud (optional, disable if publishing XYZRGB instead) -->
|
||||
<node if="$(arg points_xyz)"
|
||||
pkg="nodelet" type="nodelet" name="$(arg depth)_points"
|
||||
args="load depth_image_proc/point_cloud_xyz $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_rect" to="$(arg depth)/image_rect_raw"/> <!-- Use raw image for efficiency -->
|
||||
<remap from="points" to="$(arg depth)/points" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,101 @@
|
||||
<!-- Register a depth camera with an RGB camera -->
|
||||
<!-- TODO: Should be able to remap namespaces in nodelet load with current roscpp -->
|
||||
<launch>
|
||||
|
||||
<arg name="manager" />
|
||||
|
||||
<arg name="respawn" default="false" />
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
|
||||
<arg name="sw_registered_processing" default="true" />
|
||||
<arg name="hw_registered_processing" default="true" />
|
||||
|
||||
<!-- TODO: Instead "rgb", "depth" and "depth_registered" should be remapped as
|
||||
necessary by top-level launch file -->
|
||||
<arg name="rgb" default="rgb" />
|
||||
<arg name="depth" default="depth" />
|
||||
<arg name="depth_registered" default="depth_registered" />
|
||||
<!-- For distinguishing multiple register/XYZRGB nodelets. Default fails if rgb
|
||||
or depth contains a namespace. -->
|
||||
<arg name="suffix" default="$(arg depth)_$(arg rgb)" />
|
||||
<!-- For filtering depth images, set depth_registered_filtered to the
|
||||
filtered depth image topic -->
|
||||
<arg name="depth_registered_filtered" default="depth_registered" />
|
||||
|
||||
|
||||
<!-- Registration nodelet, projecting depth to RGB camera -->
|
||||
<group if="$(arg sw_registered_processing)">
|
||||
<node pkg="nodelet" type="nodelet" name="register_$(arg suffix)"
|
||||
args="load depth_image_proc/register $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<!-- Explicit topic remappings, shouldn't need all of these -->
|
||||
<remap from="rgb/camera_info" to="$(arg rgb)/camera_info" />
|
||||
<remap from="depth/camera_info" to="$(arg depth)/camera_info" />
|
||||
<remap from="depth/image_rect" to="$(arg depth)/image_rect_raw" />
|
||||
<remap from="depth_registered/image_rect" to="$(arg depth_registered)/sw_registered/image_rect_raw" />
|
||||
</node>
|
||||
|
||||
<!-- Publish registered XYZRGB point cloud with software registered input -->
|
||||
<node pkg="nodelet" type="nodelet" name="points_xyzrgb_sw_registered"
|
||||
args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<!-- Explicit topic remappings, shouldn't need all of these -->
|
||||
<remap from="rgb/image_rect_color" to="$(arg rgb)/image_rect_color" />
|
||||
<remap from="rgb/camera_info" to="$(arg rgb)/camera_info" />
|
||||
<remap from="depth_registered/image_rect" to="$(arg depth_registered_filtered)/sw_registered/image_rect_raw" />
|
||||
<remap from="depth_registered/points" to="$(arg depth_registered)/points" />
|
||||
</node>
|
||||
|
||||
<!-- Rectified depth image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg depth_registered)_sw_metric_rect"
|
||||
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_raw" to="$(arg depth_registered)/sw_registered/image_rect_raw" />
|
||||
<remap from="image" to="$(arg depth_registered)/sw_registered/image_rect" />
|
||||
</node>
|
||||
|
||||
</group>
|
||||
|
||||
<!-- for device enabled registration, simply rectify the raw image -->
|
||||
<group if="$(arg hw_registered_processing)">
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg depth_registered)_rectify_depth"
|
||||
args="load image_proc/rectify $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_mono" to="$(arg depth_registered)/image_raw" />
|
||||
<remap from="image_rect" to="$(arg depth_registered)/hw_registered/image_rect_raw" />
|
||||
<!-- Use nearest neighbor (0) interpolation so we don't streak across
|
||||
depth boundaries -->
|
||||
<param name="interpolation" value="0" />
|
||||
</node>
|
||||
|
||||
<!-- Publish registered XYZRGB point cloud with hardware registered input -->
|
||||
<node pkg="nodelet" type="nodelet" name="points_xyzrgb_hw_registered"
|
||||
args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<!-- Explicit topic remappings, shouldn't need all of these -->
|
||||
<remap from="rgb/image_rect_color" to="$(arg rgb)/image_rect_color" />
|
||||
<remap from="rgb/camera_info" to="$(arg rgb)/camera_info" />
|
||||
<remap from="depth_registered/image_rect" to="$(arg depth_registered_filtered)/hw_registered/image_rect_raw" />
|
||||
<remap from="depth_registered/points" to="$(arg depth_registered)/points" />
|
||||
</node>
|
||||
|
||||
<!-- Rectified depth image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg depth_registered)_hw_metric_rect"
|
||||
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_raw" to="$(arg depth_registered)/hw_registered/image_rect_raw" />
|
||||
<remap from="image" to="$(arg depth_registered)/hw_registered/image_rect" />
|
||||
</node>
|
||||
|
||||
<!-- Unrectified depth image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg depth_registered)_metric"
|
||||
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_raw" to="$(arg depth_registered)/image_raw" />
|
||||
<remap from="image" to="$(arg depth_registered)/image" />
|
||||
</node>
|
||||
|
||||
</group>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,24 @@
|
||||
<launch>
|
||||
|
||||
<arg name="manager" />
|
||||
<arg name="depth" default="depth" />
|
||||
<arg name="projector" default="projector" />
|
||||
|
||||
<arg name="respawn" default="false" />
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
|
||||
<!-- Disparity image -->
|
||||
<node pkg="nodelet" type="nodelet" name="disparity_$(arg depth)"
|
||||
args="load depth_image_proc/disparity $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<!-- Use raw image for efficiency -->
|
||||
<remap from="left/image_rect" to="$(arg depth)/image_rect_raw" />
|
||||
<remap from="right" to="$(arg projector)" />
|
||||
<remap from="left/disparity" to="$(arg depth)/disparity" />
|
||||
|
||||
<param name="min_range" value="0.5" />
|
||||
<param name="max_range" value="4.0" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,42 @@
|
||||
<launch>
|
||||
|
||||
<arg name="manager" />
|
||||
<arg name="depth_registered" default="depth_registered" />
|
||||
<arg name="projector" default="projector" />
|
||||
|
||||
<arg name="respawn" default="false" />
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
|
||||
<arg name="sw_registered_processing" default="true" />
|
||||
<arg name="hw_registered_processing" default="true" />
|
||||
|
||||
<!-- Disparity image from s/w registered source-->
|
||||
<node if="$(arg sw_registered_processing)"
|
||||
pkg="nodelet" type="nodelet" name="disparity_registered_sw"
|
||||
args="load depth_image_proc/disparity $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<!-- Use raw image for efficiency -->
|
||||
<remap from="left/image_rect" to="$(arg depth_registered)/sw_registered/image_rect_raw" />
|
||||
<remap from="right" to="$(arg projector)" />
|
||||
<remap from="left/disparity" to="$(arg depth_registered)/disparity" />
|
||||
|
||||
<param name="min_range" value="0.5" />
|
||||
<param name="max_range" value="4.0" />
|
||||
</node>
|
||||
|
||||
<!-- Disparity image from h/w registered source-->
|
||||
<node if="$(arg hw_registered_processing)"
|
||||
pkg="nodelet" type="nodelet" name="disparity_registered_hw"
|
||||
args="load depth_image_proc/disparity $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<!-- Use raw image for efficiency -->
|
||||
<remap from="left/image_rect" to="$(arg depth_registered)/hw_registered/image_rect_raw" />
|
||||
<remap from="right" to="$(arg projector)" />
|
||||
<remap from="left/disparity" to="$(arg depth_registered)/disparity" />
|
||||
|
||||
<param name="min_range" value="0.5" />
|
||||
<param name="max_range" value="4.0" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!-- Load processing nodelets for the IR camera -->
|
||||
<launch>
|
||||
|
||||
<arg name="manager" />
|
||||
<arg name="respawn" default="false" />
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
<arg name="ir" />
|
||||
|
||||
<!-- Rectified image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg ir)_rectify_ir"
|
||||
args="load image_proc/rectify $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_mono" to="$(arg ir)/image_raw" />
|
||||
<remap from="image_rect" to="$(arg ir)/image_rect_ir" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,24 @@
|
||||
<!-- Start nodelet manager -->
|
||||
<launch>
|
||||
|
||||
<!-- Name here should NOT be globally qualified (node names cannot contain /) -->
|
||||
<arg name="name" />
|
||||
|
||||
<!-- Optionally launch manager in GDB, for debugging -->
|
||||
<arg name="debug" default="false" />
|
||||
<arg if="$(arg debug)" name="launch_prefix" value="xterm -e gdb --args" />
|
||||
<arg unless="$(arg debug)" name="launch_prefix" value="" />
|
||||
<!-- Worker threads -->
|
||||
<arg name="num_worker_threads" />
|
||||
|
||||
<!-- Also globally disable bond heartbeat timeout in debug mode, so everything
|
||||
doesn't die when you hit a break point -->
|
||||
<param if="$(arg debug)" name="/bond_disable_heartbeat_timeout" value="true" />
|
||||
|
||||
<!-- Nodelet manager -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg name)" args="manager"
|
||||
output="screen" launch-prefix="$(arg launch_prefix)">
|
||||
<param name="num_worker_threads" value="$(arg num_worker_threads)" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,89 @@
|
||||
<!-- Load full set of processing nodelets for a RGBD device -->
|
||||
<launch>
|
||||
|
||||
<!-- Name of nodelet manager -->
|
||||
<arg name="manager" />
|
||||
|
||||
<!-- Launch robustly (bonds + respawn) or not? -->
|
||||
<arg name="respawn" default="false" />
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
|
||||
<!-- Processing modules -->
|
||||
<arg name="rgb_processing" default="true" />
|
||||
<arg name="debayer_processing" default="true" />
|
||||
<arg name="ir_processing" default="true" />
|
||||
<arg name="depth_processing" default="true" />
|
||||
<arg name="depth_registered_processing" default="true" />
|
||||
<arg name="disparity_processing" default="true" />
|
||||
<arg name="disparity_registered_processing" default="true" />
|
||||
<arg name="sw_registered_processing" default="true" />
|
||||
<arg name="hw_registered_processing" default="true" />
|
||||
|
||||
<!-- Remapping arguments -->
|
||||
<arg name="rgb" default="rgb" />
|
||||
<arg name="ir" default="ir" />
|
||||
<arg name="depth" default="depth" />
|
||||
<arg name="depth_registered" default="depth_registered" />
|
||||
<arg name="depth_registered_filtered" default="depth_registered" />
|
||||
<arg name="projector" default="projector" />
|
||||
|
||||
<!-- RGB processing -->
|
||||
<include if="$(arg rgb_processing)"
|
||||
file="$(find rgbd_launch)/launch/includes/rgb.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="respawn" value="$(arg respawn)" />
|
||||
<arg name="rgb" value="$(arg rgb)" />
|
||||
<arg name="debayer_processing" value="$(arg debayer_processing)" />
|
||||
</include>
|
||||
|
||||
<!-- IR processing -->
|
||||
<include if="$(arg ir_processing)"
|
||||
file="$(find rgbd_launch)/launch/includes/ir.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="respawn" value="$(arg respawn)" />
|
||||
<arg name="ir" value="$(arg ir)" />
|
||||
</include>
|
||||
|
||||
<!-- Unregistered depth processing -->
|
||||
<include if="$(arg depth_processing)"
|
||||
file="$(find rgbd_launch)/launch/includes/depth.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="respawn" value="$(arg respawn)" />
|
||||
<arg name="depth" value="$(arg depth)" />
|
||||
</include>
|
||||
|
||||
<!-- Depth-to-RGB registration and processing -->
|
||||
<include if="$(arg depth_registered_processing)"
|
||||
file="$(find rgbd_launch)/launch/includes/depth_registered.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="rgb" value="$(arg rgb)" />
|
||||
<arg name="depth" value="$(arg depth)" />
|
||||
<arg name="depth_registered" value="$(arg depth_registered)" />
|
||||
<arg name="depth_registered_filtered" value="$(arg depth_registered_filtered)" />
|
||||
<arg name="respawn" value="$(arg respawn)" />
|
||||
<arg name="sw_registered_processing" value="$(arg sw_registered_processing)" />
|
||||
<arg name="hw_registered_processing" value="$(arg hw_registered_processing)" />
|
||||
</include>
|
||||
|
||||
<!-- Unregistered disparity image -->
|
||||
<include if="$(arg disparity_processing)"
|
||||
file="$(find rgbd_launch)/launch/includes/disparity.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="depth" value="$(arg depth)" />
|
||||
<arg name="projector" value="$(arg projector)" />
|
||||
<arg name="respawn" value="$(arg respawn)" />
|
||||
</include>
|
||||
|
||||
<!-- Registered disparity image -->
|
||||
<include if="$(arg disparity_registered_processing)"
|
||||
file="$(find rgbd_launch)/launch/includes/disparity_registered.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="depth_registered" value="$(arg depth_registered)" />
|
||||
<arg name="projector" value="$(arg projector)" />
|
||||
<arg name="respawn" value="$(arg respawn)" />
|
||||
<arg name="sw_registered_processing" value="$(arg sw_registered_processing)" />
|
||||
<arg name="hw_registered_processing" value="$(arg hw_registered_processing)" />
|
||||
</include>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!-- Load processing nodelets for the RGB camera -->
|
||||
<launch>
|
||||
|
||||
<arg name="manager" />
|
||||
<arg name="respawn" default="false" />
|
||||
<arg name="rgb" />
|
||||
|
||||
<arg name="debayer_processing" default="true" />
|
||||
|
||||
<!-- TODO Arguments interpolation methods? -->
|
||||
|
||||
<arg if="$(arg respawn)" name="bond" value="" />
|
||||
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
|
||||
|
||||
<!-- Debayered images -->
|
||||
<node if="$(arg debayer_processing)" pkg="nodelet" type="nodelet" name="$(arg rgb)_debayer"
|
||||
args="load image_proc/debayer $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_raw" to="$(arg rgb)/image_raw" />
|
||||
<remap from="image_mono" to="$(arg rgb)/image_mono" />
|
||||
<remap from="image_color" to="$(arg rgb)/image_color" />
|
||||
</node>
|
||||
|
||||
<!-- Monochrome rectified image -->
|
||||
<node if="$(arg debayer_processing)" pkg="nodelet" type="nodelet" name="$(arg rgb)_rectify_mono"
|
||||
args="load image_proc/rectify $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap from="image_mono" to="$(arg rgb)/image_mono" />
|
||||
<remap from="image_rect" to="$(arg rgb)/image_rect_mono" />
|
||||
</node>
|
||||
|
||||
<!-- Color rectified image -->
|
||||
<node pkg="nodelet" type="nodelet" name="$(arg rgb)_rectify_color"
|
||||
args="load image_proc/rectify $(arg manager) $(arg bond)"
|
||||
respawn="$(arg respawn)">
|
||||
<remap if="$(arg debayer_processing)" from="image_mono" to="$(arg rgb)/image_color" />
|
||||
<remap unless="$(arg debayer_processing)" from="image_mono" to="$(arg rgb)/image_raw" />
|
||||
<remap from="image_rect" to="$(arg rgb)/image_rect_color" />
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!-- Default frames for Kinect/PSDK5 devices
|
||||
Places depth and RGB cameras in the same plane with 2.5cm baseline.
|
||||
Calibration may improve results, but these defaults are reasonably accurate.
|
||||
-->
|
||||
<launch>
|
||||
<arg name="camera" default="camera" />
|
||||
<arg name="tf_prefix" default="" />
|
||||
|
||||
<arg name="pi/2" value="1.5707963267948966" />
|
||||
<arg name="optical_rotate" value="0 0 0 -$(arg pi/2) 0 -$(arg pi/2)" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="$(arg camera)_base_link"
|
||||
args="0 -0.02 0 0 0 0 $(arg tf_prefix)/$(arg camera)_link $(arg tf_prefix)/$(arg camera)_depth_frame 100" />
|
||||
<node pkg="tf" type="static_transform_publisher" name="$(arg camera)_base_link1"
|
||||
args="0 -0.045 0 0 0 0 $(arg tf_prefix)/$(arg camera)_link $(arg tf_prefix)/$(arg camera)_rgb_frame 100" />
|
||||
<node pkg="tf" type="static_transform_publisher" name="$(arg camera)_base_link2"
|
||||
args="$(arg optical_rotate) $(arg tf_prefix)/$(arg camera)_depth_frame $(arg tf_prefix)/$(arg camera)_depth_optical_frame 100" />
|
||||
<node pkg="tf" type="static_transform_publisher" name="$(arg camera)_base_link3"
|
||||
args="$(arg optical_rotate) $(arg tf_prefix)/$(arg camera)_rgb_frame $(arg tf_prefix)/$(arg camera)_rgb_optical_frame 100" />
|
||||
</launch>
|
||||
|
||||
<!-- TODO Could instead store these in camera_pose_calibration format for consistency
|
||||
with user calibrations. Blocked on camera_pose_calibration having sane dependencies. -->
|
||||
@@ -0,0 +1,31 @@
|
||||
<package>
|
||||
<name>rgbd_launch</name>
|
||||
<version>2.1.3</version>
|
||||
<description>
|
||||
Launch files to open an RGBD device and load all nodelets to
|
||||
convert raw depth/RGB/IR streams to depth images, disparity images,
|
||||
and (registered) point clouds.
|
||||
</description>
|
||||
<author>Patrick Mihelich and others</author>
|
||||
<maintainer email="piyushk@gmail.com">Piyush Khandelwal</maintainer>
|
||||
<license>BSD</license>
|
||||
|
||||
<url type="website">http://www.ros.org/wiki/rgbd_launch</url>
|
||||
<url type="repository">https://github.com/ros-drivers/rgbd_launch</url>
|
||||
<url type="bugtracker">https://github.com/ros-drivers/rgbd_launch/issues</url>
|
||||
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
|
||||
<build_depend>depth_image_proc</build_depend>
|
||||
<build_depend>image_proc</build_depend>
|
||||
<build_depend>nodelet</build_depend>
|
||||
<build_depend>tf</build_depend>
|
||||
|
||||
<run_depend>depth_image_proc</run_depend>
|
||||
<run_depend>image_proc</run_depend>
|
||||
<run_depend>nodelet</run_depend>
|
||||
<run_depend>tf</run_depend>
|
||||
|
||||
<test_depend>rostest</test_depend>
|
||||
|
||||
</package>
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import rospy
|
||||
import sys
|
||||
|
||||
if __name__ == '__main__':
|
||||
rospy.init_node('kinect_frames')
|
||||
name = rospy.get_param('~name')
|
||||
from_pkg = rospy.get_param('~from_pkg', 'openni_launch')
|
||||
to_pkg = rospy.get_param('~to_pkg', 'rgbd_launch')
|
||||
from_pkg_path = rospy.get_param('~from_pkg_path')
|
||||
to_pkg_path = rospy.get_param('~to_pkg_path')
|
||||
|
||||
rospy.logfatal(name + ' has moved to ' + to_pkg + '! ' +
|
||||
'Replace \"$(find ' + from_pkg + ')/' + from_pkg_path + '\" ' +
|
||||
'with \"$(find ' + to_pkg + ')/' + to_pkg_path + '\". ' +
|
||||
'This notice will be removed in ROS Indigo')
|
||||
|
||||
sys.exit(0)
|
||||
@@ -0,0 +1,6 @@
|
||||
<launch>
|
||||
<include file="$(find rgbd_launch)/test/camera_for_test.launch" />
|
||||
|
||||
<test test-name="test_kinect_frames"
|
||||
pkg="rgbd_launch" type="test_rgbd_launch.py" />
|
||||
</launch>
|
||||
@@ -0,0 +1,26 @@
|
||||
<launch>
|
||||
<arg name="manager" default="camera_nodelet_manager" />
|
||||
|
||||
<!-- for testing manager.launch.xml -->
|
||||
<include file="$(find rgbd_launch)/launch/includes/manager.launch.xml">
|
||||
<arg name="name" value="$(arg manager)" />
|
||||
<arg name="num_worker_threads" value="4" />
|
||||
</include>
|
||||
|
||||
<!-- for testing processing.launch.xml -->
|
||||
<!-- this also includes all other launch.xml files in launch/includes -->
|
||||
<include file="$(find rgbd_launch)/launch/includes/processing.launch.xml">
|
||||
<arg name="manager" value="$(arg manager)" />
|
||||
<arg name="rgb_processing" value="true"/>
|
||||
<arg name="ir_processing" value="true"/>
|
||||
<arg name="depth_processing" value="true"/>
|
||||
<arg name="depth_registered_processing" value="true"/>
|
||||
<arg name="disparity_processing" value="true"/>
|
||||
<arg name="disparity_registered_processing" value="true"/>
|
||||
<arg name="hw_registered_processing" value="true" />
|
||||
<arg name="sw_registered_processing" value="true" />
|
||||
</include>
|
||||
|
||||
<!-- for testing kinect_frames.launch -->
|
||||
<include file="$(find rgbd_launch)/launch/kinect_frames.launch" />
|
||||
</launch>
|
||||
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#***********************************************************
|
||||
#* Software License Agreement (BSD License)
|
||||
#*
|
||||
#* Copyright (c) 2009, Willow Garage, Inc.
|
||||
#* All rights reserved.
|
||||
#*
|
||||
#* Redistribution and use in source and binary forms, with or without
|
||||
#* modification, are permitted provided that the following conditions
|
||||
#* are met:
|
||||
#*
|
||||
#* * Redistributions of source code must retain the above copyright
|
||||
#* notice, this list of conditions and the following disclaimer.
|
||||
#* * Redistributions in binary form must reproduce the above
|
||||
#* copyright notice, this list of conditions and the following
|
||||
#* disclaimer in the documentation and/or other materials provided
|
||||
#* with the distribution.
|
||||
#* * Neither the name of the Willow Garage nor the names of its
|
||||
#* contributors may be used to endorse or promote products derived
|
||||
#* from this software without specific prior written permission.
|
||||
#*
|
||||
#* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
#* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
#* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
#* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
#* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
#* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
#* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
#* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
#* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
#* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
#* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
#* POSSIBILITY OF SUCH DAMAGE.
|
||||
#***********************************************************
|
||||
# Author: Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>
|
||||
|
||||
import tf
|
||||
import rospy
|
||||
from unittest import TestCase
|
||||
|
||||
|
||||
class TestRGBDLaunch(TestCase):
|
||||
def testKinectFrames(self):
|
||||
tfListener = tf.TransformListener()
|
||||
try:
|
||||
tfListener.waitForTransform("camera_depth_optical_frame",
|
||||
"camera_rgb_optical_frame",
|
||||
rospy.Time(), rospy.Duration(20))
|
||||
except Exception as e:
|
||||
self.fail(str(e))
|
||||
try:
|
||||
trans = tfListener.lookupTransform("camera_depth_optical_frame",
|
||||
"camera_rgb_optical_frame",
|
||||
rospy.Time())
|
||||
self.assertIsNotNone(trans)
|
||||
except Exception as e:
|
||||
self.fail(str(e))
|
||||
|
||||
if __name__ == '__main__':
|
||||
rospy.init_node("test_kinect_frames")
|
||||
import rostest
|
||||
rostest.rosrun("rgbd_launch", "test_kinect_frames", TestRGBDLaunch)
|
||||
@@ -0,0 +1,120 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(robot)
|
||||
|
||||
## 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
|
||||
rosaria
|
||||
p3dx_description
|
||||
# tsbot_drivers
|
||||
robot_state_publisher
|
||||
estop
|
||||
urg_node
|
||||
# mynt_eye_ros_wrapper
|
||||
)
|
||||
|
||||
###################################
|
||||
## 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 random_walk
|
||||
CATKIN_DEPENDS rosaria p3dx_description robot_state_publisher estop urg_node # mynt_eye_ros_wrapper tsbot_drivers
|
||||
# DEPENDS traxbot_stingbot
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
# include_directories(include)
|
||||
#include_directories(
|
||||
# include ${catkin_INCLUDE_DIRS}
|
||||
#)
|
||||
|
||||
## Declare a C++ library
|
||||
# add_library(random_walk
|
||||
# src/${PROJECT_NAME}/random_walk.cpp
|
||||
# )
|
||||
#add_library(tsbot_drivers
|
||||
# src/tsbot_drivers.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(random_walk ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Declare a C++ executable
|
||||
#add_executable(traxbot src/traxbot.cpp src/tsbot_drivers.cpp)
|
||||
|
||||
## Add cmake target dependencies of the executable
|
||||
## same as for the library above
|
||||
# add_dependencies(random_walk_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(random_walk_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
#target_link_libraries(traxbot ${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 random_walk random_walk_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
|
||||
robot.launch
|
||||
mynteye_stereo_camera.launch
|
||||
hokuyo_LRF.launch
|
||||
platform.launch
|
||||
sensors.launch
|
||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
)
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_random_walk.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)
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<launch>
|
||||
|
||||
<arg name="robot_type" default="P3DX2"/>
|
||||
<!-- <arg name="robot_type" default="TraxBot"/>-->
|
||||
<!-- <arg name="robot_type" default="StingBot"/>-->
|
||||
|
||||
<group>
|
||||
<include file="$(find realsense2_camera)/launch/rs_camera.launch" >
|
||||
<arg name="camera" value="realsense"/>-->
|
||||
<arg name="initial_reset" value="false"/>
|
||||
<arg name="align_depth" value="true"/>
|
||||
<!-- <arg name="filters" value="pointcloud,disparity,spatial,temporal,decimation"/>-->
|
||||
<arg name="enable_accel" value="true"/>
|
||||
<!--<arg name="accel_fps" value="100"/>-->
|
||||
<arg name="enable_gyro" value="true"/>
|
||||
<!--<arg name="gyro_fps" value="200"/>-->
|
||||
<arg name="clip_distance" value="-1"/> <!-- don't limit distances -->
|
||||
<arg name="enable_pointcloud" value="true"/>
|
||||
<!--<arg name="enable_infra" value="true"/>
|
||||
<arg name="infra_rgb" value="true"/>-->
|
||||
<!-- high resolution / low frame rate mode -->
|
||||
<!-- <arg name="depth_width" value="1280"/>
|
||||
<arg name="depth_height" value="720"/>
|
||||
<arg name="depth_fps" value="5"/>
|
||||
<arg name="infra_width" value="1280"/>
|
||||
<arg name="infra_height" value="720"/>
|
||||
<arg name="infra_fps" value="5"/>
|
||||
<arg name="color_width" value="1280"/>
|
||||
<arg name="color_height" value="800"/>
|
||||
<arg name="color_fps" value="8"/>-->
|
||||
<!-- moderate resolution / high frame rate mode -->
|
||||
<!--<arg name="depth_width" value="640"/>
|
||||
<arg name="depth_height" value="480"/>
|
||||
<arg name="depth_fps" value="30"/>
|
||||
<arg name="infra_width" value="640"/>
|
||||
<arg name="infra_height" value="480"/>
|
||||
<arg name="infra_fps" value="30"/>
|
||||
<arg name="color_width" value="640"/>
|
||||
<arg name="color_height" value="480"/>
|
||||
<arg name="color_fps" value="30"/>-->
|
||||
<!-- moderate resolution / moderate frame rate mode -->
|
||||
<!--<arg name="depth_width" value="848"/>
|
||||
<arg name="depth_height" value="480"/>
|
||||
<arg name="depth_fps" value="10"/>
|
||||
<arg name="infra_width" value="848"/>
|
||||
<arg name="infra_height" value="480"/>
|
||||
<arg name="infra_fps" value="10"/>
|
||||
<arg name="color_width" value="640"/>
|
||||
<arg name="color_height" value="480"/>
|
||||
<arg name="color_fps" value="15"/>-->
|
||||
<!-- low resolution / moderate frame rate mode -->
|
||||
<!--<arg name="depth_width" value="480"/>
|
||||
<arg name="depth_height" value="270"/>
|
||||
<arg name="depth_fps" value="15"/>
|
||||
<arg name="infra_width" value="480"/>
|
||||
<arg name="infra_height" value="270"/>
|
||||
<arg name="infra_fps" value="15"/>
|
||||
<arg name="color_width" value="424"/>
|
||||
<arg name="color_height" value="240"/>
|
||||
<arg name="color_fps" value="15"/> -->
|
||||
</include>
|
||||
|
||||
<!-- republish point cloud in another topic at a lower frame rate -->
|
||||
<node name="point_cloud_throttler" type="throttle" pkg="topic_tools" args="messages /realsense/depth/color/points 1 /realsense/depth/color/points_throttled" />
|
||||
|
||||
|
||||
<node if="$(eval robot_type == 'P3DX2')" name="tf_realsense" pkg="tf" type="static_transform_publisher" args="0.205 0.0 0.63 0 0.05 0 base_link realsense_link 10" respawn="true"
|
||||
/>
|
||||
|
||||
<node if="$(eval robot_type == 'TraxBot')" name="tf_realsense" pkg="tf" type="static_transform_publisher" args="0.12 0.0 0.23 0 0 0 base_link realsense_link 10" respawn="true" />
|
||||
|
||||
<node if="$(eval robot_type == 'StingBot')" name="tf_realsense" pkg="tf" type="static_transform_publisher" args="0.12 0.0 0.23 0 0 0 base_link realsense_link 10" respawn="true" />
|
||||
</group>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
|
||||
<!-- <arg name="robot_type" default="P3DX2"/>-->
|
||||
<arg name="robot_type" default="TraxBot"/>
|
||||
<!-- <arg name="robot_type" default="StingBot"/>-->
|
||||
<arg name="camera" default="false"/>
|
||||
|
||||
<!--- launch Hokuyo node -->
|
||||
<!--<include file="$(find urg_node)/launch/urg_lidar.launch"/>-->
|
||||
<node name="urg_node" pkg="urg_node" type="urg_node" output="screen">
|
||||
<!-- <remap if="$(arg camera)" from="scan" to="hokuyo/scan"/>-->
|
||||
<param name="ip_address" value=""/>
|
||||
<param name="serial_port" value="/dev/ttyACM0"/>
|
||||
<!-- <param name="seria_port" value="/dev/serial/by-id/usb-Hokuyo_Data_Flex_for_USB_URG-Series_USB_Driver-if00" />-->
|
||||
<param name="serial_baud" value="115200"/>
|
||||
<param name="frame_id" value="laser"/>
|
||||
<param name="calibrate_time" value="true"/>
|
||||
<param name="publish_intensity" value="false"/>
|
||||
<param name="publish_multiecho" value="false"/>
|
||||
<param name="angle_min" value="-1.5707963"/>
|
||||
<param name="angle_max" value="1.5707963"/>
|
||||
</node>
|
||||
|
||||
<!--- publish static transform from /base_link to /laser -->
|
||||
<!-- Sensor located on the highest top plate -->
|
||||
<node if="$(eval robot_type == 'P3DX2')" pkg="tf" type="static_transform_publisher" name="base_link_to_laser"
|
||||
args="0.14 0.0 0.74 0.0 0.0 0.0 1.0 base_link laser 100" />
|
||||
<!-- Sensor located near the floor -->
|
||||
<!--<node if="$(eval robot_type == 'P3DX2')" pkg="tf" type="static_transform_publisher" name="base_link_to_laser"
|
||||
args="0.225 0.0 0.1 0.0 0.0 0.0 1.0 base_link laser 100" />-->
|
||||
|
||||
<node if="$(eval robot_type == 'TraxBot')" pkg="tf" type="static_transform_publisher" name="base_link_to_laser"
|
||||
args="0.15 0.0 0.06 0.0 0.0 0.0 1.0 base_link laser 50"/>
|
||||
|
||||
<node if="$(eval robot_type == 'StingBot')" pkg="tf" type="static_transform_publisher" name="base_link_to_laser"
|
||||
args="0.15 0.0 0.06 0.0 0.0 0.0 1.0 base_link laser 50"/>
|
||||
|
||||
</launch>
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<launch>
|
||||
|
||||
<arg name="robot_type" default="P3DX2"/>
|
||||
<!-- <arg name="robot_type" default="TraxBot"/>-->
|
||||
<!-- <arg name="robot_type" default="StingBot"/>-->
|
||||
|
||||
<group>
|
||||
<include file="$(find realsense2_camera)/launch/rs_camera.launch" >
|
||||
<arg name="camera" value="realsense"/>-->
|
||||
<arg name="initial_reset" value="false"/>
|
||||
<arg name="align_depth" value="true"/>
|
||||
<arg name="filters" value="pointcloud,disparity,spatial,temporal,decimation"/>
|
||||
<arg name="enable_accel" value="true"/>
|
||||
<arg name="accel_fps" value="100"/>
|
||||
<arg name="enable_gyro" value="true"/>
|
||||
<arg name="gyro_fps" value="200"/>
|
||||
<arg name="clip_distance" value="-1"/> <!-- don't limit distances -->
|
||||
<arg name="enable_pointcloud" value="true"/>
|
||||
<arg name="enable_infra" value="true"/>
|
||||
<arg name="infra_rgb" value="true"/>
|
||||
<!-- high resolution / low frame rate mode -->
|
||||
<!-- <arg name="depth_width" value="1280"/>
|
||||
<arg name="depth_height" value="720"/>
|
||||
<arg name="depth_fps" value="5"/>
|
||||
<arg name="infra_width" value="1280"/>
|
||||
<arg name="infra_height" value="720"/>
|
||||
<arg name="infra_fps" value="5"/>
|
||||
<arg name="color_width" value="1280"/>
|
||||
<arg name="color_height" value="800"/>
|
||||
<arg name="color_fps" value="8"/>-->
|
||||
<!-- moderate resolution / high frame rate mode -->
|
||||
<!--<arg name="depth_width" value="640"/>
|
||||
<arg name="depth_height" value="480"/>
|
||||
<arg name="depth_fps" value="30"/>
|
||||
<arg name="infra_width" value="640"/>
|
||||
<arg name="infra_height" value="480"/>
|
||||
<arg name="infra_fps" value="30"/>
|
||||
<arg name="color_width" value="640"/>
|
||||
<arg name="color_height" value="480"/>
|
||||
<arg name="color_fps" value="30"/>-->
|
||||
<!-- moderate resolution / moderate frame rate mode -->
|
||||
<arg name="depth_width" value="848"/>
|
||||
<arg name="depth_height" value="480"/>
|
||||
<arg name="depth_fps" value="10"/>
|
||||
<arg name="infra_width" value="848"/>
|
||||
<arg name="infra_height" value="480"/>
|
||||
<arg name="infra_fps" value="10"/>
|
||||
<arg name="color_width" value="640"/>
|
||||
<arg name="color_height" value="480"/>
|
||||
<arg name="color_fps" value="15"/>
|
||||
<!-- low resolution / moderate frame rate mode -->
|
||||
<!--<arg name="depth_width" value="480"/>
|
||||
<arg name="depth_height" value="270"/>
|
||||
<arg name="depth_fps" value="15"/>
|
||||
<arg name="infra_width" value="480"/>
|
||||
<arg name="infra_height" value="270"/>
|
||||
<arg name="infra_fps" value="15"/>
|
||||
<arg name="color_width" value="424"/>
|
||||
<arg name="color_height" value="240"/>
|
||||
<arg name="color_fps" value="15"/> -->
|
||||
</include>
|
||||
|
||||
<!-- republish point cloud in another topic at a lower frame rate -->
|
||||
<node name="point_cloud_throttler" type="throttle" pkg="topic_tools" args="messages /realsense/depth/color/points 1 /realsense/depth/color/points_throttled" />
|
||||
|
||||
|
||||
<node if="$(eval robot_type == 'P3DX2')" name="tf_realsense" pkg="tf" type="static_transform_publisher" args="0.205 0.0 0.63 0 0.05 0 base_link realsense_link 10" respawn="true"
|
||||
/>
|
||||
|
||||
<node if="$(eval robot_type == 'TraxBot')" name="tf_realsense" pkg="tf" type="static_transform_publisher" args="0.12 0.0 0.23 0 0 0 base_link realsense_link 10" respawn="true" />
|
||||
|
||||
<node if="$(eval robot_type == 'StingBot')" name="tf_realsense" pkg="tf" type="static_transform_publisher" args="0.12 0.0 0.23 0 0 0 base_link realsense_link 10" respawn="true" />
|
||||
</group>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<launch>
|
||||
|
||||
<!-- <arg name="robot_type" default="P3DX2"/>-->
|
||||
<arg name="robot_type" default="TraxBot"/>
|
||||
<!-- <arg name="robot_type" default="StingBot"/>-->
|
||||
<arg name="stereo_camera" default="mynteye"/>
|
||||
|
||||
<group if="$(eval stereo_camera == 'mynteye')">
|
||||
<include file="$(find mynt_eye_ros_wrapper)/launch/mynteye.launch" >
|
||||
<arg name="mynteye" value="mynteye" />
|
||||
<arg name="base_frame_id" value="mynteye_link" />
|
||||
</include>
|
||||
<!-- <node if="$(eval robot_type == 'P3DX2')" name="tf_mynt" pkg="tf" type="static_transform_publisher" args="0.218 0.059 0.735 -1.57 0 -1.22 base_link mynteye_link 10" respawn="true" />
|
||||
<node if="$(eval robot_type == 'P3DX2')" name="tf_mynt" pkg="tf" type="static_transform_publisher" args="0.218 0.059 0.735 0 0.3491 0 base_link mynteye_link 10"
|
||||
respawn="true" />-->
|
||||
<node if="$(eval robot_type == 'P3DX2')" name="tf_mynt" pkg="tf" type="static_transform_publisher" args="0.218 0.059 0.735 0 0 0 base_link mynteye_link 10"
|
||||
respawn="true" />
|
||||
<node if="$(eval robot_type == 'TraxBot')" name="tf_mynt" pkg="tf" type="static_transform_publisher" args="0.12 0.06 0.23 0 0 0 base_link mynteye_link 10" respawn="true" />
|
||||
<node if="$(eval robot_type == 'StingBot')" name="tf_mynt" pkg="tf" type="static_transform_publisher" args="0.12 0.06 0.23 -1.57 0 -1.22 base_link mynteye_link 10" respawn="true" />
|
||||
</group>
|
||||
|
||||
<!-- launch pointcloud_to_laserscan node -->
|
||||
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">
|
||||
<remap from="cloud_in" to="/mynteye/points/data_raw"/>
|
||||
<!-- Uncomment the following line if the 2D scans of LRF and camera are to be merged -->
|
||||
<!-- <remap from="scan" to="/mynteye/scan"/>-->
|
||||
<rosparam>
|
||||
#target_frame: laser # Leave disabled to output scan in pointcloud frame
|
||||
transform_tolerance: 0.01
|
||||
min_height: 0.0
|
||||
max_height: 2.0
|
||||
|
||||
angle_min: -1.5707963 # -M_PI/180.0 * 90 deg.
|
||||
angle_max: 1.5707963 # M_PI/180.0 * 90 deg
|
||||
angle_increment: 0.00614355896702 # M_PI/180.0 * 0.352 deg. (equal to Hokuyo URG-04LX)
|
||||
scan_time: 0.1
|
||||
range_min: 0.45
|
||||
range_max: 5.0
|
||||
use_inf: true
|
||||
inf_epsilon: 1.0
|
||||
|
||||
# Concurrency level, affects number of pointclouds queued for processing and number of threads used
|
||||
# 0 : Detect number of cores
|
||||
# 1 : Single threaded
|
||||
# 2->inf : Parallelism level
|
||||
concurrency_level: 1
|
||||
</rosparam>
|
||||
|
||||
</node>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<launch>
|
||||
|
||||
<arg name="robot_type" default="P3DX2"/>
|
||||
<!-- <arg name="robot_type" default="TraxBot"/>-->
|
||||
<!-- <arg name="robot_type" default="StingBot"/>-->
|
||||
|
||||
<group>
|
||||
<include file="$(find astra_camera)/launch/astra.launch">
|
||||
<arg name="camera" value="astra" />
|
||||
<!-- point cloud is published w.r.t. astra_depth_optical_frame ! -->
|
||||
<!--<arg name="depth_frame_id" value="astra_link" />-->
|
||||
</include>
|
||||
|
||||
<!-- republish point cloud in another topic at a lower frame rate -->
|
||||
<node name="point_cloud_throttler" type="throttle" pkg="topic_tools" args="messages /astra/depth_registered/points 1 /astra/depth_registered/points_throttled" />
|
||||
|
||||
|
||||
<node if="$(eval robot_type == 'P3DX2')" name="tf_astra_link" pkg="tf" type="static_transform_publisher" args="0.235 0.020 0.63 0 0 0 base_link astra_link 10" respawn="true"
|
||||
/>
|
||||
<!-- calibration when fixed to the mid-plate (acrylic plate) -->
|
||||
<!--static_transform_publisher" args="0.235 0.020 0.52 0 0 0 base_link astra_link 10" respawn="true" -->
|
||||
|
||||
<node if="$(eval robot_type == 'TraxBot')" name="tf_astra" pkg="tf" type="static_transform_publisher" args="0.12 0.0375 0.23 0 0 0 base_link astra_link 10" respawn="true" />
|
||||
<node if="$(eval robot_type == 'StingBot')" name="tf_astra" pkg="tf" type="static_transform_publisher" args="0.12 0.0375 0.23 0 0 0 base_link astra_link 10" respawn="true" />
|
||||
</group>
|
||||
|
||||
<!-- launch pointcloud_to_laserscan node -->
|
||||
<!-- <node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">
|
||||
<remap from="cloud_in" to="/astra/depth_registered/points"/>-->
|
||||
|
||||
<!-- Uncomment the following line if the 2D scans of LRF and camera are to be merged -->
|
||||
<!-- <remap from="scan" to="/astra/scan"/>-->
|
||||
|
||||
<!-- <rosparam>
|
||||
target_frame: laser # Leave disabled to output scan in pointcloud frame
|
||||
transform_tolerance: 0.01
|
||||
min_height: 0.0
|
||||
max_height: 2.0
|
||||
|
||||
angle_min: -1.5707963 # -M_PI/180.0 * 90 deg.
|
||||
angle_max: 1.5707963 # M_PI/180.0 * 90 deg
|
||||
angle_increment: 0.00614355896702 # M_PI/180.0 * 0.352 deg. (equal to Hokuyo URG-04LX)
|
||||
scan_time: 0.5
|
||||
range_min: 0.45
|
||||
range_max: 5.0
|
||||
use_inf: true
|
||||
inf_epsilon: 1.0
|
||||
|
||||
# Concurrency level, affects number of pointclouds queued for processing and number of threads used
|
||||
# 0 : Detect number of cores
|
||||
# 1 : Single threaded
|
||||
# 2->inf : Parallelism level
|
||||
concurrency_level: 1
|
||||
</rosparam>
|
||||
|
||||
</node>
|
||||
-->
|
||||
</launch>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0"?>
|
||||
<launch>
|
||||
|
||||
<!-- ****** ROBOT CONFIGURATION ****** -->
|
||||
|
||||
<arg name="robot_type" default="P3DX2"/>
|
||||
<!-- <arg name="robot_type" default="TraxBot"/>-->
|
||||
<!-- <arg name="robot_type" default="StingBot"/>-->
|
||||
<arg name="urdf" default="true"/>
|
||||
|
||||
|
||||
|
||||
<master auto="start"/>
|
||||
|
||||
|
||||
<!-- ROBOT DRIVER -->
|
||||
|
||||
<group>
|
||||
<!-- Pioneer P3-DX2 -->
|
||||
<group if="$(eval robot_type == 'P3DX2')" >
|
||||
<node pkg="rosaria" type="RosAria" name="ROSARIA">
|
||||
<param name="base_link_frame" value="base_link" />
|
||||
<param name="odom_frame" value="odom" />
|
||||
<remap from="ROSARIA/cmd_vel" to="cmd_vel"/>
|
||||
<remap from="ROSARIA/pose" to="odom"/>
|
||||
<remap from="ROSARIA/sonar" to="sonar"/>
|
||||
<remap from="ROSARIA/motors_state" to="motors_state"/>
|
||||
<remap from="ROSARIA/enable_motors" to="enable_motors"/>
|
||||
<remap from="ROSARIA/disable_motors" to="disable_motors"/>
|
||||
<!--<param name="port" value="/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0" />-->
|
||||
<!--<param name="port" value="/dev/ttyUSB0" />-->
|
||||
</node>
|
||||
|
||||
<!--- publish static transform from /base_link to /sonar -->
|
||||
<node if="$(eval robot_type == 'P3DX2')" pkg="tf" type="static_transform_publisher" name="base_link_to_sonar"
|
||||
args="0.0 0.0 0.22 0.0 0.0 0.0 1.0 base_link sonar 100" />
|
||||
</group>
|
||||
|
||||
<!-- TraxBot -->
|
||||
<node if="$(eval robot_type == 'TraxBot')" pkg="tsbot_drivers" type="traxbot" name="traxbot" output="screen">
|
||||
<param name="serial_port" value="/dev/ttyACM0" />
|
||||
<!--<param name="serial_port" value="/dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_64938333932351510111-if00"/> -->
|
||||
<param name="baudrate" value="115200"/>
|
||||
</node>
|
||||
|
||||
<!-- StingBot -->
|
||||
<node if="$(eval robot_type == 'StingBot')" pkg="tsbot_drivers" type="stingbot" name="stingbot" output="screen">
|
||||
<!--- <param name="serial_port" value="/dev/ttyACM0" /> -->
|
||||
<param name="serial_port" value="/dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_64938333932351510111-if00"/>
|
||||
<param name="baudrate" value="115200"/>
|
||||
</node>
|
||||
|
||||
</group>
|
||||
|
||||
|
||||
<!-- ROBOT URDF model FOR RVIZ -->
|
||||
|
||||
<group if="$(arg urdf)">
|
||||
<include if="$(eval robot_type == 'P3DX2')" file="$(find p3dx_description)/launch/rviz_p3dx.launch"/>
|
||||
|
||||
<param if="$(eval robot_type == 'TraxBot')" name="robot_description" textfile="$(find tsbot_drivers)/mesh/traxbot.urdf" />
|
||||
<node if="$(eval robot_type == 'TraxBot')"
|
||||
pkg="robot_state_publisher"
|
||||
type="robot_state_publisher" name="robot_state_publisher">
|
||||
<remap from="joint_state" to="joint_state"/>
|
||||
<param name="publish_frequency" type="double" value="15.0"/>
|
||||
</node>
|
||||
|
||||
<param if="$(eval robot_type == 'StingBot')" name="robot_description" textfile="$(find tsbot_drivers)/mesh/stingbot.urdf" />
|
||||
<node if="$(eval robot_type == 'StingBot')"
|
||||
pkg="robot_state_publisher"
|
||||
type="robot_state_publisher" name="robot_state_publisher">
|
||||
<remap from="joint_state" to="joint_state"/>
|
||||
<param name="publish_frequency" type="double" value="15.0"/>
|
||||
</node>
|
||||
</group>
|
||||
|
||||
|
||||
<!-- EMERGENCY STOP NODE -->
|
||||
<node pkg="estop" type="estop" name="estop" output="screen"/>
|
||||
|
||||
</launch>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user