Revision dd5d7f53
Converted back to msgs, before pushing to roboclub VCS
CMakeLists.default.txt | ||
---|---|---|
1 |
# toplevel CMakeLists.txt for a catkin workspace |
|
2 |
# catkin/cmake/toplevel.cmake |
|
3 |
|
|
4 |
cmake_minimum_required(VERSION 2.8.3) |
|
5 |
|
|
6 |
set(CATKIN_TOPLEVEL TRUE) |
|
7 |
|
|
8 |
# include catkin directly or via find_package() |
|
9 |
if(EXISTS "${CMAKE_SOURCE_DIR}/catkin/cmake/all.cmake" AND EXISTS "${CMAKE_SOURCE_DIR}/catkin/CMakeLists.txt") |
|
10 |
set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/catkin/cmake") |
|
11 |
# include all.cmake without add_subdirectory to let it operate in same scope |
|
12 |
include(catkin/cmake/all.cmake NO_POLICY_SCOPE) |
|
13 |
add_subdirectory(catkin) |
|
14 |
|
|
15 |
else() |
|
16 |
# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument |
|
17 |
# or CMAKE_PREFIX_PATH from the environment |
|
18 |
if(NOT DEFINED CMAKE_PREFIX_PATH) |
|
19 |
if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "") |
|
20 |
string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) |
|
21 |
endif() |
|
22 |
endif() |
|
23 |
|
|
24 |
# list of catkin workspaces |
|
25 |
set(catkin_search_path "") |
|
26 |
foreach(path ${CMAKE_PREFIX_PATH}) |
|
27 |
if(EXISTS "${path}/.catkin") |
|
28 |
list(FIND catkin_search_path ${path} _index) |
|
29 |
if(_index EQUAL -1) |
|
30 |
list(APPEND catkin_search_path ${path}) |
|
31 |
endif() |
|
32 |
endif() |
|
33 |
endforeach() |
|
34 |
|
|
35 |
# search for catkin in all workspaces |
|
36 |
set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE) |
|
37 |
find_package(catkin QUIET |
|
38 |
NO_POLICY_SCOPE |
|
39 |
PATHS ${catkin_search_path} |
|
40 |
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) |
|
41 |
unset(CATKIN_TOPLEVEL_FIND_PACKAGE) |
|
42 |
|
|
43 |
if(NOT catkin_FOUND) |
|
44 |
message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.") |
|
45 |
endif() |
|
46 |
endif() |
|
47 |
|
|
48 |
catkin_workspace() |
CMakeLists.txt | ||
---|---|---|
1 |
/opt/ros/groovy/share/catkin/cmake/toplevel.cmake |
|
1 |
/opt/ros/hydro/share/catkin/cmake/toplevel.cmake |
buggycommon/CMakeLists.txt | ||
---|---|---|
1 |
cmake_minimum_required(VERSION 2.8.3) |
|
2 |
project(buggycommon) |
|
3 |
|
|
4 |
## Find catkin macros and libraries |
|
5 |
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) |
|
6 |
## is used, also find other catkin packages |
|
7 |
find_package(catkin REQUIRED COMPONENTS |
|
8 |
roscpp |
|
9 |
rospy |
|
10 |
std_msgs |
|
11 |
message_generation |
|
12 |
) |
|
13 |
|
|
14 |
## System dependencies are found with CMake's conventions |
|
15 |
# find_package(Boost REQUIRED COMPONENTS system) |
|
16 |
|
|
17 |
|
|
18 |
## Uncomment this if the package has a setup.py. This macro ensures |
|
19 |
## modules and global scripts declared therein get installed |
|
20 |
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html |
|
21 |
# catkin_python_setup() |
|
22 |
|
|
23 |
################################################ |
|
24 |
## Declare ROS messages, services and actions ## |
|
25 |
################################################ |
|
26 |
|
|
27 |
## To declare and build messages, services or actions from within this |
|
28 |
## package, follow these steps: |
|
29 |
## * Let MSG_DEP_SET be the set of packages whose message types you use in |
|
30 |
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). |
|
31 |
## * In the file package.xml: |
|
32 |
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET |
|
33 |
## * If MSG_DEP_SET isn't empty the following dependencies might have been |
|
34 |
## pulled in transitively but can be declared for certainty nonetheless: |
|
35 |
## * add a build_depend tag for "message_generation" |
|
36 |
## * add a run_depend tag for "message_runtime" |
|
37 |
## * In this file (CMakeLists.txt): |
|
38 |
## * add "message_generation" and every package in MSG_DEP_SET to |
|
39 |
## find_package(catkin REQUIRED COMPONENTS ...) |
|
40 |
## * add "message_runtime" and every package in MSG_DEP_SET to |
|
41 |
## catkin_package(CATKIN_DEPENDS ...) |
|
42 |
## * uncomment the add_*_files sections below as needed |
|
43 |
## and list every .msg/.srv/.action file to be processed |
|
44 |
## * uncomment the generate_messages entry below |
|
45 |
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) |
|
46 |
|
|
47 |
## Generate messages in the 'msg' folder |
|
48 |
add_message_files( |
|
49 |
FILES |
|
50 |
Pose.msg |
|
51 |
Direction.msg |
|
52 |
) |
|
53 |
|
|
54 |
## Generate services in the 'srv' folder |
|
55 |
# add_service_files( |
|
56 |
# FILES |
|
57 |
# Service1.srv |
|
58 |
# Service2.srv |
|
59 |
# ) |
|
60 |
|
|
61 |
## Generate actions in the 'action' folder |
|
62 |
# add_action_files( |
|
63 |
# FILES |
|
64 |
# Action1.action |
|
65 |
# Action2.action |
|
66 |
# ) |
|
67 |
|
|
68 |
## Generate added messages and services with any dependencies listed here |
|
69 |
generate_messages( |
|
70 |
DEPENDENCIES |
|
71 |
std_msgs |
|
72 |
) |
|
73 |
|
|
74 |
################################### |
|
75 |
## catkin specific configuration ## |
|
76 |
################################### |
|
77 |
## The catkin_package macro generates cmake config files for your package |
|
78 |
## Declare things to be passed to dependent projects |
|
79 |
## INCLUDE_DIRS: uncomment this if you package contains header files |
|
80 |
## LIBRARIES: libraries you create in this project that dependent projects also need |
|
81 |
## CATKIN_DEPENDS: catkin_packages dependent projects also need |
|
82 |
## DEPENDS: system dependencies of this project that dependent projects also need |
|
83 |
catkin_package( |
|
84 |
# INCLUDE_DIRS include |
|
85 |
# LIBRARIES buggymsgs |
|
86 |
CATKIN_DEPENDS roscpp rospy std_msgs message_runtime |
|
87 |
# DEPENDS system_lib |
|
88 |
) |
|
89 |
|
|
90 |
########### |
|
91 |
## Build ## |
|
92 |
########### |
|
93 |
|
|
94 |
## Specify additional locations of header files |
|
95 |
## Your package locations should be listed before other locations |
|
96 |
# include_directories(include) |
|
97 |
include_directories( |
|
98 |
${catkin_INCLUDE_DIRS} |
|
99 |
) |
|
100 |
|
|
101 |
## Declare a cpp library |
|
102 |
# add_library(buggymsgs |
|
103 |
# src/${PROJECT_NAME}/buggymsgs.cpp |
|
104 |
# ) |
|
105 |
|
|
106 |
## Declare a cpp executable |
|
107 |
# add_executable(buggymsgs_node src/buggymsgs_node.cpp) |
|
108 |
|
|
109 |
## Add cmake target dependencies of the executable/library |
|
110 |
## as an example, message headers may need to be generated before nodes |
|
111 |
# add_dependencies(buggymsgs_node buggymsgs_generate_messages_cpp) |
|
112 |
|
|
113 |
## Specify libraries to link a library or executable target against |
|
114 |
# target_link_libraries(buggymsgs_node |
|
115 |
# ${catkin_LIBRARIES} |
|
116 |
# ) |
|
117 |
|
|
118 |
############# |
|
119 |
## Install ## |
|
120 |
############# |
|
121 |
|
|
122 |
# all install targets should use catkin DESTINATION variables |
|
123 |
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html |
|
124 |
|
|
125 |
## Mark executable scripts (Python etc.) for installation |
|
126 |
## in contrast to setup.py, you can choose the destination |
|
127 |
# install(PROGRAMS |
|
128 |
# scripts/my_python_script |
|
129 |
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
|
130 |
# ) |
|
131 |
|
|
132 |
## Mark executables and/or libraries for installation |
|
133 |
# install(TARGETS buggymsgs buggymsgs_node |
|
134 |
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
|
135 |
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
|
136 |
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
|
137 |
# ) |
|
138 |
|
|
139 |
## Mark cpp header files for installation |
|
140 |
# install(DIRECTORY include/${PROJECT_NAME}/ |
|
141 |
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} |
|
142 |
# FILES_MATCHING PATTERN "*.h" |
|
143 |
# PATTERN ".svn" EXCLUDE |
|
144 |
# ) |
|
145 |
|
|
146 |
## Mark other files for installation (e.g. launch and bag files, etc.) |
|
147 |
# install(FILES |
|
148 |
# # myfile1 |
|
149 |
# # myfile2 |
|
150 |
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
|
151 |
# ) |
|
152 |
|
|
153 |
############# |
|
154 |
## Testing ## |
|
155 |
############# |
|
156 |
|
|
157 |
## Add gtest based cpp test target and link libraries |
|
158 |
# catkin_add_gtest(${PROJECT_NAME}-test test/test_buggymsgs.cpp) |
|
159 |
# if(TARGET ${PROJECT_NAME}-test) |
|
160 |
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) |
|
161 |
# endif() |
|
162 |
|
|
163 |
## Add folders to be run by python nosetests |
|
164 |
# catkin_add_nosetests(test) |
buggycommon/msg/Direction.msg | ||
---|---|---|
1 |
float32 turnAngle |
buggycommon/msg/Pose.msg | ||
---|---|---|
1 |
float32 x |
|
2 |
float32 y |
|
3 |
float32 angle |
|
4 |
|
|
5 |
float32 linear_velocity |
|
6 |
float32 angular_velocity |
buggycommon/package.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<package> |
|
3 |
<name>buggycommon</name> |
|
4 |
<version>0.0.2</version> |
|
5 |
<description>The buggycommon package</description> |
|
6 |
|
|
7 |
<!-- One maintainer tag required, multiple allowed, one person per tag --> |
|
8 |
<!-- Example: --> |
|
9 |
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> |
|
10 |
<maintainer email="tahm@todo.todo">tahm</maintainer> |
|
11 |
|
|
12 |
|
|
13 |
<!-- One license tag required, multiple allowed, one license per tag --> |
|
14 |
<!-- Commonly used license strings: --> |
|
15 |
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> |
|
16 |
<license>TODO</license> |
|
17 |
|
|
18 |
|
|
19 |
<!-- Url tags are optional, but mutiple are allowed, one per tag --> |
|
20 |
<!-- Optional attribute type can be: website, bugtracker, or repository --> |
|
21 |
<!-- Example: --> |
|
22 |
<!-- <url type="website">http://wiki.ros.org/buggymsgs</url> --> |
|
23 |
|
|
24 |
|
|
25 |
<!-- Author tags are optional, mutiple are allowed, one per tag --> |
|
26 |
<!-- Authors do not have to be maintianers, but could be --> |
|
27 |
<!-- Example: --> |
|
28 |
<!-- <author email="jane.doe@example.com">Jane Doe</author> --> |
|
29 |
|
|
30 |
|
|
31 |
<!-- The *_depend tags are used to specify dependencies --> |
|
32 |
<!-- Dependencies can be catkin packages or system dependencies --> |
|
33 |
<!-- Examples: --> |
|
34 |
<!-- Use build_depend for packages you need at compile time: --> |
|
35 |
<!-- <build_depend>message_generation</build_depend> --> |
|
36 |
<!-- Use buildtool_depend for build tool packages: --> |
|
37 |
<!-- <buildtool_depend>catkin</buildtool_depend> --> |
|
38 |
<!-- Use run_depend for packages you need at runtime: --> |
|
39 |
<!-- <run_depend>message_runtime</run_depend> --> |
|
40 |
<!-- Use test_depend for packages you need only for testing: --> |
|
41 |
<!-- <test_depend>gtest</test_depend> --> |
|
42 |
<buildtool_depend>catkin</buildtool_depend> |
|
43 |
|
|
44 |
|
|
45 |
<build_depend>roscpp</build_depend> |
|
46 |
<build_depend>rospy</build_depend> |
|
47 |
<build_depend>std_msgs</build_depend> |
|
48 |
<build_depend>message_generation</build_depend> |
|
49 |
|
|
50 |
<run_depend>roscpp</run_depend> |
|
51 |
<run_depend>rospy</run_depend> |
|
52 |
<run_depend>std_msgs</run_depend> |
|
53 |
<run_depend>message_runtime</run_depend> |
|
54 |
|
|
55 |
|
|
56 |
<!-- The export tag contains other, unspecified, tags --> |
|
57 |
<export> |
|
58 |
<!-- You can specify that this package is a metapackage here: --> |
|
59 |
<!-- <metapackage/> --> |
|
60 |
|
|
61 |
<!-- Other tools can request additional information be placed here --> |
|
62 |
|
|
63 |
</export> |
|
64 |
</package> |
buggymsgs/CMakeLists.txt | ||
---|---|---|
1 |
cmake_minimum_required(VERSION 2.8.3) |
|
2 |
project(buggymsgs) |
|
3 |
|
|
4 |
## Find catkin macros and libraries |
|
5 |
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) |
|
6 |
## is used, also find other catkin packages |
|
7 |
find_package(catkin REQUIRED COMPONENTS |
|
8 |
roscpp |
|
9 |
rospy |
|
10 |
std_msgs |
|
11 |
message_generation |
|
12 |
) |
|
13 |
|
|
14 |
## System dependencies are found with CMake's conventions |
|
15 |
# find_package(Boost REQUIRED COMPONENTS system) |
|
16 |
|
|
17 |
|
|
18 |
## Uncomment this if the package has a setup.py. This macro ensures |
|
19 |
## modules and global scripts declared therein get installed |
|
20 |
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html |
|
21 |
# catkin_python_setup() |
|
22 |
|
|
23 |
################################################ |
|
24 |
## Declare ROS messages, services and actions ## |
|
25 |
################################################ |
|
26 |
|
|
27 |
## To declare and build messages, services or actions from within this |
|
28 |
## package, follow these steps: |
|
29 |
## * Let MSG_DEP_SET be the set of packages whose message types you use in |
|
30 |
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). |
|
31 |
## * In the file package.xml: |
|
32 |
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET |
|
33 |
## * If MSG_DEP_SET isn't empty the following dependencies might have been |
|
34 |
## pulled in transitively but can be declared for certainty nonetheless: |
|
35 |
## * add a build_depend tag for "message_generation" |
|
36 |
## * add a run_depend tag for "message_runtime" |
|
37 |
## * In this file (CMakeLists.txt): |
|
38 |
## * add "message_generation" and every package in MSG_DEP_SET to |
|
39 |
## find_package(catkin REQUIRED COMPONENTS ...) |
|
40 |
## * add "message_runtime" and every package in MSG_DEP_SET to |
|
41 |
## catkin_package(CATKIN_DEPENDS ...) |
|
42 |
## * uncomment the add_*_files sections below as needed |
|
43 |
## and list every .msg/.srv/.action file to be processed |
|
44 |
## * uncomment the generate_messages entry below |
|
45 |
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) |
|
46 |
|
|
47 |
## Generate messages in the 'msg' folder |
|
48 |
add_message_files( |
|
49 |
FILES |
|
50 |
Pose.msg |
|
51 |
Direction.msg |
|
52 |
) |
|
53 |
|
|
54 |
## Generate services in the 'srv' folder |
|
55 |
# add_service_files( |
|
56 |
# FILES |
|
57 |
# Service1.srv |
|
58 |
# Service2.srv |
|
59 |
# ) |
|
60 |
|
|
61 |
## Generate actions in the 'action' folder |
|
62 |
# add_action_files( |
|
63 |
# FILES |
|
64 |
# Action1.action |
|
65 |
# Action2.action |
|
66 |
# ) |
|
67 |
|
|
68 |
## Generate added messages and services with any dependencies listed here |
|
69 |
generate_messages( |
|
70 |
DEPENDENCIES |
|
71 |
std_msgs |
|
72 |
) |
|
73 |
|
|
74 |
################################### |
|
75 |
## catkin specific configuration ## |
|
76 |
################################### |
|
77 |
## The catkin_package macro generates cmake config files for your package |
|
78 |
## Declare things to be passed to dependent projects |
|
79 |
## INCLUDE_DIRS: uncomment this if you package contains header files |
|
80 |
## LIBRARIES: libraries you create in this project that dependent projects also need |
|
81 |
## CATKIN_DEPENDS: catkin_packages dependent projects also need |
|
82 |
## DEPENDS: system dependencies of this project that dependent projects also need |
|
83 |
catkin_package( |
|
84 |
# INCLUDE_DIRS include |
|
85 |
# LIBRARIES buggymsgs |
|
86 |
CATKIN_DEPENDS roscpp rospy std_msgs message_runtime |
|
87 |
# DEPENDS system_lib |
|
88 |
) |
|
89 |
|
|
90 |
########### |
|
91 |
## Build ## |
|
92 |
########### |
|
93 |
|
|
94 |
## Specify additional locations of header files |
|
95 |
## Your package locations should be listed before other locations |
|
96 |
# include_directories(include) |
|
97 |
include_directories( |
|
98 |
${catkin_INCLUDE_DIRS} |
|
99 |
) |
|
100 |
|
|
101 |
## Declare a cpp library |
|
102 |
# add_library(buggymsgs |
|
103 |
# src/${PROJECT_NAME}/buggymsgs.cpp |
|
104 |
# ) |
|
105 |
|
|
106 |
## Declare a cpp executable |
|
107 |
# add_executable(buggymsgs_node src/buggymsgs_node.cpp) |
|
108 |
|
|
109 |
## Add cmake target dependencies of the executable/library |
|
110 |
## as an example, message headers may need to be generated before nodes |
|
111 |
# add_dependencies(buggymsgs_node buggymsgs_generate_messages_cpp) |
|
112 |
|
|
113 |
## Specify libraries to link a library or executable target against |
|
114 |
# target_link_libraries(buggymsgs_node |
|
115 |
# ${catkin_LIBRARIES} |
|
116 |
# ) |
|
117 |
|
|
118 |
############# |
|
119 |
## Install ## |
|
120 |
############# |
|
121 |
|
|
122 |
# all install targets should use catkin DESTINATION variables |
|
123 |
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html |
|
124 |
|
|
125 |
## Mark executable scripts (Python etc.) for installation |
|
126 |
## in contrast to setup.py, you can choose the destination |
|
127 |
# install(PROGRAMS |
|
128 |
# scripts/my_python_script |
|
129 |
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
|
130 |
# ) |
|
131 |
|
|
132 |
## Mark executables and/or libraries for installation |
|
133 |
# install(TARGETS buggymsgs buggymsgs_node |
|
134 |
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
|
135 |
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
|
136 |
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
|
137 |
# ) |
|
138 |
|
|
139 |
## Mark cpp header files for installation |
|
140 |
# install(DIRECTORY include/${PROJECT_NAME}/ |
|
141 |
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} |
|
142 |
# FILES_MATCHING PATTERN "*.h" |
|
143 |
# PATTERN ".svn" EXCLUDE |
|
144 |
# ) |
|
145 |
|
|
146 |
## Mark other files for installation (e.g. launch and bag files, etc.) |
|
147 |
# install(FILES |
|
148 |
# # myfile1 |
|
149 |
# # myfile2 |
|
150 |
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
|
151 |
# ) |
|
152 |
|
|
153 |
############# |
|
154 |
## Testing ## |
|
155 |
############# |
|
156 |
|
|
157 |
## Add gtest based cpp test target and link libraries |
|
158 |
# catkin_add_gtest(${PROJECT_NAME}-test test/test_buggymsgs.cpp) |
|
159 |
# if(TARGET ${PROJECT_NAME}-test) |
|
160 |
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) |
|
161 |
# endif() |
|
162 |
|
|
163 |
## Add folders to be run by python nosetests |
|
164 |
# catkin_add_nosetests(test) |
buggymsgs/msg/Direction.msg | ||
---|---|---|
1 |
float32 turnAngle |
buggymsgs/msg/Pose.msg | ||
---|---|---|
1 |
float32 x |
|
2 |
float32 y |
|
3 |
float32 angle |
|
4 |
|
|
5 |
float32 linear_velocity |
|
6 |
float32 angular_velocity |
buggymsgs/package.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<package> |
|
3 |
<name>buggymsgs</name> |
|
4 |
<version>0.0.2</version> |
|
5 |
<description>The buggycommon package</description> |
|
6 |
|
|
7 |
<!-- One maintainer tag required, multiple allowed, one person per tag --> |
|
8 |
<!-- Example: --> |
|
9 |
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> |
|
10 |
<maintainer email="tahm@todo.todo">tahm</maintainer> |
|
11 |
|
|
12 |
|
|
13 |
<!-- One license tag required, multiple allowed, one license per tag --> |
|
14 |
<!-- Commonly used license strings: --> |
|
15 |
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> |
|
16 |
<license>TODO</license> |
|
17 |
|
|
18 |
|
|
19 |
<!-- Url tags are optional, but mutiple are allowed, one per tag --> |
|
20 |
<!-- Optional attribute type can be: website, bugtracker, or repository --> |
|
21 |
<!-- Example: --> |
|
22 |
<!-- <url type="website">http://wiki.ros.org/buggymsgs</url> --> |
|
23 |
|
|
24 |
|
|
25 |
<!-- Author tags are optional, mutiple are allowed, one per tag --> |
|
26 |
<!-- Authors do not have to be maintianers, but could be --> |
|
27 |
<!-- Example: --> |
|
28 |
<!-- <author email="jane.doe@example.com">Jane Doe</author> --> |
|
29 |
|
|
30 |
|
|
31 |
<!-- The *_depend tags are used to specify dependencies --> |
|
32 |
<!-- Dependencies can be catkin packages or system dependencies --> |
|
33 |
<!-- Examples: --> |
|
34 |
<!-- Use build_depend for packages you need at compile time: --> |
|
35 |
<!-- <build_depend>message_generation</build_depend> --> |
|
36 |
<!-- Use buildtool_depend for build tool packages: --> |
|
37 |
<!-- <buildtool_depend>catkin</buildtool_depend> --> |
|
38 |
<!-- Use run_depend for packages you need at runtime: --> |
|
39 |
<!-- <run_depend>message_runtime</run_depend> --> |
|
40 |
<!-- Use test_depend for packages you need only for testing: --> |
|
41 |
<!-- <test_depend>gtest</test_depend> --> |
|
42 |
<buildtool_depend>catkin</buildtool_depend> |
|
43 |
|
|
44 |
|
|
45 |
<build_depend>roscpp</build_depend> |
|
46 |
<build_depend>rospy</build_depend> |
|
47 |
<build_depend>std_msgs</build_depend> |
|
48 |
<build_depend>message_generation</build_depend> |
|
49 |
|
|
50 |
<run_depend>roscpp</run_depend> |
|
51 |
<run_depend>rospy</run_depend> |
|
52 |
<run_depend>std_msgs</run_depend> |
|
53 |
<run_depend>message_runtime</run_depend> |
|
54 |
|
|
55 |
|
|
56 |
<!-- The export tag contains other, unspecified, tags --> |
|
57 |
<export> |
|
58 |
<!-- You can specify that this package is a metapackage here: --> |
|
59 |
<!-- <metapackage/> --> |
|
60 |
|
|
61 |
<!-- Other tools can request additional information be placed here --> |
|
62 |
|
|
63 |
</export> |
|
64 |
</package> |
buggysim/CMakeLists.txt | ||
---|---|---|
1 | 1 |
cmake_minimum_required(VERSION 2.8.3) |
2 | 2 |
project(buggysim) |
3 | 3 |
|
4 |
find_package(catkin REQUIRED COMPONENTS message_generation roscpp roslib rosconsole std_msgs std_srvs rostime roscpp_serialization buggycommon)
|
|
4 |
find_package(catkin REQUIRED COMPONENTS message_generation roscpp roslib rosconsole std_msgs std_srvs rostime roscpp_serialization buggymsgs)
|
|
5 | 5 |
|
6 | 6 |
find_package(Qt4 4.6 REQUIRED COMPONENTS QtCore QtGui) |
7 | 7 |
include(${QT_USE_FILE}) |
... | ... | |
10 | 10 |
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS}) |
11 | 11 |
link_directories(${catkin_LIBRARY_DIRS}) |
12 | 12 |
|
13 |
add_message_files(DIRECTORY msg FILES |
|
14 |
Velocity.msg) |
|
13 |
#add_message_files(DIRECTORY msg FILES
|
|
14 |
# Velocity.msg)
|
|
15 | 15 |
# Color.msg Pose.msg Velocity.msg) |
16 | 16 |
add_service_files(DIRECTORY srv FILES |
17 | 17 |
Kill.srv |
... | ... | |
19 | 19 |
Spawn.srv |
20 | 20 |
TeleportAbsolute.srv |
21 | 21 |
TeleportRelative.srv) |
22 |
|
|
22 | 23 |
generate_messages(DEPENDENCIES std_msgs std_srvs) |
23 | 24 |
|
24 |
catkin_package(CATKIN_DEPENDS message_runtime buggycommon std_msgs std_srvs)
|
|
25 |
catkin_package(CATKIN_DEPENDS message_runtime buggymsgs std_msgs std_srvs)
|
|
25 | 26 |
|
26 | 27 |
# Set up the dependencies for turtlesim_node |
27 | 28 |
set(turtlesim_node_SRCS |
... | ... | |
46 | 47 |
|
47 | 48 |
# Build the teleop...thing. I thought it was a package, |
48 | 49 |
# it obviously isn't |
49 |
add_executable(buggy_teleop_key tutorials/teleop_turtle_key.cpp) |
|
50 |
target_link_libraries(buggy_teleop_key ${catkin_LIBRARIES}) |
|
51 |
add_dependencies(buggy_teleop_key turtlesim_gencpp) |
|
50 |
#add_executable(buggy_teleop_key tutorials/teleop_turtle_key.cpp)
|
|
51 |
#target_link_libraries(buggy_teleop_key ${catkin_LIBRARIES})
|
|
52 |
#add_dependencies(buggy_teleop_key turtlesim_gencpp)
|
|
52 | 53 |
|
53 | 54 |
|
54 | 55 |
# Build draw_square. so many words |
55 |
add_executable(buggy_draw_square tutorials/draw_square.cpp) |
|
56 |
target_link_libraries(buggy_draw_square ${catkin_LIBRARIES} ${Boost_LIBRARIES}) |
|
57 |
add_dependencies(buggy_draw_square turtlesim_gencpp) |
|
56 |
#add_executable(buggy_draw_square tutorials/draw_square.cpp)
|
|
57 |
#target_link_libraries(buggy_draw_square ${catkin_LIBRARIES} ${Boost_LIBRARIES})
|
|
58 |
#add_dependencies(buggy_draw_square turtlesim_gencpp)
|
|
58 | 59 |
|
59 | 60 |
# but these words I know, it spawns a turtle that does follor the leader |
60 |
add_executable(buggy_mimic tutorials/mimic.cpp) |
|
61 |
target_link_libraries(buggy_mimic ${catkin_LIBRARIES}) |
|
62 |
add_dependencies(buggy_mimic turtlesim_gencpp) |
|
61 |
#add_executable(buggy_mimic tutorials/mimic.cpp)
|
|
62 |
#target_link_libraries(buggy_mimic ${catkin_LIBRARIES})
|
|
63 |
#add_dependencies(buggy_mimic turtlesim_gencpp)
|
|
63 | 64 |
|
64 | 65 |
# Install the built executables |
65 |
install(TARGETS buggysim_node buggy_teleop_key buggy_draw_square buggy_mimic |
|
66 |
install(TARGETS buggysim_node #buggy_teleop_key buggy_draw_square buggy_mimic
|
|
66 | 67 |
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) |
67 | 68 |
|
68 | 69 |
# Install the images into the correct folder. |
buggysim/package.xml | ||
---|---|---|
27 | 27 |
<build_depend>rostime</build_depend> |
28 | 28 |
<build_depend>std_msgs</build_depend> |
29 | 29 |
<build_depend>std_srvs</build_depend> |
30 |
<build_depend>buggycommon</build_depend>
|
|
30 |
<build_depend>buggymsgs</build_depend>
|
|
31 | 31 |
|
32 | 32 |
<run_depend>libqt4</run_depend> |
33 | 33 |
<run_depend>message_runtime</run_depend> |
... | ... | |
38 | 38 |
<run_depend>rostime</run_depend> |
39 | 39 |
<run_depend>std_msgs</run_depend> |
40 | 40 |
<run_depend>std_srvs</run_depend> |
41 |
<run_depend>buggycommon</run_depend> |
|
41 |
<run_depend>buggymsgs</run_depend> |
|
42 |
|
|
42 | 43 |
</package> |
buggysim/tutorials/draw_square.cpp | ||
---|---|---|
1 | 1 |
#include <boost/bind.hpp> |
2 | 2 |
#include <ros/ros.h> |
3 |
#include <turtlesim/Pose.h>
|
|
4 |
#include <turtlesim/Velocity.h>
|
|
3 |
#include <buggymsgs/Pose.h>
|
|
4 |
#include <buggymsgs/Velocity.h>
|
|
5 | 5 |
#include <std_srvs/Empty.h> |
6 | 6 |
|
7 | 7 |
turtlesim::PoseConstPtr g_pose; |
... | ... | |
20 | 20 |
|
21 | 21 |
#define PI 3.141592 |
22 | 22 |
|
23 |
void poseCallback(const turtlesim::PoseConstPtr& pose)
|
|
23 |
void poseCallback(const buggymsgs::PoseConstPtr& pose)
|
|
24 | 24 |
{ |
25 | 25 |
g_pose = pose; |
26 | 26 |
} |
turtlesim_ref/CMakeLists.txt | ||
---|---|---|
13 | 13 |
|
14 | 14 |
add_message_files(DIRECTORY msg FILES |
15 | 15 |
Color.msg Pose.msg Velocity.msg) |
16 |
|
|
16 | 17 |
add_service_files(DIRECTORY srv FILES |
17 | 18 |
Kill.srv |
18 | 19 |
SetPen.srv |
... | ... | |
46 | 47 |
# it obviously isn't |
47 | 48 |
add_executable(turtle_teleop_key tutorials/teleop_turtle_key.cpp) |
48 | 49 |
target_link_libraries(turtle_teleop_key ${catkin_LIBRARIES}) |
49 |
add_dependencies(turtle_teleop_key turtlesim_gencpp) |
|
50 |
add_dependencies(turtle_teleop_key turtlesim_ref_gencpp)
|
|
50 | 51 |
|
51 | 52 |
|
52 | 53 |
# Build draw_square. so many words |
53 | 54 |
add_executable(draw_square tutorials/draw_square.cpp) |
54 | 55 |
target_link_libraries(draw_square ${catkin_LIBRARIES} ${Boost_LIBRARIES}) |
55 |
add_dependencies(draw_square turtlesim_gencpp) |
|
56 |
add_dependencies(draw_square turtlesim_ref_gencpp)
|
|
56 | 57 |
|
57 | 58 |
# but these words I know, it spawns a turtle that does follow the leader |
58 | 59 |
add_executable(mimic tutorials/mimic.cpp) |
59 | 60 |
target_link_libraries(mimic ${catkin_LIBRARIES}) |
60 |
add_dependencies(mimic turtlesim_gencpp) |
|
61 |
add_dependencies(mimic turtlesim_ref_gencpp)
|
|
61 | 62 |
|
62 | 63 |
install(TARGETS turtlesim_node turtle_teleop_key draw_square mimic |
63 | 64 |
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) |
turtlesim_ref/include/turtlesim/turtle.h | ||
---|---|---|
35 | 35 |
# include <ros/ros.h> |
36 | 36 |
# include <boost/shared_ptr.hpp> |
37 | 37 |
|
38 |
# include <turtlesim/Pose.h> |
|
39 |
#include <turtlesim/Velocity.h>
|
|
40 |
# include <turtlesim/SetPen.h> |
|
41 |
# include <turtlesim/TeleportRelative.h> |
|
42 |
# include <turtlesim/TeleportAbsolute.h> |
|
43 |
# include <turtlesim/Color.h> |
|
38 |
# include <turtlesim_ref/Pose.h>
|
|
39 |
# include <turtlesim_ref/Velocity.h>
|
|
40 |
# include <turtlesim_ref/SetPen.h>
|
|
41 |
# include <turtlesim_ref/TeleportRelative.h>
|
|
42 |
# include <turtlesim_ref/TeleportAbsolute.h>
|
|
43 |
# include <turtlesim_ref/Color.h>
|
|
44 | 44 |
#endif |
45 | 45 |
|
46 | 46 |
#include <QImage> |
... | ... | |
50 | 50 |
|
51 | 51 |
#define PI 3.14159265 |
52 | 52 |
|
53 |
namespace turtlesim |
|
53 |
namespace turtlesim_ref
|
|
54 | 54 |
{ |
55 | 55 |
|
56 | 56 |
class Turtle |
... | ... | |
61 | 61 |
bool update(double dt, QPainter& path_painter, const QImage& path_image, qreal canvas_width, qreal canvas_height); |
62 | 62 |
void paint(QPainter &painter); |
63 | 63 |
private: |
64 |
void velocityCallback(const VelocityConstPtr& vel); |
|
65 |
bool setPenCallback(turtlesim::SetPen::Request&, turtlesim::SetPen::Response&);
|
|
66 |
bool teleportRelativeCallback(turtlesim::TeleportRelative::Request&, turtlesim::TeleportRelative::Response&);
|
|
67 |
bool teleportAbsoluteCallback(turtlesim::TeleportAbsolute::Request&, turtlesim::TeleportAbsolute::Response&);
|
|
64 |
void velocityCallback(const turtlesim_ref::VelocityConstPtr& vel);
|
|
65 |
bool setPenCallback(turtlesim_ref::SetPen::Request&, turtlesim_ref::SetPen::Response&);
|
|
66 |
bool teleportRelativeCallback(turtlesim_ref::TeleportRelative::Request&, turtlesim_ref::TeleportRelative::Response&);
|
|
67 |
bool teleportAbsoluteCallback(turtlesim_ref::TeleportAbsolute::Request&, turtlesim_ref::TeleportAbsolute::Response&);
|
|
68 | 68 |
|
69 | 69 |
void rotateImage(); |
70 | 70 |
|
turtlesim_ref/include/turtlesim/turtle_frame.h | ||
---|---|---|
39 | 39 |
# include <ros/ros.h> |
40 | 40 |
|
41 | 41 |
# include <std_srvs/Empty.h> |
42 |
# include <turtlesim/Spawn.h> |
|
43 |
# include <turtlesim/Kill.h> |
|
42 |
# include <turtlesim_ref/Spawn.h>
|
|
43 |
# include <turtlesim_ref/Kill.h>
|
|
44 | 44 |
# include <map> |
45 | 45 |
|
46 | 46 |
# include "turtle.h" |
47 | 47 |
#endif |
48 | 48 |
|
49 |
namespace turtlesim |
|
49 |
namespace turtlesim_ref
|
|
50 | 50 |
{ |
51 | 51 |
|
52 | 52 |
class TurtleFrame : public QFrame |
... | ... | |
71 | 71 |
|
72 | 72 |
bool clearCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&); |
73 | 73 |
bool resetCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&); |
74 |
bool spawnCallback(turtlesim::Spawn::Request&, turtlesim::Spawn::Response&);
|
|
75 |
bool killCallback(turtlesim::Kill::Request&, turtlesim::Kill::Response&);
|
|
74 |
bool spawnCallback(turtlesim_ref::Spawn::Request&, turtlesim_ref::Spawn::Response&);
|
|
75 |
bool killCallback(turtlesim_ref::Kill::Request&, turtlesim_ref::Kill::Response&);
|
|
76 | 76 |
|
77 | 77 |
ros::NodeHandle nh_; |
78 | 78 |
QTimer* update_timer_; |
turtlesim_ref/src/turtle.cpp | ||
---|---|---|
36 | 36 |
#define DEFAULT_PEN_G 0xb8 |
37 | 37 |
#define DEFAULT_PEN_B 0xff |
38 | 38 |
|
39 |
namespace turtlesim |
|
39 |
namespace turtlesim_ref
|
|
40 | 40 |
{ |
41 | 41 |
|
42 | 42 |
Turtle::Turtle(const ros::NodeHandle& nh, const QImage& turtle_image, const QPointF& pos, float orient) |
... | ... | |
71 | 71 |
ang_vel_ = vel->angular; |
72 | 72 |
} |
73 | 73 |
|
74 |
bool Turtle::setPenCallback(turtlesim::SetPen::Request& req, turtlesim::SetPen::Response&)
|
|
74 |
bool Turtle::setPenCallback(turtlesim_ref::SetPen::Request& req, turtlesim_ref::SetPen::Response&)
|
|
75 | 75 |
{ |
76 | 76 |
pen_on_ = !req.off; |
77 | 77 |
if (req.off) |
... | ... | |
89 | 89 |
return true; |
90 | 90 |
} |
91 | 91 |
|
92 |
bool Turtle::teleportRelativeCallback(turtlesim::TeleportRelative::Request& req, turtlesim::TeleportRelative::Response&) |
|
92 |
bool Turtle::teleportRelativeCallback(turtlesim_ref::TeleportRelative::Request& req, |
|
93 |
turtlesim_ref::TeleportRelative::Response&) |
|
93 | 94 |
{ |
94 | 95 |
teleport_requests_.push_back(TeleportRequest(0, 0, req.angular, req.linear, true)); |
95 | 96 |
return true; |
96 | 97 |
} |
97 | 98 |
|
98 |
bool Turtle::teleportAbsoluteCallback(turtlesim::TeleportAbsolute::Request& req, turtlesim::TeleportAbsolute::Response&) |
|
99 |
bool Turtle::teleportAbsoluteCallback(turtlesim_ref::TeleportAbsolute::Request& req, |
|
100 |
turtlesim_ref::TeleportAbsolute::Response&) |
|
99 | 101 |
{ |
100 | 102 |
teleport_requests_.push_back(TeleportRequest(req.x, req.y, req.theta, 0, false)); |
101 | 103 |
return true; |
turtlesim_ref/src/turtle_frame.cpp | ||
---|---|---|
39 | 39 |
#define DEFAULT_BG_G 0x56 |
40 | 40 |
#define DEFAULT_BG_B 0xff |
41 | 41 |
|
42 |
namespace turtlesim |
|
42 |
namespace turtlesim_ref
|
|
43 | 43 |
{ |
44 | 44 |
|
45 | 45 |
TurtleFrame::TurtleFrame(QWidget* parent, Qt::WindowFlags f) |
... | ... | |
103 | 103 |
delete update_timer_; |
104 | 104 |
} |
105 | 105 |
|
106 |
bool TurtleFrame::spawnCallback(turtlesim::Spawn::Request& req, turtlesim::Spawn::Response& res) |
|
106 |
bool TurtleFrame::spawnCallback(turtlesim_ref::Spawn::Request& req, |
|
107 |
turtlesim_ref::Spawn::Response& res) |
|
107 | 108 |
{ |
108 | 109 |
std::string name = spawnTurtle(req.name, req.x, req.y, req.theta); |
109 | 110 |
if (name.empty()) |
... | ... | |
117 | 118 |
return true; |
118 | 119 |
} |
119 | 120 |
|
120 |
bool TurtleFrame::killCallback(turtlesim::Kill::Request& req, turtlesim::Kill::Response&) |
|
121 |
bool TurtleFrame::killCallback(turtlesim_ref::Kill::Request& req, |
|
122 |
turtlesim_ref::Kill::Response&) |
|
121 | 123 |
{ |
122 | 124 |
M_Turtle::iterator it = turtles_.find(req.name); |
123 | 125 |
if (it == turtles_.end()) |
turtlesim_ref/src/turtlesim.cpp | ||
---|---|---|
47 | 47 |
|
48 | 48 |
int exec() |
49 | 49 |
{ |
50 |
turtlesim::TurtleFrame frame; |
|
50 |
turtlesim_ref::TurtleFrame frame;
|
|
51 | 51 |
frame.show(); |
52 | 52 |
|
53 | 53 |
return QApplication::exec(); |
turtlesim_ref/tutorials/draw_square.cpp | ||
---|---|---|
1 | 1 |
#include <boost/bind.hpp> |
2 | 2 |
#include <ros/ros.h> |
3 |
#include <turtlesim/Pose.h> |
|
4 |
#include <turtlesim/Velocity.h> |
|
3 |
#include <turtlesim_ref/Pose.h>
|
|
4 |
#include <turtlesim_ref/Velocity.h>
|
|
5 | 5 |
#include <std_srvs/Empty.h> |
6 | 6 |
|
7 |
turtlesim::PoseConstPtr g_pose; |
|
8 |
turtlesim::Pose g_goal; |
|
7 |
turtlesim_ref::PoseConstPtr g_pose;
|
|
8 |
turtlesim_ref::Pose g_goal;
|
|
9 | 9 |
|
10 | 10 |
enum State |
11 | 11 |
{ |
... | ... | |
21 | 21 |
|
22 | 22 |
#define PI 3.141592 |
23 | 23 |
|
24 |
void poseCallback(const turtlesim::PoseConstPtr& pose) |
|
24 |
void poseCallback(const turtlesim_ref::PoseConstPtr& pose)
|
|
25 | 25 |
{ |
26 | 26 |
g_pose = pose; |
27 | 27 |
} |
... | ... | |
43 | 43 |
|
44 | 44 |
void commandTurtle(ros::Publisher vel_pub, float linear, float angular) |
45 | 45 |
{ |
46 |
turtlesim::Velocity vel; |
|
46 |
turtlesim_ref::Velocity vel;
|
|
47 | 47 |
vel.linear = linear; |
48 | 48 |
vel.angular = angular; |
49 | 49 |
vel_pub.publish(vel); |
... | ... | |
150 | 150 |
ros::init(argc, argv, "draw_square"); |
151 | 151 |
ros::NodeHandle nh; |
152 | 152 |
ros::Subscriber pose_sub = nh.subscribe("turtle1/pose", 1, poseCallback); |
153 |
ros::Publisher vel_pub = nh.advertise<turtlesim::Velocity>("turtle1/command_velocity", 1); |
|
153 |
ros::Publisher vel_pub = nh.advertise<turtlesim_ref::Velocity>("turtle1/command_velocity", 1);
|
|
154 | 154 |
ros::ServiceClient reset = nh.serviceClient<std_srvs::Empty>("reset"); |
155 | 155 |
ros::Timer timer = nh.createTimer(ros::Duration(0.016), boost::bind(timerCallback, _1, vel_pub)); |
156 | 156 |
|
turtlesim_ref/tutorials/mimic.cpp | ||
---|---|---|
1 | 1 |
#include <ros/ros.h> |
2 |
#include <turtlesim/Pose.h> |
|
3 |
#include <turtlesim/Velocity.h> |
|
2 |
#include <turtlesim_ref/Pose.h>
|
|
3 |
#include <turtlesim_ref/Velocity.h>
|
|
4 | 4 |
|
5 | 5 |
class Mimic |
6 | 6 |
{ |
... | ... | |
8 | 8 |
Mimic(); |
9 | 9 |
|
10 | 10 |
private: |
11 |
void poseCallback(const turtlesim::PoseConstPtr& pose); |
|
11 |
void poseCallback(const turtlesim_ref::PoseConstPtr& pose);
|
|
12 | 12 |
|
13 | 13 |
ros::Publisher vel_pub_; |
14 | 14 |
ros::Subscriber pose_sub_; |
... | ... | |
18 | 18 |
{ |
19 | 19 |
ros::NodeHandle input_nh("input"); |
20 | 20 |
ros::NodeHandle output_nh("output"); |
21 |
vel_pub_ = output_nh.advertise<turtlesim::Velocity>("command_velocity", 1); |
|
22 |
pose_sub_ = input_nh.subscribe<turtlesim::Pose>("pose", 1, &Mimic::poseCallback, this); |
|
21 |
vel_pub_ = output_nh.advertise<turtlesim_ref::Velocity>("command_velocity", 1);
|
|
22 |
pose_sub_ = input_nh.subscribe<turtlesim_ref::Pose>("pose", 1, &Mimic::poseCallback, this);
|
|
23 | 23 |
} |
24 | 24 |
|
25 |
void Mimic::poseCallback(const turtlesim::PoseConstPtr& pose) |
|
25 |
void Mimic::poseCallback(const turtlesim_ref::PoseConstPtr& pose)
|
|
26 | 26 |
{ |
27 |
turtlesim::Velocity vel; |
|
27 |
turtlesim_ref::Velocity vel;
|
|
28 | 28 |
vel.angular = pose->angular_velocity; |
29 | 29 |
vel.linear = pose->linear_velocity; |
30 | 30 |
vel_pub_.publish(vel); |
turtlesim_ref/tutorials/teleop_turtle_key.cpp | ||
---|---|---|
4 | 4 |
* |
5 | 5 |
*/ |
6 | 6 |
#include <ros/ros.h> |
7 |
#include <turtlesim/Velocity.h> |
|
7 |
#include <turtlesim_ref/Velocity.h>
|
|
8 | 8 |
#include <signal.h> |
9 | 9 |
#include <termios.h> |
10 | 10 |
#include <stdio.h> |
... | ... | |
39 | 39 |
nh_.param("scale_angular", a_scale_, a_scale_); |
40 | 40 |
nh_.param("scale_linear", l_scale_, l_scale_); |
41 | 41 |
|
42 |
vel_pub_ = nh_.advertise<turtlesim::Velocity>("turtle1/command_velocity", 1); |
|
42 |
vel_pub_ = nh_.advertise<turtlesim_ref::Velocity>("turtle1/command_velocity", 1);
|
|
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
int kfd = 0; |
... | ... | |
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
|
126 |
turtlesim::Velocity vel; |
|
126 |
turtlesim_ref::Velocity vel;
|
|
127 | 127 |
vel.angular = a_scale_*angular_; |
128 | 128 |
vel.linear = l_scale_*linear_; |
129 | 129 |
if(dirty ==true) |
Also available in: Unified diff