Skip to content

Commit a269185

Browse files
committed
Added two versions of MYRABot software in github-repo. The MB_robot folder contains ROS-Fuerte version of our development and it is used in the real robot. MB_robot_hydro folder contains software supported in ROS-HYDRO version and it is used for simulation tasks.
1 parent 92ca19f commit a269185

File tree

497 files changed

+60063
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+60063
-0
lines changed

MB_robot/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 2.4.6)
2+
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
3+
4+
set(ROSPACK_MAKEDIST true)
5+
6+
# Append to CPACK_SOURCE_IGNORE_FILES a semicolon-separated list of
7+
# directories (or patterns, but directories should suffice) that should
8+
# be excluded from the distro. This is not the place to put things that
9+
# should be ignored everywhere, like "build" directories; that happens in
10+
# rosbuild/rosbuild.cmake. Here should be listed packages that aren't
11+
# ready for inclusion in a distro.
12+
#
13+
# This list is combined with the list in rosbuild/rosbuild.cmake. Note
14+
# that CMake 2.6 may be required to ensure that the two lists are combined
15+
# properly. CMake 2.4 seems to have unpredictable scoping rules for such
16+
# variables.
17+
#list(APPEND CPACK_SOURCE_IGNORE_FILES /core/experimental)
18+
19+
rosbuild_make_distribution(1.8.3)
20+

MB_robot/MB.sh

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
#!/bin/bash
2+
3+
#MYRABot Script
4+
FOLDERS="myrabot_arm_base myrabot_arm_model myrabot_gazebo_plugins myrabot_robot_model myrabot_roomba find_object_2d"
5+
6+
CORTINILLA_DE_ESTRELLAS="========================================================"
7+
CORTINILLA_DOS=" ################################################################### "
8+
9+
HELP_MESSAGE="This is the first test-environment script:\\n
10+
-c: lanza el cmake de los packages y compila todo\n
11+
-d: borra toda la información de compilaciones previas\n
12+
-i: instala las dependencias necesarias de PR2 y turtlebot\n
13+
-l: lanza el MYRABot en gazebo\n
14+
-t: arranca la teleoperación (es necesario instalar las app's de turtlebot) \n
15+
-x: about us
16+
"
17+
18+
START_MESSAGE="Welcome to MYRABot robot environment"
19+
20+
INSTALLING_MESSAGE=" >> Now we are going to install the PR2 and turtlebot needed packages <<"
21+
22+
ENDING_MESSAGE="It's done"
23+
24+
PARAM_MESSAGE="Este programa necesita parámetros para ser lanzado. Por favor ejecute:\n \$ ./MB.sh -h"
25+
26+
ROS_FUERTE_PR2_DEPENDENCIES="ros-fuerte-pr2-controllers ros-fuerte-pr2-mechanism ros-fuerte-pr2-simulator"
27+
28+
ROS_FUERTE_TURTLEBOT_DEPENDENCIES="ros-fuerte-turtlebot ros-fuerte-turtlebot-apps ros-fuerte-turtlebot-simulator ros-fuerte-turtlebot-viz ros-fuerte-camera-umd"
29+
30+
message()
31+
{
32+
33+
echo "
34+
##
35+
## ##
36+
# ##
37+
######## ##
38+
##::::::# # ##
39+
##::::::::::# #
40+
#::::::::::::## #
41+
#::::::::::::#::# #
42+
#:::::::::::::#:::#
43+
#:::::::::::::::::#
44+
#:::::::::::::::::#:#
45+
#:::::::::::::::::#:#
46+
#::::::::::::::::::::#
47+
#:::::::::::::::::::::#
48+
#::::::::::::::::::::::#
49+
#####:::#####::::::::::#
50+
# #:# ##:::::::::#
51+
# ## #::::::::#
52+
# ## # #::::::::#
53+
# # # #:::::::#
54+
# # #::::#::#
55+
X#### ## #:::##:##
56+
#::::# ## #::#:#::#
57+
#:::::# #::#:## #
58+
#:::::## #:::::# #
59+
#:::::::## X#::::::# #
60+
#:::::::::##::::::#:#
61+
##########::::::::##
62+
#:::::::::::##:::::::#
63+
#::::::::::::::#::::#:#
64+
##::::::::::::####::###
65+
#:::::::::::## ##:::#
66+
##::::::::## # ##:::#
67+
#### ##### ####:::#
68+
# # # #:#::::##
69+
# # # #::#::::# #
70+
# #####:::#::::# ##
71+
#####::::::##::::## #
72+
##:::::::::#:::::# #
73+
###::::::#::::## #
74+
##::###::::# #
75+
# ####X::::# #
76+
# #::::::## #
77+
# ##:::::# #
78+
# ##::::# ##
79+
## ##::::# # #
80+
## ## ### #::## # ## ###
81+
# ###::### # #:# # ## ###::######
82+
#:#::#::#::# # # # ### #::#::#::#::#
83+
#::#::#::#::# #::#::#::##::# #
84+
#########::#::#::######################::#::#::#:#########
85+
#::#::### ###::#::# dD
86+
## ## ## ##"
87+
88+
89+
}
90+
91+
92+
end_message()
93+
{
94+
echo $CORTINILLA_DOS
95+
echo $ENDING_MESSAGE
96+
echo $CORTINILLA_DOS
97+
}
98+
99+
teleop()
100+
{
101+
roslaunch turtlebot_teleop keyboard_teleop.launch
102+
}
103+
104+
install_dependencies()
105+
{
106+
echo $CORTINILLA_DE_ESTRELLAS
107+
echo "Installing PR2 packages"
108+
echo $CORTINILLA_DE_ESTRELLAS
109+
sudo apt-get install $ROS_FUERTE_PR2_DEPENDENCIES
110+
111+
echo
112+
echo $CORTINILLA_DE_ESTRELLAS
113+
echo "Installing Turtlebot packages"
114+
echo $CORTINILLA_DE_ESTRELLAS
115+
sudo apt-get install $ROS_FUERTE_TURTLEBOT_DEPENDENCIES
116+
117+
end_message
118+
}
119+
120+
premaking()
121+
{
122+
123+
for f in $FOLDERS; do
124+
echo $CORTINILLA_DE_ESTRELLAS
125+
echo " cmaking $f"
126+
echo $CORTINILLA_DE_ESTRELLAS
127+
cd $f
128+
cmake .
129+
cd ..
130+
131+
done
132+
133+
134+
}
135+
136+
delete()
137+
{
138+
echo $CORTINILLA_DE_ESTRELLAS
139+
echo " Removing CMakeCache.txt, Makefile, CMakeFiles, cmake_install.cmake"
140+
echo $CORTINILLA_DE_ESTRELLAS
141+
142+
rm `find . -name "CMakeCache.txt"`
143+
rm `find . -name "Makefile"`
144+
rm -rf `find . -name "CMakeFiles"`
145+
rm -rf `find . -name "cmake_install.cmake"`
146+
147+
end_message
148+
}
149+
150+
151+
##############################################################################
152+
# Script Start
153+
##############################################################################
154+
echo $CORTINILLA_DOS
155+
echo -e $START_MESSAGE
156+
echo -e $CORTINILLA_DOS
157+
158+
159+
##############################################################################
160+
# Check 3 arguments are given #
161+
if [ $# -lt 1 ]
162+
then
163+
echo -e $PARAM_MESSAGE
164+
exit
165+
fi
166+
167+
168+
169+
while getopts ":dcilhtx" optname
170+
do
171+
case "$optname" in
172+
"d")
173+
echo "Option $optname is specified"
174+
delete
175+
;;
176+
"c")
177+
echo "Option $optname is specified"
178+
premaking
179+
rosmake
180+
end_message
181+
;;
182+
"h")
183+
echo -e $HELP_MESSAGE
184+
;;
185+
"i")
186+
echo "Option $optname is specified"
187+
echo -e $INSTALLING_MESSAGE
188+
install_dependencies
189+
;;
190+
"l")
191+
echo "Option $optname is specified"
192+
roslaunch myrabot_robot_model myrabot_gazebo.launch
193+
;;
194+
"t")
195+
teleop
196+
;;
197+
"x")
198+
message
199+
;;
200+
"?")
201+
echo "Unknown option $OPTARG"
202+
;;
203+
":")
204+
echo "No argument value for option $OPTARG"
205+
;;
206+
*)
207+
# Should not occur
208+
echo "Unknown error while processing options"
209+
;;
210+
esac
211+
# echo "OPTIND is now $OPTIND"
212+
done
213+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
cmake_minimum_required(VERSION 2.4.6)
2+
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
3+
4+
# Set the build type. Options are:
5+
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
6+
# Debug : w/ debug symbols, w/o optimization
7+
# Release : w/o debug symbols, w/ optimization
8+
# RelWithDebInfo : w/ debug symbols, w/ optimization
9+
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
10+
#set(ROS_BUILD_TYPE RelWithDebInfo)
11+
12+
rosbuild_init()
13+
14+
ADD_DEFINITIONS(-DPROJECT_PREFIX='"find_object_2d"')
15+
ADD_DEFINITIONS(-DPROJECT_VERSION='"0.2.2"')
16+
17+
#set the default path for built executables to the "bin" directory
18+
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
19+
#set the default path for built libraries to the "lib" directory
20+
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
21+
22+
#uncomment if you have defined messages
23+
rosbuild_genmsg()
24+
#uncomment if you have defined services
25+
#rosbuild_gensrv()
26+
27+
find_package(OpenCV 2.4 REQUIRED)
28+
find_package(Qt4 COMPONENTS QtCore QtGui)
29+
30+
### Qt Gui stuff ###
31+
SET(headers_ui
32+
./src_x/MainWindow.h
33+
./src_x/AddObjectDialog.h
34+
./src_x/ObjWidget.h
35+
./src_x/Camera.h
36+
./src_x/ParametersToolBox.h
37+
./src/CameraROS.h
38+
./src/ObjectsDetectedCallback.h
39+
./src_x/AboutDialog.h
40+
./src_x/utilite/UPlot.h
41+
./src_x/rtabmap/PdfPlot.h
42+
)
43+
44+
SET(uis
45+
./src_x/ui/mainWindow.ui
46+
./src_x/ui/addObjectDialog.ui
47+
./src_x/ui/aboutDialog.ui
48+
)
49+
50+
SET(qrc
51+
./src_x/resources.qrc
52+
)
53+
54+
# generate rules for building source files from the resources
55+
QT4_ADD_RESOURCES(srcs_qrc ${qrc})
56+
57+
#Generate .h files from the .ui files
58+
QT4_WRAP_UI(moc_uis ${uis})
59+
60+
#This will generate moc_* for Qt
61+
QT4_WRAP_CPP(moc_srcs ${headers_ui})
62+
### Qt Gui stuff end###
63+
64+
65+
SET(SRC_FILES
66+
./src_x/MainWindow.cpp
67+
./src_x/AddObjectDialog.cpp
68+
./src_x/KeypointItem.cpp
69+
./src_x/QtOpenCV.cpp
70+
./src_x/Camera.cpp
71+
./src/CameraROS.cpp
72+
./src_x/ParametersToolBox.cpp
73+
./src_x/Settings.cpp
74+
./src_x/ObjWidget.cpp
75+
./src_x/AboutDialog.cpp
76+
./src_x/utilite/UPlot.cpp
77+
./src_x/utilite/UFile.cpp
78+
./src_x/utilite/UDirectory.cpp
79+
./src_x/rtabmap/PdfPlot.cpp
80+
${moc_srcs}
81+
${moc_uis}
82+
${srcs_qrc}
83+
)
84+
85+
SET(INCLUDE_DIRS
86+
${CMAKE_CURRENT_SOURCE_DIR}/src
87+
${CMAKE_CURRENT_SOURCE_DIR}/src_x
88+
${OpenCV_INCLUDE_DIRS}
89+
${CMAKE_CURRENT_BINARY_DIR} # for qt ui generated in binary dir
90+
)
91+
92+
INCLUDE(${QT_USE_FILE})
93+
94+
SET(LIBRARIES
95+
${QT_LIBRARIES}
96+
${OpenCV_LIBS}
97+
)
98+
99+
#include files
100+
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
101+
102+
rosbuild_add_executable(find_object_2d src/find_object_2d_node.cpp ${SRC_FILES})
103+
target_link_libraries(find_object_2d ${LIBRARIES})
104+
105+
rosbuild_add_executable(print_objects_detected src/print_objects_detected_node.cpp)
106+
107+
rosbuild_add_executable(objects_detected src/objects_detected.cpp)
108+
target_link_libraries(objects_detected ${LIBRARIES})
109+
5.51 MB
Binary file not shown.
850 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)