├── .catkin_workspace ├── .gitignore ├── CMakeCache.txt ├── LICENSE ├── README.md ├── devel ├── .built_by ├── .catkin ├── .rosinstall ├── _setup_util.py ├── env.sh ├── setup.bash ├── setup.sh ├── setup.zsh └── share │ ├── fusion │ └── cmake │ │ ├── fusionConfig-version.cmake │ │ └── fusionConfig.cmake │ ├── lidar │ └── cmake │ │ ├── lidarConfig-version.cmake │ │ └── lidarConfig.cmake │ └── radar │ └── cmake │ ├── radarConfig-version.cmake │ └── radarConfig.cmake ├── images └── image_53.png └── src ├── CMakeLists.txt ├── fusion ├── CMakeLists.txt └── package.xml ├── lidar ├── CMakeCache.txt ├── CMakeLists.txt ├── package.xml └── src │ └── lidar_node.cpp └── radar ├── CMakeLists.txt └── package.xml /.catkin_workspace: -------------------------------------------------------------------------------- 1 | # This file currently only serves to mark the location of a catkin workspace for tool integration 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | bin/ 3 | lib/ 4 | msg_gen/ 5 | srv_gen/ 6 | msg/*Action.msg 7 | msg/*ActionFeedback.msg 8 | msg/*ActionGoal.msg 9 | msg/*ActionResult.msg 10 | msg/*Feedback.msg 11 | msg/*Goal.msg 12 | msg/*Result.msg 13 | msg/_*.py 14 | 15 | # Generated by dynamic reconfigure 16 | *.cfgc 17 | /cfg/cpp/ 18 | /cfg/*.py 19 | 20 | # Ignore generated docs 21 | *.dox 22 | *.wikidoc 23 | 24 | # eclipse stuff 25 | .project 26 | .cproject 27 | 28 | # qcreator stuff 29 | CMakeLists.txt.user 30 | 31 | srv/_*.py 32 | *.pcd 33 | *.pyc 34 | qtcreator-* 35 | *.user 36 | 37 | /planning/cfg 38 | /planning/docs 39 | /planning/src 40 | 41 | *~ 42 | 43 | # Emacs 44 | .#* 45 | 46 | # Catkin custom files 47 | CATKIN_IGNORE 48 | -------------------------------------------------------------------------------- /CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/mac/Developer/ros-examples 3 | # It was generated by CMake: /usr/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | 18 | ######################## 19 | # INTERNAL cache entries 20 | ######################## 21 | 22 | //This is the directory where this CMakeCache.txt was created 23 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/mac/Developer/ros-examples 24 | //Major version of cmake used to create the current loaded cache 25 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 26 | //Minor version of cmake used to create the current loaded cache 27 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=2 28 | //Patch version of cmake used to create the current loaded cache 29 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 30 | //Path to CMake executable. 31 | CMAKE_COMMAND:INTERNAL=/usr/bin/cmake 32 | //Path to cpack program executable. 33 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack 34 | //Path to ctest program executable. 35 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest 36 | //Path to CMake installation. 37 | CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.2 38 | 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # height-map 2 | height map 3 | 4 | Currently, this ROS workspace processes LIDAR data to create PNG "bird's eye" height maps for use in deep learning applications. All of the real code currently resides in ```/ros-examples/src/lidar/src/lidar_node.cpp```. 5 | 6 | To use this node, first build. You'll need OpenCV dependencies, but that should be included in ROS. If you want to save the images, create a folder in the ROS root workspace (where this readme is located) called ```images```. Everything will automatically be saved there. 7 | 8 | To run: ```rosrun lidar lidar_node``` 9 | 10 | You should see an image window pop up. The point cloud topic is hard coded in lidar_node.cpp. You may need to change that to ```/points_raw```. After this node is up, play your bag file. 11 | 12 | # ros-examples 13 | Want to learn how to use the Robot Operating System (ROS), the Point Cloud Library (PCL), and a bunch of other cool tools to make a self-driving car or other awesome robot? This repository is home to a collection of ROS nodes that process 3D sensor information, specifically as examples for the Udacity/Didi $100k object detection challenge. Learn about obstacle fusion techniques, and use these nodes as a starting point for building your own awesome obstacle detection engine! 14 | 15 | For more info, check out the main competition site [here](https://www.udacity.com/didi-challenge). 16 | 17 | If you have any issues, create a pull request! I'd love to add your contributions to this repo. Alternatively, shoot me a tweet at [macjshiggins](https://twitter.com/macjshiggins). 18 | 19 | # setup 20 | This is a standard ROS catkin-ized workspace. Don't know what that means? Check out a great intro on ROS [here](http://wiki.ros.org/ROS/Tutorials) or head on over to [Udacity](http://udacity.com) to sign up for the Robotics or Self-Driving Car Engineer Nanodegree. 21 | 22 | There's currently only one node for processing LIDAR data. Use "catkin_make" in the root of this repo to build the lidar node, and run with ```rosrun lidar lidar_node``` after installing PCL and ROS (Indigo, preferably). 23 | 24 | If you've downloaded any of the datasets for the challenge, you can start using the data with these nodes immediately by running ```rosbag play -l name-of-file.bag```. The "-l" keeps the bag file playing on repeat so that you can keep working on your algorithm without having to mess with the data playback. 25 | -------------------------------------------------------------------------------- /devel/.built_by: -------------------------------------------------------------------------------- 1 | catkin_make -------------------------------------------------------------------------------- /devel/.catkin: -------------------------------------------------------------------------------- 1 | /home/mac/Developer/ros-examples/src -------------------------------------------------------------------------------- /devel/.rosinstall: -------------------------------------------------------------------------------- 1 | - setup-file: 2 | local-name: /home/mac/Developer/ros-examples/devel/setup.sh 3 | -------------------------------------------------------------------------------- /devel/_setup_util.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | # Software License Agreement (BSD License) 5 | # 6 | # Copyright (c) 2012, Willow Garage, Inc. 7 | # All rights reserved. 8 | # 9 | # Redistribution and use in source and binary forms, with or without 10 | # modification, are permitted provided that the following conditions 11 | # are met: 12 | # 13 | # * Redistributions of source code must retain the above copyright 14 | # notice, this list of conditions and the following disclaimer. 15 | # * Redistributions in binary form must reproduce the above 16 | # copyright notice, this list of conditions and the following 17 | # disclaimer in the documentation and/or other materials provided 18 | # with the distribution. 19 | # * Neither the name of Willow Garage, Inc. nor the names of its 20 | # contributors may be used to endorse or promote products derived 21 | # from this software without specific prior written permission. 22 | # 23 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 26 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 27 | # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 28 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 29 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 33 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 | # POSSIBILITY OF SUCH DAMAGE. 35 | 36 | '''This file generates shell code for the setup.SHELL scripts to set environment variables''' 37 | 38 | from __future__ import print_function 39 | import argparse 40 | import copy 41 | import errno 42 | import os 43 | import platform 44 | import sys 45 | 46 | CATKIN_MARKER_FILE = '.catkin' 47 | 48 | system = platform.system() 49 | IS_DARWIN = (system == 'Darwin') 50 | IS_WINDOWS = (system == 'Windows') 51 | 52 | # subfolder of workspace prepended to CMAKE_PREFIX_PATH 53 | ENV_VAR_SUBFOLDERS = { 54 | 'CMAKE_PREFIX_PATH': '', 55 | 'CPATH': 'include', 56 | 'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': ['lib', os.path.join('lib', 'x86_64-linux-gnu')], 57 | 'PATH': 'bin', 58 | 'PKG_CONFIG_PATH': [os.path.join('lib', 'pkgconfig'), os.path.join('lib', 'x86_64-linux-gnu', 'pkgconfig')], 59 | 'PYTHONPATH': 'lib/python2.7/dist-packages', 60 | } 61 | 62 | 63 | def rollback_env_variables(environ, env_var_subfolders): 64 | ''' 65 | Generate shell code to reset environment variables 66 | by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH. 67 | This does not cover modifications performed by environment hooks. 68 | ''' 69 | lines = [] 70 | unmodified_environ = copy.copy(environ) 71 | for key in sorted(env_var_subfolders.keys()): 72 | subfolders = env_var_subfolders[key] 73 | if not isinstance(subfolders, list): 74 | subfolders = [subfolders] 75 | value = _rollback_env_variable(unmodified_environ, key, subfolders) 76 | if value is not None: 77 | environ[key] = value 78 | lines.append(assignment(key, value)) 79 | if lines: 80 | lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH')) 81 | return lines 82 | 83 | 84 | def _rollback_env_variable(environ, name, subfolders): 85 | ''' 86 | For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. 87 | 88 | :param subfolders: list of str '' or subfoldername that may start with '/' 89 | :returns: the updated value of the environment variable. 90 | ''' 91 | value = environ[name] if name in environ else '' 92 | env_paths = [path for path in value.split(os.pathsep) if path] 93 | value_modified = False 94 | for subfolder in subfolders: 95 | if subfolder: 96 | if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)): 97 | subfolder = subfolder[1:] 98 | if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)): 99 | subfolder = subfolder[:-1] 100 | for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True): 101 | path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path 102 | path_to_remove = None 103 | for env_path in env_paths: 104 | env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path 105 | if env_path_clean == path_to_find: 106 | path_to_remove = env_path 107 | break 108 | if path_to_remove: 109 | env_paths.remove(path_to_remove) 110 | value_modified = True 111 | new_value = os.pathsep.join(env_paths) 112 | return new_value if value_modified else None 113 | 114 | 115 | def _get_workspaces(environ, include_fuerte=False, include_non_existing=False): 116 | ''' 117 | Based on CMAKE_PREFIX_PATH return all catkin workspaces. 118 | 119 | :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool`` 120 | ''' 121 | # get all cmake prefix paths 122 | env_name = 'CMAKE_PREFIX_PATH' 123 | value = environ[env_name] if env_name in environ else '' 124 | paths = [path for path in value.split(os.pathsep) if path] 125 | # remove non-workspace paths 126 | workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))] 127 | return workspaces 128 | 129 | 130 | def prepend_env_variables(environ, env_var_subfolders, workspaces): 131 | ''' 132 | Generate shell code to prepend environment variables 133 | for the all workspaces. 134 | ''' 135 | lines = [] 136 | lines.append(comment('prepend folders of workspaces to environment variables')) 137 | 138 | paths = [path for path in workspaces.split(os.pathsep) if path] 139 | 140 | prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '') 141 | lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix)) 142 | 143 | for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']): 144 | subfolder = env_var_subfolders[key] 145 | prefix = _prefix_env_variable(environ, key, paths, subfolder) 146 | lines.append(prepend(environ, key, prefix)) 147 | return lines 148 | 149 | 150 | def _prefix_env_variable(environ, name, paths, subfolders): 151 | ''' 152 | Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items. 153 | ''' 154 | value = environ[name] if name in environ else '' 155 | environ_paths = [path for path in value.split(os.pathsep) if path] 156 | checked_paths = [] 157 | for path in paths: 158 | if not isinstance(subfolders, list): 159 | subfolders = [subfolders] 160 | for subfolder in subfolders: 161 | path_tmp = path 162 | if subfolder: 163 | path_tmp = os.path.join(path_tmp, subfolder) 164 | # skip nonexistent paths 165 | if not os.path.exists(path_tmp): 166 | continue 167 | # exclude any path already in env and any path we already added 168 | if path_tmp not in environ_paths and path_tmp not in checked_paths: 169 | checked_paths.append(path_tmp) 170 | prefix_str = os.pathsep.join(checked_paths) 171 | if prefix_str != '' and environ_paths: 172 | prefix_str += os.pathsep 173 | return prefix_str 174 | 175 | 176 | def assignment(key, value): 177 | if not IS_WINDOWS: 178 | return 'export %s="%s"' % (key, value) 179 | else: 180 | return 'set %s=%s' % (key, value) 181 | 182 | 183 | def comment(msg): 184 | if not IS_WINDOWS: 185 | return '# %s' % msg 186 | else: 187 | return 'REM %s' % msg 188 | 189 | 190 | def prepend(environ, key, prefix): 191 | if key not in environ or not environ[key]: 192 | return assignment(key, prefix) 193 | if not IS_WINDOWS: 194 | return 'export %s="%s$%s"' % (key, prefix, key) 195 | else: 196 | return 'set %s=%s%%%s%%' % (key, prefix, key) 197 | 198 | 199 | def find_env_hooks(environ, cmake_prefix_path): 200 | ''' 201 | Generate shell code with found environment hooks 202 | for the all workspaces. 203 | ''' 204 | lines = [] 205 | lines.append(comment('found environment hooks in workspaces')) 206 | 207 | generic_env_hooks = [] 208 | generic_env_hooks_workspace = [] 209 | specific_env_hooks = [] 210 | specific_env_hooks_workspace = [] 211 | generic_env_hooks_by_filename = {} 212 | specific_env_hooks_by_filename = {} 213 | generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh' 214 | specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None 215 | # remove non-workspace paths 216 | workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))] 217 | for workspace in reversed(workspaces): 218 | env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d') 219 | if os.path.isdir(env_hook_dir): 220 | for filename in sorted(os.listdir(env_hook_dir)): 221 | if filename.endswith('.%s' % generic_env_hook_ext): 222 | # remove previous env hook with same name if present 223 | if filename in generic_env_hooks_by_filename: 224 | i = generic_env_hooks.index(generic_env_hooks_by_filename[filename]) 225 | generic_env_hooks.pop(i) 226 | generic_env_hooks_workspace.pop(i) 227 | # append env hook 228 | generic_env_hooks.append(os.path.join(env_hook_dir, filename)) 229 | generic_env_hooks_workspace.append(workspace) 230 | generic_env_hooks_by_filename[filename] = generic_env_hooks[-1] 231 | elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext): 232 | # remove previous env hook with same name if present 233 | if filename in specific_env_hooks_by_filename: 234 | i = specific_env_hooks.index(specific_env_hooks_by_filename[filename]) 235 | specific_env_hooks.pop(i) 236 | specific_env_hooks_workspace.pop(i) 237 | # append env hook 238 | specific_env_hooks.append(os.path.join(env_hook_dir, filename)) 239 | specific_env_hooks_workspace.append(workspace) 240 | specific_env_hooks_by_filename[filename] = specific_env_hooks[-1] 241 | env_hooks = generic_env_hooks + specific_env_hooks 242 | env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace 243 | count = len(env_hooks) 244 | lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count)) 245 | for i in range(count): 246 | lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i])) 247 | lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i])) 248 | return lines 249 | 250 | 251 | def _parse_arguments(args=None): 252 | parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.') 253 | parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context') 254 | return parser.parse_known_args(args=args)[0] 255 | 256 | 257 | if __name__ == '__main__': 258 | try: 259 | try: 260 | args = _parse_arguments() 261 | except Exception as e: 262 | print(e, file=sys.stderr) 263 | sys.exit(1) 264 | 265 | # environment at generation time 266 | CMAKE_PREFIX_PATH = '/opt/ros/indigo'.split(';') 267 | # prepend current workspace if not already part of CPP 268 | base_path = os.path.dirname(__file__) 269 | if base_path not in CMAKE_PREFIX_PATH: 270 | CMAKE_PREFIX_PATH.insert(0, base_path) 271 | CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH) 272 | 273 | environ = dict(os.environ) 274 | lines = [] 275 | if not args.extend: 276 | lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS) 277 | lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH) 278 | lines += find_env_hooks(environ, CMAKE_PREFIX_PATH) 279 | print('\n'.join(lines)) 280 | 281 | # need to explicitly flush the output 282 | sys.stdout.flush() 283 | except IOError as e: 284 | # and catch potential "broken pipe" if stdout is not writable 285 | # which can happen when piping the output to a file but the disk is full 286 | if e.errno == errno.EPIPE: 287 | print(e, file=sys.stderr) 288 | sys.exit(2) 289 | raise 290 | 291 | sys.exit(0) 292 | -------------------------------------------------------------------------------- /devel/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/templates/env.sh.in 3 | 4 | if [ $# -eq 0 ] ; then 5 | /bin/echo "Usage: env.sh COMMANDS" 6 | /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." 7 | exit 1 8 | fi 9 | 10 | # ensure to not use different shell type which was set before 11 | CATKIN_SHELL=sh 12 | 13 | # source setup.sh from same directory as this file 14 | _CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) 15 | . "$_CATKIN_SETUP_DIR/setup.sh" 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /devel/setup.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # generated from catkin/cmake/templates/setup.bash.in 3 | 4 | CATKIN_SHELL=bash 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) 8 | . "$_CATKIN_SETUP_DIR/setup.sh" 9 | -------------------------------------------------------------------------------- /devel/setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # generated from catkin/cmake/template/setup.sh.in 3 | 4 | # Sets various environment variables and sources additional environment hooks. 5 | # It tries it's best to undo changes from a previously sourced setup file before. 6 | # Supported command line options: 7 | # --extend: skips the undoing of changes from a previously sourced setup file 8 | 9 | # since this file is sourced either use the provided _CATKIN_SETUP_DIR 10 | # or fall back to the destination set at configure time 11 | : ${_CATKIN_SETUP_DIR:=/home/mac/Developer/ros-examples/devel} 12 | _SETUP_UTIL="$_CATKIN_SETUP_DIR/_setup_util.py" 13 | unset _CATKIN_SETUP_DIR 14 | 15 | if [ ! -f "$_SETUP_UTIL" ]; then 16 | echo "Missing Python script: $_SETUP_UTIL" 17 | return 22 18 | fi 19 | 20 | # detect if running on Darwin platform 21 | _UNAME=`uname -s` 22 | _IS_DARWIN=0 23 | if [ "$_UNAME" = "Darwin" ]; then 24 | _IS_DARWIN=1 25 | fi 26 | unset _UNAME 27 | 28 | # make sure to export all environment variables 29 | export CMAKE_PREFIX_PATH 30 | export CPATH 31 | if [ $_IS_DARWIN -eq 0 ]; then 32 | export LD_LIBRARY_PATH 33 | else 34 | export DYLD_LIBRARY_PATH 35 | fi 36 | unset _IS_DARWIN 37 | export PATH 38 | export PKG_CONFIG_PATH 39 | export PYTHONPATH 40 | 41 | # remember type of shell if not already set 42 | if [ -z "$CATKIN_SHELL" ]; then 43 | CATKIN_SHELL=sh 44 | fi 45 | 46 | # invoke Python script to generate necessary exports of environment variables 47 | # use TMPDIR if it exists, otherwise fall back to /tmp 48 | if [ -d "${TMPDIR}" ]; then 49 | _TMPDIR="${TMPDIR}" 50 | else 51 | _TMPDIR=/tmp 52 | fi 53 | _SETUP_TMP=`mktemp "${_TMPDIR}/setup.sh.XXXXXXXXXX"` 54 | unset _TMPDIR 55 | if [ $? -ne 0 -o ! -f "$_SETUP_TMP" ]; then 56 | echo "Could not create temporary file: $_SETUP_TMP" 57 | return 1 58 | fi 59 | CATKIN_SHELL=$CATKIN_SHELL "$_SETUP_UTIL" $@ >> "$_SETUP_TMP" 60 | _RC=$? 61 | if [ $_RC -ne 0 ]; then 62 | if [ $_RC -eq 2 ]; then 63 | echo "Could not write the output of '$_SETUP_UTIL' to temporary file '$_SETUP_TMP': may be the disk if full?" 64 | else 65 | echo "Failed to run '\"$_SETUP_UTIL\" $@': return code $_RC" 66 | fi 67 | unset _RC 68 | unset _SETUP_UTIL 69 | rm -f "$_SETUP_TMP" 70 | unset _SETUP_TMP 71 | return 1 72 | fi 73 | unset _RC 74 | unset _SETUP_UTIL 75 | . "$_SETUP_TMP" 76 | rm -f "$_SETUP_TMP" 77 | unset _SETUP_TMP 78 | 79 | # source all environment hooks 80 | _i=0 81 | while [ $_i -lt $_CATKIN_ENVIRONMENT_HOOKS_COUNT ]; do 82 | eval _envfile=\$_CATKIN_ENVIRONMENT_HOOKS_$_i 83 | unset _CATKIN_ENVIRONMENT_HOOKS_$_i 84 | eval _envfile_workspace=\$_CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE 85 | unset _CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE 86 | # set workspace for environment hook 87 | CATKIN_ENV_HOOK_WORKSPACE=$_envfile_workspace 88 | . "$_envfile" 89 | unset CATKIN_ENV_HOOK_WORKSPACE 90 | _i=$((_i + 1)) 91 | done 92 | unset _i 93 | 94 | unset _CATKIN_ENVIRONMENT_HOOKS_COUNT 95 | -------------------------------------------------------------------------------- /devel/setup.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # generated from catkin/cmake/templates/setup.zsh.in 3 | 4 | CATKIN_SHELL=zsh 5 | 6 | # source setup.sh from same directory as this file 7 | _CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) 8 | emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh"' 9 | -------------------------------------------------------------------------------- /devel/share/fusion/cmake/fusionConfig-version.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/pkgConfig-version.cmake.in 2 | set(PACKAGE_VERSION "0.0.0") 3 | 4 | set(PACKAGE_VERSION_EXACT False) 5 | set(PACKAGE_VERSION_COMPATIBLE False) 6 | 7 | if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") 8 | set(PACKAGE_VERSION_EXACT True) 9 | set(PACKAGE_VERSION_COMPATIBLE True) 10 | endif() 11 | 12 | if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") 13 | set(PACKAGE_VERSION_COMPATIBLE True) 14 | endif() 15 | -------------------------------------------------------------------------------- /devel/share/fusion/cmake/fusionConfig.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/pkgConfig.cmake.in 2 | 3 | # append elements to a list and remove existing duplicates from the list 4 | # copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig 5 | # self contained 6 | macro(_list_append_deduplicate listname) 7 | if(NOT "${ARGN}" STREQUAL "") 8 | if(${listname}) 9 | list(REMOVE_ITEM ${listname} ${ARGN}) 10 | endif() 11 | list(APPEND ${listname} ${ARGN}) 12 | endif() 13 | endmacro() 14 | 15 | # append elements to a list if they are not already in the list 16 | # copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig 17 | # self contained 18 | macro(_list_append_unique listname) 19 | foreach(_item ${ARGN}) 20 | list(FIND ${listname} ${_item} _index) 21 | if(_index EQUAL -1) 22 | list(APPEND ${listname} ${_item}) 23 | endif() 24 | endforeach() 25 | endmacro() 26 | 27 | # pack a list of libraries with optional build configuration keywords 28 | # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig 29 | # self contained 30 | macro(_pack_libraries_with_build_configuration VAR) 31 | set(${VAR} "") 32 | set(_argn ${ARGN}) 33 | list(LENGTH _argn _count) 34 | set(_index 0) 35 | while(${_index} LESS ${_count}) 36 | list(GET _argn ${_index} lib) 37 | if("${lib}" MATCHES "^(debug|optimized|general)$") 38 | math(EXPR _index "${_index} + 1") 39 | if(${_index} EQUAL ${_count}) 40 | message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") 41 | endif() 42 | list(GET _argn ${_index} library) 43 | list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") 44 | else() 45 | list(APPEND ${VAR} "${lib}") 46 | endif() 47 | math(EXPR _index "${_index} + 1") 48 | endwhile() 49 | endmacro() 50 | 51 | # unpack a list of libraries with optional build configuration keyword prefixes 52 | # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig 53 | # self contained 54 | macro(_unpack_libraries_with_build_configuration VAR) 55 | set(${VAR} "") 56 | foreach(lib ${ARGN}) 57 | string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") 58 | list(APPEND ${VAR} "${lib}") 59 | endforeach() 60 | endmacro() 61 | 62 | 63 | if(fusion_CONFIG_INCLUDED) 64 | return() 65 | endif() 66 | set(fusion_CONFIG_INCLUDED TRUE) 67 | 68 | # set variables for source/devel/install prefixes 69 | if("TRUE" STREQUAL "TRUE") 70 | set(fusion_SOURCE_PREFIX /home/mac/Developer/ros-examples/src/fusion) 71 | set(fusion_DEVEL_PREFIX /home/mac/Developer/ros-examples/devel) 72 | set(fusion_INSTALL_PREFIX "") 73 | set(fusion_PREFIX ${fusion_DEVEL_PREFIX}) 74 | else() 75 | set(fusion_SOURCE_PREFIX "") 76 | set(fusion_DEVEL_PREFIX "") 77 | set(fusion_INSTALL_PREFIX /home/mac/Developer/ros-examples/install) 78 | set(fusion_PREFIX ${fusion_INSTALL_PREFIX}) 79 | endif() 80 | 81 | # warn when using a deprecated package 82 | if(NOT "" STREQUAL "") 83 | set(_msg "WARNING: package 'fusion' is deprecated") 84 | # append custom deprecation text if available 85 | if(NOT "" STREQUAL "TRUE") 86 | set(_msg "${_msg} ()") 87 | endif() 88 | message("${_msg}") 89 | endif() 90 | 91 | # flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project 92 | set(fusion_FOUND_CATKIN_PROJECT TRUE) 93 | 94 | if(NOT " " STREQUAL " ") 95 | set(fusion_INCLUDE_DIRS "") 96 | set(_include_dirs "") 97 | foreach(idir ${_include_dirs}) 98 | if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) 99 | set(include ${idir}) 100 | elseif("${idir} " STREQUAL "include ") 101 | get_filename_component(include "${fusion_DIR}/../../../include" ABSOLUTE) 102 | if(NOT IS_DIRECTORY ${include}) 103 | message(FATAL_ERROR "Project 'fusion' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'mac ' to fix it.") 104 | endif() 105 | else() 106 | message(FATAL_ERROR "Project 'fusion' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/mac/Developer/ros-examples/src/fusion/${idir}'. Ask the maintainer 'mac ' to fix it.") 107 | endif() 108 | _list_append_unique(fusion_INCLUDE_DIRS ${include}) 109 | endforeach() 110 | endif() 111 | 112 | set(libraries "") 113 | foreach(library ${libraries}) 114 | # keep build configuration keywords, target names and absolute libraries as-is 115 | if("${library}" MATCHES "^(debug|optimized|general)$") 116 | list(APPEND fusion_LIBRARIES ${library}) 117 | elseif(TARGET ${library}) 118 | list(APPEND fusion_LIBRARIES ${library}) 119 | elseif(IS_ABSOLUTE ${library}) 120 | list(APPEND fusion_LIBRARIES ${library}) 121 | else() 122 | set(lib_path "") 123 | set(lib "${library}-NOTFOUND") 124 | # since the path where the library is found is returned we have to iterate over the paths manually 125 | foreach(path /home/mac/Developer/ros-examples/devel/lib;/opt/ros/indigo/lib) 126 | find_library(lib ${library} 127 | PATHS ${path} 128 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) 129 | if(lib) 130 | set(lib_path ${path}) 131 | break() 132 | endif() 133 | endforeach() 134 | if(lib) 135 | _list_append_unique(fusion_LIBRARY_DIRS ${lib_path}) 136 | list(APPEND fusion_LIBRARIES ${lib}) 137 | else() 138 | # as a fall back for non-catkin libraries try to search globally 139 | find_library(lib ${library}) 140 | if(NOT lib) 141 | message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'fusion'? Did you find_package() it before the subdirectory containing its code is included?") 142 | endif() 143 | list(APPEND fusion_LIBRARIES ${lib}) 144 | endif() 145 | endif() 146 | endforeach() 147 | 148 | set(fusion_EXPORTED_TARGETS "") 149 | # create dummy targets for exported code generation targets to make life of users easier 150 | foreach(t ${fusion_EXPORTED_TARGETS}) 151 | if(NOT TARGET ${t}) 152 | add_custom_target(${t}) 153 | endif() 154 | endforeach() 155 | 156 | set(depends "") 157 | foreach(depend ${depends}) 158 | string(REPLACE " " ";" depend_list ${depend}) 159 | # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls 160 | list(GET depend_list 0 fusion_dep) 161 | list(LENGTH depend_list count) 162 | if(${count} EQUAL 1) 163 | # simple dependencies must only be find_package()-ed once 164 | if(NOT ${fusion_dep}_FOUND) 165 | find_package(${fusion_dep} REQUIRED) 166 | endif() 167 | else() 168 | # dependencies with components must be find_package()-ed again 169 | list(REMOVE_AT depend_list 0) 170 | find_package(${fusion_dep} REQUIRED ${depend_list}) 171 | endif() 172 | _list_append_unique(fusion_INCLUDE_DIRS ${${fusion_dep}_INCLUDE_DIRS}) 173 | 174 | # merge build configuration keywords with library names to correctly deduplicate 175 | _pack_libraries_with_build_configuration(fusion_LIBRARIES ${fusion_LIBRARIES}) 176 | _pack_libraries_with_build_configuration(_libraries ${${fusion_dep}_LIBRARIES}) 177 | _list_append_deduplicate(fusion_LIBRARIES ${_libraries}) 178 | # undo build configuration keyword merging after deduplication 179 | _unpack_libraries_with_build_configuration(fusion_LIBRARIES ${fusion_LIBRARIES}) 180 | 181 | _list_append_unique(fusion_LIBRARY_DIRS ${${fusion_dep}_LIBRARY_DIRS}) 182 | list(APPEND fusion_EXPORTED_TARGETS ${${fusion_dep}_EXPORTED_TARGETS}) 183 | endforeach() 184 | 185 | set(pkg_cfg_extras "") 186 | foreach(extra ${pkg_cfg_extras}) 187 | if(NOT IS_ABSOLUTE ${extra}) 188 | set(extra ${fusion_DIR}/${extra}) 189 | endif() 190 | include(${extra}) 191 | endforeach() 192 | -------------------------------------------------------------------------------- /devel/share/lidar/cmake/lidarConfig-version.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/pkgConfig-version.cmake.in 2 | set(PACKAGE_VERSION "0.0.0") 3 | 4 | set(PACKAGE_VERSION_EXACT False) 5 | set(PACKAGE_VERSION_COMPATIBLE False) 6 | 7 | if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") 8 | set(PACKAGE_VERSION_EXACT True) 9 | set(PACKAGE_VERSION_COMPATIBLE True) 10 | endif() 11 | 12 | if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") 13 | set(PACKAGE_VERSION_COMPATIBLE True) 14 | endif() 15 | -------------------------------------------------------------------------------- /devel/share/lidar/cmake/lidarConfig.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/pkgConfig.cmake.in 2 | 3 | # append elements to a list and remove existing duplicates from the list 4 | # copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig 5 | # self contained 6 | macro(_list_append_deduplicate listname) 7 | if(NOT "${ARGN}" STREQUAL "") 8 | if(${listname}) 9 | list(REMOVE_ITEM ${listname} ${ARGN}) 10 | endif() 11 | list(APPEND ${listname} ${ARGN}) 12 | endif() 13 | endmacro() 14 | 15 | # append elements to a list if they are not already in the list 16 | # copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig 17 | # self contained 18 | macro(_list_append_unique listname) 19 | foreach(_item ${ARGN}) 20 | list(FIND ${listname} ${_item} _index) 21 | if(_index EQUAL -1) 22 | list(APPEND ${listname} ${_item}) 23 | endif() 24 | endforeach() 25 | endmacro() 26 | 27 | # pack a list of libraries with optional build configuration keywords 28 | # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig 29 | # self contained 30 | macro(_pack_libraries_with_build_configuration VAR) 31 | set(${VAR} "") 32 | set(_argn ${ARGN}) 33 | list(LENGTH _argn _count) 34 | set(_index 0) 35 | while(${_index} LESS ${_count}) 36 | list(GET _argn ${_index} lib) 37 | if("${lib}" MATCHES "^(debug|optimized|general)$") 38 | math(EXPR _index "${_index} + 1") 39 | if(${_index} EQUAL ${_count}) 40 | message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") 41 | endif() 42 | list(GET _argn ${_index} library) 43 | list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") 44 | else() 45 | list(APPEND ${VAR} "${lib}") 46 | endif() 47 | math(EXPR _index "${_index} + 1") 48 | endwhile() 49 | endmacro() 50 | 51 | # unpack a list of libraries with optional build configuration keyword prefixes 52 | # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig 53 | # self contained 54 | macro(_unpack_libraries_with_build_configuration VAR) 55 | set(${VAR} "") 56 | foreach(lib ${ARGN}) 57 | string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") 58 | list(APPEND ${VAR} "${lib}") 59 | endforeach() 60 | endmacro() 61 | 62 | 63 | if(lidar_CONFIG_INCLUDED) 64 | return() 65 | endif() 66 | set(lidar_CONFIG_INCLUDED TRUE) 67 | 68 | # set variables for source/devel/install prefixes 69 | if("TRUE" STREQUAL "TRUE") 70 | set(lidar_SOURCE_PREFIX /home/mac/Developer/ros-examples/src/lidar) 71 | set(lidar_DEVEL_PREFIX /home/mac/Developer/ros-examples/devel) 72 | set(lidar_INSTALL_PREFIX "") 73 | set(lidar_PREFIX ${lidar_DEVEL_PREFIX}) 74 | else() 75 | set(lidar_SOURCE_PREFIX "") 76 | set(lidar_DEVEL_PREFIX "") 77 | set(lidar_INSTALL_PREFIX /home/mac/Developer/ros-examples/install) 78 | set(lidar_PREFIX ${lidar_INSTALL_PREFIX}) 79 | endif() 80 | 81 | # warn when using a deprecated package 82 | if(NOT "" STREQUAL "") 83 | set(_msg "WARNING: package 'lidar' is deprecated") 84 | # append custom deprecation text if available 85 | if(NOT "" STREQUAL "TRUE") 86 | set(_msg "${_msg} ()") 87 | endif() 88 | message("${_msg}") 89 | endif() 90 | 91 | # flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project 92 | set(lidar_FOUND_CATKIN_PROJECT TRUE) 93 | 94 | if(NOT " " STREQUAL " ") 95 | set(lidar_INCLUDE_DIRS "") 96 | set(_include_dirs "") 97 | foreach(idir ${_include_dirs}) 98 | if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) 99 | set(include ${idir}) 100 | elseif("${idir} " STREQUAL "include ") 101 | get_filename_component(include "${lidar_DIR}/../../../include" ABSOLUTE) 102 | if(NOT IS_DIRECTORY ${include}) 103 | message(FATAL_ERROR "Project 'lidar' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'mac ' to fix it.") 104 | endif() 105 | else() 106 | message(FATAL_ERROR "Project 'lidar' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/mac/Developer/ros-examples/src/lidar/${idir}'. Ask the maintainer 'mac ' to fix it.") 107 | endif() 108 | _list_append_unique(lidar_INCLUDE_DIRS ${include}) 109 | endforeach() 110 | endif() 111 | 112 | set(libraries "") 113 | foreach(library ${libraries}) 114 | # keep build configuration keywords, target names and absolute libraries as-is 115 | if("${library}" MATCHES "^(debug|optimized|general)$") 116 | list(APPEND lidar_LIBRARIES ${library}) 117 | elseif(TARGET ${library}) 118 | list(APPEND lidar_LIBRARIES ${library}) 119 | elseif(IS_ABSOLUTE ${library}) 120 | list(APPEND lidar_LIBRARIES ${library}) 121 | else() 122 | set(lib_path "") 123 | set(lib "${library}-NOTFOUND") 124 | # since the path where the library is found is returned we have to iterate over the paths manually 125 | foreach(path /home/mac/Developer/ros-examples/devel/lib;/opt/ros/indigo/lib) 126 | find_library(lib ${library} 127 | PATHS ${path} 128 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) 129 | if(lib) 130 | set(lib_path ${path}) 131 | break() 132 | endif() 133 | endforeach() 134 | if(lib) 135 | _list_append_unique(lidar_LIBRARY_DIRS ${lib_path}) 136 | list(APPEND lidar_LIBRARIES ${lib}) 137 | else() 138 | # as a fall back for non-catkin libraries try to search globally 139 | find_library(lib ${library}) 140 | if(NOT lib) 141 | message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'lidar'? Did you find_package() it before the subdirectory containing its code is included?") 142 | endif() 143 | list(APPEND lidar_LIBRARIES ${lib}) 144 | endif() 145 | endif() 146 | endforeach() 147 | 148 | set(lidar_EXPORTED_TARGETS "") 149 | # create dummy targets for exported code generation targets to make life of users easier 150 | foreach(t ${lidar_EXPORTED_TARGETS}) 151 | if(NOT TARGET ${t}) 152 | add_custom_target(${t}) 153 | endif() 154 | endforeach() 155 | 156 | set(depends "") 157 | foreach(depend ${depends}) 158 | string(REPLACE " " ";" depend_list ${depend}) 159 | # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls 160 | list(GET depend_list 0 lidar_dep) 161 | list(LENGTH depend_list count) 162 | if(${count} EQUAL 1) 163 | # simple dependencies must only be find_package()-ed once 164 | if(NOT ${lidar_dep}_FOUND) 165 | find_package(${lidar_dep} REQUIRED) 166 | endif() 167 | else() 168 | # dependencies with components must be find_package()-ed again 169 | list(REMOVE_AT depend_list 0) 170 | find_package(${lidar_dep} REQUIRED ${depend_list}) 171 | endif() 172 | _list_append_unique(lidar_INCLUDE_DIRS ${${lidar_dep}_INCLUDE_DIRS}) 173 | 174 | # merge build configuration keywords with library names to correctly deduplicate 175 | _pack_libraries_with_build_configuration(lidar_LIBRARIES ${lidar_LIBRARIES}) 176 | _pack_libraries_with_build_configuration(_libraries ${${lidar_dep}_LIBRARIES}) 177 | _list_append_deduplicate(lidar_LIBRARIES ${_libraries}) 178 | # undo build configuration keyword merging after deduplication 179 | _unpack_libraries_with_build_configuration(lidar_LIBRARIES ${lidar_LIBRARIES}) 180 | 181 | _list_append_unique(lidar_LIBRARY_DIRS ${${lidar_dep}_LIBRARY_DIRS}) 182 | list(APPEND lidar_EXPORTED_TARGETS ${${lidar_dep}_EXPORTED_TARGETS}) 183 | endforeach() 184 | 185 | set(pkg_cfg_extras "") 186 | foreach(extra ${pkg_cfg_extras}) 187 | if(NOT IS_ABSOLUTE ${extra}) 188 | set(extra ${lidar_DIR}/${extra}) 189 | endif() 190 | include(${extra}) 191 | endforeach() 192 | -------------------------------------------------------------------------------- /devel/share/radar/cmake/radarConfig-version.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/pkgConfig-version.cmake.in 2 | set(PACKAGE_VERSION "0.0.0") 3 | 4 | set(PACKAGE_VERSION_EXACT False) 5 | set(PACKAGE_VERSION_COMPATIBLE False) 6 | 7 | if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") 8 | set(PACKAGE_VERSION_EXACT True) 9 | set(PACKAGE_VERSION_COMPATIBLE True) 10 | endif() 11 | 12 | if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") 13 | set(PACKAGE_VERSION_COMPATIBLE True) 14 | endif() 15 | -------------------------------------------------------------------------------- /devel/share/radar/cmake/radarConfig.cmake: -------------------------------------------------------------------------------- 1 | # generated from catkin/cmake/template/pkgConfig.cmake.in 2 | 3 | # append elements to a list and remove existing duplicates from the list 4 | # copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig 5 | # self contained 6 | macro(_list_append_deduplicate listname) 7 | if(NOT "${ARGN}" STREQUAL "") 8 | if(${listname}) 9 | list(REMOVE_ITEM ${listname} ${ARGN}) 10 | endif() 11 | list(APPEND ${listname} ${ARGN}) 12 | endif() 13 | endmacro() 14 | 15 | # append elements to a list if they are not already in the list 16 | # copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig 17 | # self contained 18 | macro(_list_append_unique listname) 19 | foreach(_item ${ARGN}) 20 | list(FIND ${listname} ${_item} _index) 21 | if(_index EQUAL -1) 22 | list(APPEND ${listname} ${_item}) 23 | endif() 24 | endforeach() 25 | endmacro() 26 | 27 | # pack a list of libraries with optional build configuration keywords 28 | # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig 29 | # self contained 30 | macro(_pack_libraries_with_build_configuration VAR) 31 | set(${VAR} "") 32 | set(_argn ${ARGN}) 33 | list(LENGTH _argn _count) 34 | set(_index 0) 35 | while(${_index} LESS ${_count}) 36 | list(GET _argn ${_index} lib) 37 | if("${lib}" MATCHES "^(debug|optimized|general)$") 38 | math(EXPR _index "${_index} + 1") 39 | if(${_index} EQUAL ${_count}) 40 | message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") 41 | endif() 42 | list(GET _argn ${_index} library) 43 | list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") 44 | else() 45 | list(APPEND ${VAR} "${lib}") 46 | endif() 47 | math(EXPR _index "${_index} + 1") 48 | endwhile() 49 | endmacro() 50 | 51 | # unpack a list of libraries with optional build configuration keyword prefixes 52 | # copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig 53 | # self contained 54 | macro(_unpack_libraries_with_build_configuration VAR) 55 | set(${VAR} "") 56 | foreach(lib ${ARGN}) 57 | string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") 58 | list(APPEND ${VAR} "${lib}") 59 | endforeach() 60 | endmacro() 61 | 62 | 63 | if(radar_CONFIG_INCLUDED) 64 | return() 65 | endif() 66 | set(radar_CONFIG_INCLUDED TRUE) 67 | 68 | # set variables for source/devel/install prefixes 69 | if("TRUE" STREQUAL "TRUE") 70 | set(radar_SOURCE_PREFIX /home/mac/Developer/ros-examples/src/radar) 71 | set(radar_DEVEL_PREFIX /home/mac/Developer/ros-examples/devel) 72 | set(radar_INSTALL_PREFIX "") 73 | set(radar_PREFIX ${radar_DEVEL_PREFIX}) 74 | else() 75 | set(radar_SOURCE_PREFIX "") 76 | set(radar_DEVEL_PREFIX "") 77 | set(radar_INSTALL_PREFIX /home/mac/Developer/ros-examples/install) 78 | set(radar_PREFIX ${radar_INSTALL_PREFIX}) 79 | endif() 80 | 81 | # warn when using a deprecated package 82 | if(NOT "" STREQUAL "") 83 | set(_msg "WARNING: package 'radar' is deprecated") 84 | # append custom deprecation text if available 85 | if(NOT "" STREQUAL "TRUE") 86 | set(_msg "${_msg} ()") 87 | endif() 88 | message("${_msg}") 89 | endif() 90 | 91 | # flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project 92 | set(radar_FOUND_CATKIN_PROJECT TRUE) 93 | 94 | if(NOT " " STREQUAL " ") 95 | set(radar_INCLUDE_DIRS "") 96 | set(_include_dirs "") 97 | foreach(idir ${_include_dirs}) 98 | if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) 99 | set(include ${idir}) 100 | elseif("${idir} " STREQUAL "include ") 101 | get_filename_component(include "${radar_DIR}/../../../include" ABSOLUTE) 102 | if(NOT IS_DIRECTORY ${include}) 103 | message(FATAL_ERROR "Project 'radar' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'mac ' to fix it.") 104 | endif() 105 | else() 106 | message(FATAL_ERROR "Project 'radar' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/mac/Developer/ros-examples/src/radar/${idir}'. Ask the maintainer 'mac ' to fix it.") 107 | endif() 108 | _list_append_unique(radar_INCLUDE_DIRS ${include}) 109 | endforeach() 110 | endif() 111 | 112 | set(libraries "") 113 | foreach(library ${libraries}) 114 | # keep build configuration keywords, target names and absolute libraries as-is 115 | if("${library}" MATCHES "^(debug|optimized|general)$") 116 | list(APPEND radar_LIBRARIES ${library}) 117 | elseif(TARGET ${library}) 118 | list(APPEND radar_LIBRARIES ${library}) 119 | elseif(IS_ABSOLUTE ${library}) 120 | list(APPEND radar_LIBRARIES ${library}) 121 | else() 122 | set(lib_path "") 123 | set(lib "${library}-NOTFOUND") 124 | # since the path where the library is found is returned we have to iterate over the paths manually 125 | foreach(path /home/mac/Developer/ros-examples/devel/lib;/opt/ros/indigo/lib) 126 | find_library(lib ${library} 127 | PATHS ${path} 128 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) 129 | if(lib) 130 | set(lib_path ${path}) 131 | break() 132 | endif() 133 | endforeach() 134 | if(lib) 135 | _list_append_unique(radar_LIBRARY_DIRS ${lib_path}) 136 | list(APPEND radar_LIBRARIES ${lib}) 137 | else() 138 | # as a fall back for non-catkin libraries try to search globally 139 | find_library(lib ${library}) 140 | if(NOT lib) 141 | message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'radar'? Did you find_package() it before the subdirectory containing its code is included?") 142 | endif() 143 | list(APPEND radar_LIBRARIES ${lib}) 144 | endif() 145 | endif() 146 | endforeach() 147 | 148 | set(radar_EXPORTED_TARGETS "") 149 | # create dummy targets for exported code generation targets to make life of users easier 150 | foreach(t ${radar_EXPORTED_TARGETS}) 151 | if(NOT TARGET ${t}) 152 | add_custom_target(${t}) 153 | endif() 154 | endforeach() 155 | 156 | set(depends "") 157 | foreach(depend ${depends}) 158 | string(REPLACE " " ";" depend_list ${depend}) 159 | # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls 160 | list(GET depend_list 0 radar_dep) 161 | list(LENGTH depend_list count) 162 | if(${count} EQUAL 1) 163 | # simple dependencies must only be find_package()-ed once 164 | if(NOT ${radar_dep}_FOUND) 165 | find_package(${radar_dep} REQUIRED) 166 | endif() 167 | else() 168 | # dependencies with components must be find_package()-ed again 169 | list(REMOVE_AT depend_list 0) 170 | find_package(${radar_dep} REQUIRED ${depend_list}) 171 | endif() 172 | _list_append_unique(radar_INCLUDE_DIRS ${${radar_dep}_INCLUDE_DIRS}) 173 | 174 | # merge build configuration keywords with library names to correctly deduplicate 175 | _pack_libraries_with_build_configuration(radar_LIBRARIES ${radar_LIBRARIES}) 176 | _pack_libraries_with_build_configuration(_libraries ${${radar_dep}_LIBRARIES}) 177 | _list_append_deduplicate(radar_LIBRARIES ${_libraries}) 178 | # undo build configuration keyword merging after deduplication 179 | _unpack_libraries_with_build_configuration(radar_LIBRARIES ${radar_LIBRARIES}) 180 | 181 | _list_append_unique(radar_LIBRARY_DIRS ${${radar_dep}_LIBRARY_DIRS}) 182 | list(APPEND radar_EXPORTED_TARGETS ${${radar_dep}_EXPORTED_TARGETS}) 183 | endforeach() 184 | 185 | set(pkg_cfg_extras "") 186 | foreach(extra ${pkg_cfg_extras}) 187 | if(NOT IS_ABSOLUTE ${extra}) 188 | set(extra ${radar_DIR}/${extra}) 189 | endif() 190 | include(${extra}) 191 | endforeach() 192 | -------------------------------------------------------------------------------- /images/image_53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mjshiggins/ros-examples/f61da78b503f2d6dddbf7a59ba29eb1d24f8cd27/images/image_53.png -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | /opt/ros/indigo/share/catkin/cmake/toplevel.cmake -------------------------------------------------------------------------------- /src/fusion/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(fusion) 3 | 4 | ## Add support for C++11, supported in ROS Kinetic and newer 5 | # add_definitions(-std=c++11) 6 | 7 | ## Find catkin macros and libraries 8 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 9 | ## is used, also find other catkin packages 10 | find_package(catkin REQUIRED COMPONENTS 11 | pcl_conversions 12 | pcl_ros 13 | roscpp 14 | rospy 15 | sensor_msgs 16 | ) 17 | 18 | ## System dependencies are found with CMake's conventions 19 | # find_package(Boost REQUIRED COMPONENTS system) 20 | 21 | 22 | ## Uncomment this if the package has a setup.py. This macro ensures 23 | ## modules and global scripts declared therein get installed 24 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 25 | # catkin_python_setup() 26 | 27 | ################################################ 28 | ## Declare ROS messages, services and actions ## 29 | ################################################ 30 | 31 | ## To declare and build messages, services or actions from within this 32 | ## package, follow these steps: 33 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 34 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 35 | ## * In the file package.xml: 36 | ## * add a build_depend tag for "message_generation" 37 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 38 | ## * If MSG_DEP_SET isn't empty the following dependency has been pulled in 39 | ## but can be declared for certainty nonetheless: 40 | ## * add a run_depend tag for "message_runtime" 41 | ## * In this file (CMakeLists.txt): 42 | ## * add "message_generation" and every package in MSG_DEP_SET to 43 | ## find_package(catkin REQUIRED COMPONENTS ...) 44 | ## * add "message_runtime" and every package in MSG_DEP_SET to 45 | ## catkin_package(CATKIN_DEPENDS ...) 46 | ## * uncomment the add_*_files sections below as needed 47 | ## and list every .msg/.srv/.action file to be processed 48 | ## * uncomment the generate_messages entry below 49 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 50 | 51 | ## Generate messages in the 'msg' folder 52 | # add_message_files( 53 | # FILES 54 | # Message1.msg 55 | # Message2.msg 56 | # ) 57 | 58 | ## Generate services in the 'srv' folder 59 | # add_service_files( 60 | # FILES 61 | # Service1.srv 62 | # Service2.srv 63 | # ) 64 | 65 | ## Generate actions in the 'action' folder 66 | # add_action_files( 67 | # FILES 68 | # Action1.action 69 | # Action2.action 70 | # ) 71 | 72 | ## Generate added messages and services with any dependencies listed here 73 | # generate_messages( 74 | # DEPENDENCIES 75 | # sensor_msgs 76 | # ) 77 | 78 | ################################################ 79 | ## Declare ROS dynamic reconfigure parameters ## 80 | ################################################ 81 | 82 | ## To declare and build dynamic reconfigure parameters within this 83 | ## package, follow these steps: 84 | ## * In the file package.xml: 85 | ## * add a build_depend and a run_depend tag for "dynamic_reconfigure" 86 | ## * In this file (CMakeLists.txt): 87 | ## * add "dynamic_reconfigure" to 88 | ## find_package(catkin REQUIRED COMPONENTS ...) 89 | ## * uncomment the "generate_dynamic_reconfigure_options" section below 90 | ## and list every .cfg file to be processed 91 | 92 | ## Generate dynamic reconfigure parameters in the 'cfg' folder 93 | # generate_dynamic_reconfigure_options( 94 | # cfg/DynReconf1.cfg 95 | # cfg/DynReconf2.cfg 96 | # ) 97 | 98 | ################################### 99 | ## catkin specific configuration ## 100 | ################################### 101 | ## The catkin_package macro generates cmake config files for your package 102 | ## Declare things to be passed to dependent projects 103 | ## INCLUDE_DIRS: uncomment this if you package contains header files 104 | ## LIBRARIES: libraries you create in this project that dependent projects also need 105 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 106 | ## DEPENDS: system dependencies of this project that dependent projects also need 107 | catkin_package( 108 | # INCLUDE_DIRS include 109 | # LIBRARIES fusion 110 | # CATKIN_DEPENDS pcl_conversions pcl_ros roscpp rospy sensor_msgs 111 | # DEPENDS system_lib 112 | ) 113 | 114 | ########### 115 | ## Build ## 116 | ########### 117 | 118 | ## Specify additional locations of header files 119 | ## Your package locations should be listed before other locations 120 | # include_directories(include) 121 | include_directories( 122 | ${catkin_INCLUDE_DIRS} 123 | ) 124 | 125 | ## Declare a C++ library 126 | # add_library(${PROJECT_NAME} 127 | # src/${PROJECT_NAME}/fusion.cpp 128 | # ) 129 | 130 | ## Add cmake target dependencies of the library 131 | ## as an example, code may need to be generated before libraries 132 | ## either from message generation or dynamic reconfigure 133 | # add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 134 | 135 | ## Declare a C++ executable 136 | ## With catkin_make all packages are built within a single CMake context 137 | ## The recommended prefix ensures that target names across packages don't collide 138 | # add_executable(${PROJECT_NAME}_node src/fusion_node.cpp) 139 | 140 | ## Rename C++ executable without prefix 141 | ## The above recommended prefix causes long target names, the following renames the 142 | ## target back to the shorter version for ease of user use 143 | ## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" 144 | # set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") 145 | 146 | ## Add cmake target dependencies of the executable 147 | ## same as for the library above 148 | # add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 149 | 150 | ## Specify libraries to link a library or executable target against 151 | # target_link_libraries(${PROJECT_NAME}_node 152 | # ${catkin_LIBRARIES} 153 | # ) 154 | 155 | ############# 156 | ## Install ## 157 | ############# 158 | 159 | # all install targets should use catkin DESTINATION variables 160 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 161 | 162 | ## Mark executable scripts (Python etc.) for installation 163 | ## in contrast to setup.py, you can choose the destination 164 | # install(PROGRAMS 165 | # scripts/my_python_script 166 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 167 | # ) 168 | 169 | ## Mark executables and/or libraries for installation 170 | # install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node 171 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 172 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 173 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 174 | # ) 175 | 176 | ## Mark cpp header files for installation 177 | # install(DIRECTORY include/${PROJECT_NAME}/ 178 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 179 | # FILES_MATCHING PATTERN "*.h" 180 | # PATTERN ".svn" EXCLUDE 181 | # ) 182 | 183 | ## Mark other files for installation (e.g. launch and bag files, etc.) 184 | # install(FILES 185 | # # myfile1 186 | # # myfile2 187 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 188 | # ) 189 | 190 | ############# 191 | ## Testing ## 192 | ############# 193 | 194 | ## Add gtest based cpp test target and link libraries 195 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_fusion.cpp) 196 | # if(TARGET ${PROJECT_NAME}-test) 197 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 198 | # endif() 199 | 200 | ## Add folders to be run by python nosetests 201 | # catkin_add_nosetests(test) 202 | -------------------------------------------------------------------------------- /src/fusion/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | fusion 4 | 0.0.0 5 | The fusion package 6 | 7 | 8 | 9 | 10 | mac 11 | 12 | 13 | 14 | 15 | 16 | TODO 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | pcl_conversions 44 | pcl_ros 45 | roscpp 46 | rospy 47 | sensor_msgs 48 | pcl_conversions 49 | pcl_ros 50 | roscpp 51 | rospy 52 | sensor_msgs 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/lidar/CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/mac/Developer/ros-examples/src/lidar 3 | # It was generated by CMake: /usr/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //Build shared libraries (DLLs). 18 | BUILD_SHARED_LIBS:BOOL=ON 19 | 20 | //Catkin enable testing 21 | CATKIN_ENABLE_TESTING:BOOL=ON 22 | 23 | //Prefix to apply to package generated via gendebian 24 | CATKIN_PACKAGE_PREFIX:STRING= 25 | 26 | //Catkin skip testing 27 | CATKIN_SKIP_TESTING:BOOL=OFF 28 | 29 | //Path to a program. 30 | CMAKE_AR:FILEPATH=/usr/bin/ar 31 | 32 | //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or 33 | // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. 34 | CMAKE_BUILD_TYPE:STRING= 35 | 36 | //Enable/Disable color output during build. 37 | CMAKE_COLOR_MAKEFILE:BOOL=ON 38 | 39 | //CXX compiler 40 | CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ 41 | 42 | //Flags used by the compiler during all build types. 43 | CMAKE_CXX_FLAGS:STRING= 44 | 45 | //Flags used by the compiler during debug builds. 46 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 47 | 48 | //Flags used by the compiler during release builds for minimum 49 | // size. 50 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 51 | 52 | //Flags used by the compiler during release builds. 53 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 54 | 55 | //Flags used by the compiler during release builds with debug info. 56 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 57 | 58 | //C compiler 59 | CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc 60 | 61 | //Flags used by the compiler during all build types. 62 | CMAKE_C_FLAGS:STRING= 63 | 64 | //Flags used by the compiler during debug builds. 65 | CMAKE_C_FLAGS_DEBUG:STRING=-g 66 | 67 | //Flags used by the compiler during release builds for minimum 68 | // size. 69 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 70 | 71 | //Flags used by the compiler during release builds. 72 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 73 | 74 | //Flags used by the compiler during release builds with debug info. 75 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 76 | 77 | //Flags used by the linker. 78 | CMAKE_EXE_LINKER_FLAGS:STRING= 79 | 80 | //Flags used by the linker during debug builds. 81 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 82 | 83 | //Flags used by the linker during release minsize builds. 84 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 85 | 86 | //Flags used by the linker during release builds. 87 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 88 | 89 | //Flags used by the linker during Release with Debug Info builds. 90 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 91 | 92 | //Enable/Disable output of compile commands during generation. 93 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF 94 | 95 | //Install path prefix, prepended onto install directories. 96 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 97 | 98 | //Path to a program. 99 | CMAKE_LINKER:FILEPATH=/usr/bin/ld 100 | 101 | //Path to a program. 102 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 103 | 104 | //Flags used by the linker during the creation of modules. 105 | CMAKE_MODULE_LINKER_FLAGS:STRING= 106 | 107 | //Flags used by the linker during debug builds. 108 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 109 | 110 | //Flags used by the linker during release minsize builds. 111 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 112 | 113 | //Flags used by the linker during release builds. 114 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 115 | 116 | //Flags used by the linker during Release with Debug Info builds. 117 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 118 | 119 | //Path to a program. 120 | CMAKE_NM:FILEPATH=/usr/bin/nm 121 | 122 | //Path to a program. 123 | CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy 124 | 125 | //Path to a program. 126 | CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump 127 | 128 | //Value Computed by CMake 129 | CMAKE_PROJECT_NAME:STATIC=lidar 130 | 131 | //Path to a program. 132 | CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib 133 | 134 | //Flags used by the linker during the creation of dll's. 135 | CMAKE_SHARED_LINKER_FLAGS:STRING= 136 | 137 | //Flags used by the linker during debug builds. 138 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 139 | 140 | //Flags used by the linker during release minsize builds. 141 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 142 | 143 | //Flags used by the linker during release builds. 144 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 145 | 146 | //Flags used by the linker during Release with Debug Info builds. 147 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 148 | 149 | //If set, runtime paths are not added when installing shared libraries, 150 | // but are added when building. 151 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 152 | 153 | //If set, runtime paths are not added when using shared libraries. 154 | CMAKE_SKIP_RPATH:BOOL=NO 155 | 156 | //Flags used by the linker during the creation of static libraries. 157 | CMAKE_STATIC_LINKER_FLAGS:STRING= 158 | 159 | //Flags used by the linker during debug builds. 160 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 161 | 162 | //Flags used by the linker during release minsize builds. 163 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 164 | 165 | //Flags used by the linker during release builds. 166 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 167 | 168 | //Flags used by the linker during Release with Debug Info builds. 169 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 170 | 171 | //Path to a program. 172 | CMAKE_STRIP:FILEPATH=/usr/bin/strip 173 | 174 | //If true, cmake will use relative paths in makefiles and projects. 175 | CMAKE_USE_RELATIVE_PATHS:BOOL=OFF 176 | 177 | //If this value is on, makefiles will be generated without the 178 | // .SILENT directive, and all commands will be echoed to the console 179 | // during the make. This is useful for debugging only. With Visual 180 | // Studio IDE projects all commands are done without /nologo. 181 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 182 | 183 | //Path to a program. 184 | DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND 185 | 186 | //Path to a program. 187 | EMPY_EXECUTABLE:FILEPATH=/usr/bin/empy 188 | 189 | //Empy script 190 | EMPY_SCRIPT:STRING=/usr/bin/empy 191 | 192 | //Path to a file. 193 | GTEST_INCLUDE_DIR:PATH=/usr/include 194 | 195 | //Path to a library. 196 | GTEST_LIBRARY:FILEPATH=GTEST_LIBRARY-NOTFOUND 197 | 198 | //Path to a library. 199 | GTEST_LIBRARY_DEBUG:FILEPATH=GTEST_LIBRARY_DEBUG-NOTFOUND 200 | 201 | //Path to a library. 202 | GTEST_MAIN_LIBRARY:FILEPATH=GTEST_MAIN_LIBRARY-NOTFOUND 203 | 204 | //Path to a library. 205 | GTEST_MAIN_LIBRARY_DEBUG:FILEPATH=GTEST_MAIN_LIBRARY_DEBUG-NOTFOUND 206 | 207 | //lsb_release executable was found 208 | LSB_FOUND:BOOL=TRUE 209 | 210 | //Path to a program. 211 | LSB_RELEASE_EXECUTABLE:FILEPATH=/usr/bin/lsb_release 212 | 213 | //Path to a program. 214 | NOSETESTS:FILEPATH=/usr/bin/nosetests-2.7 215 | 216 | //The directory containing a CMake configuration file for PNGwriter. 217 | PNGwriter_DIR:PATH=PNGwriter_DIR-NOTFOUND 218 | 219 | //Path to a program. 220 | PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python 221 | 222 | //Specify specific Python version to use ('major.minor' or 'major') 223 | PYTHON_VERSION:STRING= 224 | 225 | //Path to a library. 226 | RT_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so 227 | 228 | //Enable debian style python package layout 229 | SETUPTOOLS_DEB_LAYOUT:BOOL=ON 230 | 231 | //LSB Distrib tag 232 | UBUNTU:BOOL=TRUE 233 | 234 | //LSB Distrib - codename tag 235 | UBUNTU_TRUSTY:BOOL=TRUE 236 | 237 | //Path to a file. 238 | _CATKIN_GTEST_INCLUDE:FILEPATH=/usr/include/gtest/gtest.h 239 | 240 | //Path to a file. 241 | _CATKIN_GTEST_SRC:FILEPATH=/usr/src/gtest/src/gtest.cc 242 | 243 | //The directory containing a CMake configuration file for actionlib. 244 | actionlib_DIR:PATH=/opt/ros/indigo/share/actionlib/cmake 245 | 246 | //The directory containing a CMake configuration file for actionlib_msgs. 247 | actionlib_msgs_DIR:PATH=/opt/ros/indigo/share/actionlib_msgs/cmake 248 | 249 | //The directory containing a CMake configuration file for bond. 250 | bond_DIR:PATH=/opt/ros/indigo/share/bond/cmake 251 | 252 | //The directory containing a CMake configuration file for bondcpp. 253 | bondcpp_DIR:PATH=/opt/ros/indigo/share/bondcpp/cmake 254 | 255 | //The directory containing a CMake configuration file for catkin. 256 | catkin_DIR:PATH=/opt/ros/indigo/share/catkin/cmake 257 | 258 | //The directory containing a CMake configuration file for class_loader. 259 | class_loader_DIR:PATH=/opt/ros/indigo/share/class_loader/cmake 260 | 261 | //The directory containing a CMake configuration file for cpp_common. 262 | cpp_common_DIR:PATH=/opt/ros/indigo/share/cpp_common/cmake 263 | 264 | //The directory containing a CMake configuration file for dynamic_reconfigure. 265 | dynamic_reconfigure_DIR:PATH=/opt/ros/indigo/share/dynamic_reconfigure/cmake 266 | 267 | //The directory containing a CMake configuration file for gencpp. 268 | gencpp_DIR:PATH=/opt/ros/indigo/share/gencpp/cmake 269 | 270 | //The directory containing a CMake configuration file for geneus. 271 | geneus_DIR:PATH=/opt/ros/indigo/share/geneus/cmake 272 | 273 | //The directory containing a CMake configuration file for genlisp. 274 | genlisp_DIR:PATH=/opt/ros/indigo/share/genlisp/cmake 275 | 276 | //The directory containing a CMake configuration file for genmsg. 277 | genmsg_DIR:PATH=/opt/ros/indigo/share/genmsg/cmake 278 | 279 | //The directory containing a CMake configuration file for genpy. 280 | genpy_DIR:PATH=/opt/ros/indigo/share/genpy/cmake 281 | 282 | //The directory containing a CMake configuration file for geometry_msgs. 283 | geometry_msgs_DIR:PATH=/opt/ros/indigo/share/geometry_msgs/cmake 284 | 285 | //Value Computed by CMake 286 | gtest_BINARY_DIR:STATIC=/home/mac/Developer/ros-examples/src/lidar/gtest 287 | 288 | //Dependencies for the target 289 | gtest_LIB_DEPENDS:STATIC=general;-lpthread; 290 | 291 | //Value Computed by CMake 292 | gtest_SOURCE_DIR:STATIC=/usr/src/gtest 293 | 294 | //Build gtest's sample programs. 295 | gtest_build_samples:BOOL=OFF 296 | 297 | //Build all of gtest's own tests. 298 | gtest_build_tests:BOOL=OFF 299 | 300 | //Disable uses of pthreads in gtest. 301 | gtest_disable_pthreads:BOOL=OFF 302 | 303 | //Use shared (DLL) run-time lib even when Google Test is built 304 | // as static lib. 305 | gtest_force_shared_crt:BOOL=OFF 306 | 307 | //Dependencies for the target 308 | gtest_main_LIB_DEPENDS:STATIC=general;-lpthread;general;gtest; 309 | 310 | //Path to a library. 311 | lib:FILEPATH=/opt/ros/indigo/lib/libtf2.so 312 | 313 | //Value Computed by CMake 314 | lidar_BINARY_DIR:STATIC=/home/mac/Developer/ros-examples/src/lidar 315 | 316 | //Value Computed by CMake 317 | lidar_SOURCE_DIR:STATIC=/home/mac/Developer/ros-examples/src/lidar 318 | 319 | //The directory containing a CMake configuration file for message_filters. 320 | message_filters_DIR:PATH=/opt/ros/indigo/share/message_filters/cmake 321 | 322 | //The directory containing a CMake configuration file for message_generation. 323 | message_generation_DIR:PATH=/opt/ros/indigo/share/message_generation/cmake 324 | 325 | //The directory containing a CMake configuration file for message_runtime. 326 | message_runtime_DIR:PATH=/opt/ros/indigo/share/message_runtime/cmake 327 | 328 | //The directory containing a CMake configuration file for nodelet. 329 | nodelet_DIR:PATH=/opt/ros/indigo/share/nodelet/cmake 330 | 331 | //The directory containing a CMake configuration file for pcl_conversions. 332 | pcl_conversions_DIR:PATH=/opt/ros/indigo/share/pcl_conversions/cmake 333 | 334 | //The directory containing a CMake configuration file for pcl_msgs. 335 | pcl_msgs_DIR:PATH=/opt/ros/indigo/share/pcl_msgs/cmake 336 | 337 | //The directory containing a CMake configuration file for pcl_ros. 338 | pcl_ros_DIR:PATH=/opt/ros/indigo/share/pcl_ros/cmake 339 | 340 | //The directory containing a CMake configuration file for pluginlib. 341 | pluginlib_DIR:PATH=/opt/ros/indigo/share/pluginlib/cmake 342 | 343 | //The directory containing a CMake configuration file for rosbag. 344 | rosbag_DIR:PATH=/opt/ros/indigo/share/rosbag/cmake 345 | 346 | //The directory containing a CMake configuration file for rosbag_storage. 347 | rosbag_storage_DIR:PATH=/opt/ros/indigo/share/rosbag_storage/cmake 348 | 349 | //The directory containing a CMake configuration file for rosconsole. 350 | rosconsole_DIR:PATH=/opt/ros/indigo/share/rosconsole/cmake 351 | 352 | //The directory containing a CMake configuration file for roscpp. 353 | roscpp_DIR:PATH=/opt/ros/indigo/share/roscpp/cmake 354 | 355 | //The directory containing a CMake configuration file for roscpp_serialization. 356 | roscpp_serialization_DIR:PATH=/opt/ros/indigo/share/roscpp_serialization/cmake 357 | 358 | //The directory containing a CMake configuration file for roscpp_traits. 359 | roscpp_traits_DIR:PATH=/opt/ros/indigo/share/roscpp_traits/cmake 360 | 361 | //The directory containing a CMake configuration file for rosgraph. 362 | rosgraph_DIR:PATH=/opt/ros/indigo/share/rosgraph/cmake 363 | 364 | //The directory containing a CMake configuration file for rosgraph_msgs. 365 | rosgraph_msgs_DIR:PATH=/opt/ros/indigo/share/rosgraph_msgs/cmake 366 | 367 | //The directory containing a CMake configuration file for roslib. 368 | roslib_DIR:PATH=/opt/ros/indigo/share/roslib/cmake 369 | 370 | //The directory containing a CMake configuration file for roslz4. 371 | roslz4_DIR:PATH=/opt/ros/indigo/share/roslz4/cmake 372 | 373 | //The directory containing a CMake configuration file for rospack. 374 | rospack_DIR:PATH=/opt/ros/indigo/share/rospack/cmake 375 | 376 | //The directory containing a CMake configuration file for rospy. 377 | rospy_DIR:PATH=/opt/ros/indigo/share/rospy/cmake 378 | 379 | //The directory containing a CMake configuration file for rostime. 380 | rostime_DIR:PATH=/opt/ros/indigo/share/rostime/cmake 381 | 382 | //The directory containing a CMake configuration file for sensor_msgs. 383 | sensor_msgs_DIR:PATH=/opt/ros/indigo/share/sensor_msgs/cmake 384 | 385 | //The directory containing a CMake configuration file for smclib. 386 | smclib_DIR:PATH=/opt/ros/indigo/share/smclib/cmake 387 | 388 | //The directory containing a CMake configuration file for std_msgs. 389 | std_msgs_DIR:PATH=/opt/ros/indigo/share/std_msgs/cmake 390 | 391 | //The directory containing a CMake configuration file for tf2. 392 | tf2_DIR:PATH=/opt/ros/indigo/share/tf2/cmake 393 | 394 | //The directory containing a CMake configuration file for tf2_msgs. 395 | tf2_msgs_DIR:PATH=/opt/ros/indigo/share/tf2_msgs/cmake 396 | 397 | //The directory containing a CMake configuration file for tf2_py. 398 | tf2_py_DIR:PATH=/opt/ros/indigo/share/tf2_py/cmake 399 | 400 | //The directory containing a CMake configuration file for tf2_ros. 401 | tf2_ros_DIR:PATH=/opt/ros/indigo/share/tf2_ros/cmake 402 | 403 | //The directory containing a CMake configuration file for tf. 404 | tf_DIR:PATH=/opt/ros/indigo/share/tf/cmake 405 | 406 | //The directory containing a CMake configuration file for topic_tools. 407 | topic_tools_DIR:PATH=/opt/ros/indigo/share/topic_tools/cmake 408 | 409 | //The directory containing a CMake configuration file for xmlrpcpp. 410 | xmlrpcpp_DIR:PATH=/opt/ros/indigo/share/xmlrpcpp/cmake 411 | 412 | 413 | ######################## 414 | # INTERNAL cache entries 415 | ######################## 416 | 417 | //catkin environment 418 | CATKIN_ENV:INTERNAL=/home/mac/Developer/ros-examples/src/lidar/catkin_generated/env_cached.sh 419 | CATKIN_TEST_RESULTS_DIR:INTERNAL=/home/mac/Developer/ros-examples/src/lidar/test_results 420 | //ADVANCED property for variable: CMAKE_AR 421 | CMAKE_AR-ADVANCED:INTERNAL=1 422 | //This is the directory where this CMakeCache.txt was created 423 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/mac/Developer/ros-examples/src/lidar 424 | //Major version of cmake used to create the current loaded cache 425 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 426 | //Minor version of cmake used to create the current loaded cache 427 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=2 428 | //Patch version of cmake used to create the current loaded cache 429 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 430 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 431 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 432 | //Path to CMake executable. 433 | CMAKE_COMMAND:INTERNAL=/usr/bin/cmake 434 | //Path to cpack program executable. 435 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack 436 | //Path to ctest program executable. 437 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest 438 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 439 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 440 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 441 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 442 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 443 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 444 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 445 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 446 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 447 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 448 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 449 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 450 | //ADVANCED property for variable: CMAKE_C_COMPILER 451 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 452 | //ADVANCED property for variable: CMAKE_C_FLAGS 453 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 454 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 455 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 456 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 457 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 458 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 459 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 460 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 461 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 462 | //Path to cache edit program executable. 463 | CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake 464 | //Executable file format 465 | CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF 466 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 467 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 468 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 469 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 470 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 471 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 472 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 473 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 474 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 475 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 476 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 477 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 478 | //Name of external makefile project generator. 479 | CMAKE_EXTRA_GENERATOR:INTERNAL= 480 | //Name of generator. 481 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 482 | //Name of generator platform. 483 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 484 | //Name of generator toolset. 485 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 486 | //Have symbol pthread_create 487 | CMAKE_HAVE_LIBC_CREATE:INTERNAL= 488 | //Have library pthreads 489 | CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= 490 | //Have library pthread 491 | CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 492 | //Have include pthread.h 493 | CMAKE_HAVE_PTHREAD_H:INTERNAL=1 494 | //Start directory with the top level CMakeLists.txt file for this 495 | // project 496 | CMAKE_HOME_DIRECTORY:INTERNAL=/home/mac/Developer/ros-examples/src/lidar 497 | //Install .so files without execute permission. 498 | CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 499 | //ADVANCED property for variable: CMAKE_LINKER 500 | CMAKE_LINKER-ADVANCED:INTERNAL=1 501 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 502 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 503 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 504 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 505 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 506 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 507 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 508 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 509 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 510 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 511 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 512 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 513 | //ADVANCED property for variable: CMAKE_NM 514 | CMAKE_NM-ADVANCED:INTERNAL=1 515 | //number of local generators 516 | CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=2 517 | //ADVANCED property for variable: CMAKE_OBJCOPY 518 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 519 | //ADVANCED property for variable: CMAKE_OBJDUMP 520 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 521 | //ADVANCED property for variable: CMAKE_RANLIB 522 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 523 | //Path to CMake installation. 524 | CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.2 525 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 526 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 527 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 528 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 529 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 530 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 531 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 532 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 533 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 534 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 535 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 536 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 537 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 538 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 539 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 540 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 541 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 542 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 543 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 544 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 545 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 546 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 547 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 548 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 549 | //ADVANCED property for variable: CMAKE_STRIP 550 | CMAKE_STRIP-ADVANCED:INTERNAL=1 551 | //uname command 552 | CMAKE_UNAME:INTERNAL=/bin/uname 553 | //ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS 554 | CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1 555 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 556 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 557 | //Details about finding PythonInterp 558 | FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python][v2.7.6()] 559 | //Details about finding Threads 560 | FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] 561 | GTEST_FROM_SOURCE_FOUND:INTERNAL=TRUE 562 | GTEST_FROM_SOURCE_INCLUDE_DIRS:INTERNAL=/usr/include 563 | GTEST_FROM_SOURCE_LIBRARIES:INTERNAL=gtest 564 | GTEST_FROM_SOURCE_LIBRARY_DIRS:INTERNAL=/home/mac/Developer/ros-examples/src/lidar/gtest 565 | GTEST_FROM_SOURCE_MAIN_LIBRARIES:INTERNAL=gtest_main 566 | //ADVANCED property for variable: GTEST_INCLUDE_DIR 567 | GTEST_INCLUDE_DIR-ADVANCED:INTERNAL=1 568 | //ADVANCED property for variable: GTEST_LIBRARY 569 | GTEST_LIBRARY-ADVANCED:INTERNAL=1 570 | //ADVANCED property for variable: GTEST_LIBRARY_DEBUG 571 | GTEST_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 572 | //ADVANCED property for variable: GTEST_MAIN_LIBRARY 573 | GTEST_MAIN_LIBRARY-ADVANCED:INTERNAL=1 574 | //ADVANCED property for variable: GTEST_MAIN_LIBRARY_DEBUG 575 | GTEST_MAIN_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 576 | //MODIFIED property for variable: PNGwriter_DIR 577 | PNGwriter_DIR-MODIFIED:INTERNAL=ON 578 | //ADVANCED property for variable: PYTHON_EXECUTABLE 579 | PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1 580 | //This needs to be in PYTHONPATH when 'setup.py install' is called. 581 | // And it needs to match. But setuptools won't tell us where 582 | // it will install things. 583 | PYTHON_INSTALL_DIR:INTERNAL=lib/python2.7/dist-packages 584 | 585 | -------------------------------------------------------------------------------- /src/lidar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(lidar) 3 | 4 | ## Add support for C++11, supported in ROS Kinetic and newer 5 | # add_definitions(-std=c++11) 6 | 7 | ## Find catkin macros and libraries 8 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 9 | ## is used, also find other catkin packages 10 | find_package(catkin REQUIRED COMPONENTS 11 | roscpp 12 | rospy 13 | std_msgs 14 | pcl_conversions 15 | pcl_ros 16 | cv_bridge 17 | ) 18 | 19 | find_package(OpenCV REQUIRED) 20 | 21 | ## System dependencies are found with CMake's conventions 22 | # find_package(Boost REQUIRED COMPONENTS system) 23 | 24 | 25 | ## Uncomment this if the package has a setup.py. This macro ensures 26 | ## modules and global scripts declared therein get installed 27 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 28 | # catkin_python_setup() 29 | 30 | ################################################ 31 | ## Declare ROS messages, services and actions ## 32 | ################################################ 33 | 34 | ## To declare and build messages, services or actions from within this 35 | ## package, follow these steps: 36 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 37 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 38 | ## * In the file package.xml: 39 | ## * add a build_depend tag for "message_generation" 40 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 41 | ## * If MSG_DEP_SET isn't empty the following dependency has been pulled in 42 | ## but can be declared for certainty nonetheless: 43 | ## * add a run_depend tag for "message_runtime" 44 | ## * In this file (CMakeLists.txt): 45 | ## * add "message_generation" and every package in MSG_DEP_SET to 46 | ## find_package(catkin REQUIRED COMPONENTS ...) 47 | ## * add "message_runtime" and every package in MSG_DEP_SET to 48 | ## catkin_package(CATKIN_DEPENDS ...) 49 | ## * uncomment the add_*_files sections below as needed 50 | ## and list every .msg/.srv/.action file to be processed 51 | ## * uncomment the generate_messages entry below 52 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 53 | 54 | ## Generate messages in the 'msg' folder 55 | # add_message_files( 56 | # FILES 57 | # Message1.msg 58 | # Message2.msg 59 | # ) 60 | 61 | ## Generate services in the 'srv' folder 62 | # add_service_files( 63 | # FILES 64 | # Service1.srv 65 | # Service2.srv 66 | # ) 67 | 68 | ## Generate actions in the 'action' folder 69 | # add_action_files( 70 | # FILES 71 | # Action1.action 72 | # Action2.action 73 | # ) 74 | 75 | ## Generate added messages and services with any dependencies listed here 76 | # generate_messages( 77 | # DEPENDENCIES 78 | # std_msgs 79 | # ) 80 | 81 | ################################################ 82 | ## Declare ROS dynamic reconfigure parameters ## 83 | ################################################ 84 | 85 | ## To declare and build dynamic reconfigure parameters within this 86 | ## package, follow these steps: 87 | ## * In the file package.xml: 88 | ## * add a build_depend and a run_depend tag for "dynamic_reconfigure" 89 | ## * In this file (CMakeLists.txt): 90 | ## * add "dynamic_reconfigure" to 91 | ## find_package(catkin REQUIRED COMPONENTS ...) 92 | ## * uncomment the "generate_dynamic_reconfigure_options" section below 93 | ## and list every .cfg file to be processed 94 | 95 | ## Generate dynamic reconfigure parameters in the 'cfg' folder 96 | # generate_dynamic_reconfigure_options( 97 | # cfg/DynReconf1.cfg 98 | # cfg/DynReconf2.cfg 99 | # ) 100 | 101 | ################################### 102 | ## catkin specific configuration ## 103 | ################################### 104 | ## The catkin_package macro generates cmake config files for your package 105 | ## Declare things to be passed to dependent projects 106 | ## INCLUDE_DIRS: uncomment this if you package contains header files 107 | ## LIBRARIES: libraries you create in this project that dependent projects also need 108 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 109 | ## DEPENDS: system dependencies of this project that dependent projects also need 110 | catkin_package( 111 | # INCLUDE_DIRS include 112 | # LIBRARIES lidar 113 | # CATKIN_DEPENDS roscpp rospy std_msgs 114 | # DEPENDS system_lib 115 | ) 116 | 117 | ########### 118 | ## Build ## 119 | ########### 120 | 121 | ## Specify additional locations of header files 122 | ## Your package locations should be listed before other locations 123 | # include_directories(include) 124 | include_directories( 125 | include 126 | ${catkin_INCLUDE_DIRS} 127 | ) 128 | 129 | ## Declare a C++ library 130 | # add_library(${PROJECT_NAME} 131 | # src/lodepng.cpp 132 | # ) 133 | 134 | ## Add cmake target dependencies of the library 135 | ## as an example, code may need to be generated before libraries 136 | ## either from message generation or dynamic reconfigure 137 | # add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 138 | 139 | ## Declare a C++ executable 140 | ## With catkin_make all packages are built within a single CMake context 141 | ## The recommended prefix ensures that target names across packages don't collide 142 | add_executable(${PROJECT_NAME}_node src/lidar_node.cpp) 143 | 144 | ## Rename C++ executable without prefix 145 | ## The above recommended prefix causes long target names, the following renames the 146 | ## target back to the shorter version for ease of user use 147 | ## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" 148 | # set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") 149 | 150 | ## Add cmake target dependencies of the executable 151 | ## same as for the library above 152 | # add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 153 | 154 | ## Specify libraries to link a library or executable target against 155 | target_link_libraries(${PROJECT_NAME}_node 156 | ${catkin_LIBRARIES} 157 | ${OpenCV_LIBS} 158 | ) 159 | 160 | ############# 161 | ## Install ## 162 | ############# 163 | 164 | # all install targets should use catkin DESTINATION variables 165 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 166 | 167 | ## Mark executable scripts (Python etc.) for installation 168 | ## in contrast to setup.py, you can choose the destination 169 | # install(PROGRAMS 170 | # scripts/my_python_script 171 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 172 | # ) 173 | 174 | ## Mark executables and/or libraries for installation 175 | # install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node 176 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 177 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 178 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 179 | # ) 180 | 181 | ## Mark cpp header files for installation 182 | # install(DIRECTORY include/${PROJECT_NAME}/ 183 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 184 | # FILES_MATCHING PATTERN "*.h" 185 | # PATTERN ".svn" EXCLUDE 186 | # ) 187 | 188 | ## Mark other files for installation (e.g. launch and bag files, etc.) 189 | # install(FILES 190 | # # myfile1 191 | # # myfile2 192 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 193 | # ) 194 | 195 | ############# 196 | ## Testing ## 197 | ############# 198 | 199 | ## Add gtest based cpp test target and link libraries 200 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_lidar.cpp) 201 | # if(TARGET ${PROJECT_NAME}-test) 202 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 203 | # endif() 204 | 205 | ## Add folders to be run by python nosetests 206 | # catkin_add_nosetests(test) 207 | -------------------------------------------------------------------------------- /src/lidar/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | lidar 4 | 0.0.0 5 | The lidar package 6 | 7 | 8 | 9 | 10 | mac 11 | 12 | 13 | 14 | 15 | 16 | GPLv3 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | roscpp 44 | rospy 45 | std_msgs 46 | roscpp 47 | rospy 48 | std_msgs 49 | libpcl-all-dev 50 | libpcl-all 51 | cv_bridge 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/lidar/src/lidar_node.cpp: -------------------------------------------------------------------------------- 1 | // ROS Point Cloud DEM Generation 2 | // MacCallister Higgins 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #define IMAGE_HEIGHT 701 29 | #define IMAGE_WIDTH 801 30 | #define BIN 0.1 31 | 32 | using namespace cv; 33 | 34 | // Global Publishers/Subscribers 35 | ros::Subscriber subPointCloud; 36 | ros::Publisher pubPointCloud; 37 | 38 | pcl::PointCloud::Ptr cloud (new pcl::PointCloud); 39 | pcl::PointCloud::Ptr cloud_grid (new pcl::PointCloud); 40 | sensor_msgs::PointCloud2 output; 41 | 42 | double heightArray[IMAGE_HEIGHT][IMAGE_WIDTH]; 43 | 44 | cv::Mat *heightmap; 45 | std::vector compression_params; 46 | 47 | int fnameCounter; 48 | double lowest; 49 | 50 | // map meters to 0->255 51 | int map_m2i(double val){ 52 | return (int)round((val + 3.0)/6.0 * 255); 53 | } 54 | 55 | // map meters to index 56 | // returns 0 if not in range, 1 if in range and row/column are set 57 | int map_pc2rc(double x, double y, int *row, int *column){ 58 | // Find x -> row mapping 59 | *row = (int)round(floor(((((IMAGE_HEIGHT*BIN)/2.0) - x)/(IMAGE_HEIGHT*BIN)) * IMAGE_HEIGHT)); // obviously can be simplified, but leaving for debug 60 | 61 | // Find y -> column mapping 62 | *column = (int)round(floor(((((IMAGE_WIDTH*BIN)/2.0) - y)/(IMAGE_WIDTH*BIN)) * IMAGE_WIDTH)); 63 | 64 | // Return success 65 | return 1; 66 | } 67 | 68 | // map index to meters 69 | // returns 0 if not in range, 1 if in range and x/y are set 70 | int map_rc2pc(double *x, double *y, int row, int column){ 71 | // Check if falls within range 72 | if(row >= 0 && row < IMAGE_HEIGHT && column >= 0 && column < IMAGE_WIDTH){ 73 | // Find row -> x mapping 74 | *x = (double)(BIN*-1.0 * (row - (IMAGE_HEIGHT/2.0))); // this one is simplified 75 | 76 | // column -> y mapping 77 | *y = (double)(BIN*-1.0 * (column - (IMAGE_WIDTH/2.0))); 78 | 79 | // Return success 80 | return 1; 81 | } 82 | 83 | return 0; 84 | } 85 | 86 | // main generation function 87 | void DEM(const sensor_msgs::PointCloud2ConstPtr& pointCloudMsg) 88 | { 89 | ROS_DEBUG("Point Cloud Received"); 90 | 91 | // clear cloud and height map array 92 | lowest = FLT_MAX; 93 | for(int i = 0; i < IMAGE_HEIGHT; ++i){ 94 | for(int j = 0; j < IMAGE_WIDTH; ++j){ 95 | heightArray[i][j] = (double)(-FLT_MAX); 96 | } 97 | } 98 | 99 | // Convert from ROS message to PCL point cloud 100 | pcl::fromROSMsg(*pointCloudMsg, *cloud); 101 | 102 | // Populate the DEM grid by looping through every point 103 | int row, column; 104 | for(size_t j = 0; j < cloud->points.size(); ++j){ 105 | // If the point is within the image size bounds 106 | if(map_pc2rc(cloud->points[j].x, cloud->points[j].y, &row, &column) == 1 && row >= 0 && row < IMAGE_HEIGHT && column >=0 && column < IMAGE_WIDTH){ 107 | if(cloud->points[j].z > heightArray[row][column]){ 108 | heightArray[row][column] = cloud->points[j].z; 109 | } 110 | // Keep track of lowest point in cloud for flood fill 111 | else if(cloud->points[j].z < lowest){ 112 | lowest = cloud->points[j].z; 113 | } 114 | } 115 | } 116 | 117 | // Create "point cloud" and opencv image to be published for visualization 118 | int index = 0; 119 | double x, y; 120 | for(int i = 0; i < IMAGE_HEIGHT; ++i){ 121 | for(int j = 0; j < IMAGE_WIDTH; ++j){ 122 | // Add point to cloud 123 | (void)map_rc2pc(&x, &y, i, j); 124 | cloud_grid->points[index].x = x; 125 | cloud_grid->points[index].y = y; 126 | cloud_grid->points[index].z = heightArray[i][j]; 127 | ++index; 128 | 129 | // Add point to image 130 | cv::Vec3b &pixel = heightmap->at(i,j); 131 | if(heightArray[i][j] > -FLT_MAX){ 132 | pixel[0] = 0; 133 | pixel[1] = 0; 134 | pixel[2] = map_m2i(heightArray[i][j]); 135 | } 136 | else{ 137 | pixel[0] = 0; 138 | pixel[1] = 0; 139 | pixel[2] = 0;//map_m2i(lowest); 140 | } 141 | } 142 | } 143 | // Display iamge 144 | cv::imshow("Height Map", *heightmap); 145 | 146 | // Save image to disk 147 | char filename[100]; 148 | snprintf(filename, 100, "images/image_%d.png", fnameCounter); 149 | cv::imwrite(filename, *heightmap, compression_params); 150 | ++fnameCounter; 151 | 152 | // Output height map to point cloud for python node to parse to PNG 153 | pcl::toROSMsg(*cloud_grid, output); 154 | output.header.stamp = ros::Time::now(); 155 | output.header.frame_id = "velodyne"; 156 | pubPointCloud.publish(output); 157 | 158 | } 159 | 160 | int main(int argc, char** argv) 161 | { 162 | ROS_INFO("Starting LIDAR Node"); 163 | ros::init(argc, argv, "lidar_node"); 164 | ros::NodeHandle nh; 165 | 166 | // Setup output cloud 167 | cloud_grid->width = IMAGE_WIDTH; 168 | cloud_grid->height = IMAGE_HEIGHT; 169 | cloud_grid->points.resize (cloud_grid->width * cloud_grid->height); 170 | 171 | // Setup image 172 | cv::Mat map(IMAGE_HEIGHT, IMAGE_WIDTH, CV_8UC3, cv::Scalar(0, 0, 0)); 173 | heightmap = ↦ 174 | cvNamedWindow("Height Map", CV_WINDOW_AUTOSIZE); 175 | cvStartWindowThread(); 176 | cv::imshow("Height Map", *heightmap); 177 | 178 | // Setup Image Output Parameters 179 | fnameCounter = 0; 180 | lowest = FLT_MAX; 181 | compression_params.push_back(CV_IMWRITE_PNG_COMPRESSION); 182 | compression_params.push_back(9); 183 | 184 | // Setup indicies in point clouds 185 | /* 186 | int index = 0; 187 | double x, y; 188 | for(int i = 0; i < IMAGE_HEIGHT; ++i){ 189 | for(int j = 0; j < IMAGE_WIDTH; ++j){ 190 | index = i * j; 191 | (void)map_rc2pc(&x, &y, i, j); 192 | cloud_grid->points[index].x = x; 193 | cloud_grid->points[index].y = y; 194 | cloud_grid->points[index].z = (-FLT_MAX); 195 | // Temp storage 196 | heightArray[i][j] = (-FLT_MAX); 197 | } 198 | } 199 | */ 200 | 201 | subPointCloud = nh.subscribe("/velodyne_points", 2, DEM); 202 | pubPointCloud = nh.advertise ("/heightmap/pointcloud", 1); 203 | 204 | ros::spin(); 205 | 206 | return 0; 207 | } 208 | -------------------------------------------------------------------------------- /src/radar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(radar) 3 | 4 | ## Add support for C++11, supported in ROS Kinetic and newer 5 | # add_definitions(-std=c++11) 6 | 7 | ## Find catkin macros and libraries 8 | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) 9 | ## is used, also find other catkin packages 10 | find_package(catkin REQUIRED COMPONENTS 11 | pcl_conversions 12 | pcl_ros 13 | roscpp 14 | rospy 15 | sensor_msgs 16 | ) 17 | 18 | ## System dependencies are found with CMake's conventions 19 | # find_package(Boost REQUIRED COMPONENTS system) 20 | 21 | 22 | ## Uncomment this if the package has a setup.py. This macro ensures 23 | ## modules and global scripts declared therein get installed 24 | ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html 25 | # catkin_python_setup() 26 | 27 | ################################################ 28 | ## Declare ROS messages, services and actions ## 29 | ################################################ 30 | 31 | ## To declare and build messages, services or actions from within this 32 | ## package, follow these steps: 33 | ## * Let MSG_DEP_SET be the set of packages whose message types you use in 34 | ## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). 35 | ## * In the file package.xml: 36 | ## * add a build_depend tag for "message_generation" 37 | ## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET 38 | ## * If MSG_DEP_SET isn't empty the following dependency has been pulled in 39 | ## but can be declared for certainty nonetheless: 40 | ## * add a run_depend tag for "message_runtime" 41 | ## * In this file (CMakeLists.txt): 42 | ## * add "message_generation" and every package in MSG_DEP_SET to 43 | ## find_package(catkin REQUIRED COMPONENTS ...) 44 | ## * add "message_runtime" and every package in MSG_DEP_SET to 45 | ## catkin_package(CATKIN_DEPENDS ...) 46 | ## * uncomment the add_*_files sections below as needed 47 | ## and list every .msg/.srv/.action file to be processed 48 | ## * uncomment the generate_messages entry below 49 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) 50 | 51 | ## Generate messages in the 'msg' folder 52 | # add_message_files( 53 | # FILES 54 | # Message1.msg 55 | # Message2.msg 56 | # ) 57 | 58 | ## Generate services in the 'srv' folder 59 | # add_service_files( 60 | # FILES 61 | # Service1.srv 62 | # Service2.srv 63 | # ) 64 | 65 | ## Generate actions in the 'action' folder 66 | # add_action_files( 67 | # FILES 68 | # Action1.action 69 | # Action2.action 70 | # ) 71 | 72 | ## Generate added messages and services with any dependencies listed here 73 | # generate_messages( 74 | # DEPENDENCIES 75 | # sensor_msgs 76 | # ) 77 | 78 | ################################################ 79 | ## Declare ROS dynamic reconfigure parameters ## 80 | ################################################ 81 | 82 | ## To declare and build dynamic reconfigure parameters within this 83 | ## package, follow these steps: 84 | ## * In the file package.xml: 85 | ## * add a build_depend and a run_depend tag for "dynamic_reconfigure" 86 | ## * In this file (CMakeLists.txt): 87 | ## * add "dynamic_reconfigure" to 88 | ## find_package(catkin REQUIRED COMPONENTS ...) 89 | ## * uncomment the "generate_dynamic_reconfigure_options" section below 90 | ## and list every .cfg file to be processed 91 | 92 | ## Generate dynamic reconfigure parameters in the 'cfg' folder 93 | # generate_dynamic_reconfigure_options( 94 | # cfg/DynReconf1.cfg 95 | # cfg/DynReconf2.cfg 96 | # ) 97 | 98 | ################################### 99 | ## catkin specific configuration ## 100 | ################################### 101 | ## The catkin_package macro generates cmake config files for your package 102 | ## Declare things to be passed to dependent projects 103 | ## INCLUDE_DIRS: uncomment this if you package contains header files 104 | ## LIBRARIES: libraries you create in this project that dependent projects also need 105 | ## CATKIN_DEPENDS: catkin_packages dependent projects also need 106 | ## DEPENDS: system dependencies of this project that dependent projects also need 107 | catkin_package( 108 | # INCLUDE_DIRS include 109 | # LIBRARIES radar 110 | # CATKIN_DEPENDS pcl_conversions pcl_ros roscpp rospy sensor_msgs 111 | # DEPENDS system_lib 112 | ) 113 | 114 | ########### 115 | ## Build ## 116 | ########### 117 | 118 | ## Specify additional locations of header files 119 | ## Your package locations should be listed before other locations 120 | # include_directories(include) 121 | include_directories( 122 | ${catkin_INCLUDE_DIRS} 123 | ) 124 | 125 | ## Declare a C++ library 126 | # add_library(${PROJECT_NAME} 127 | # src/${PROJECT_NAME}/radar.cpp 128 | # ) 129 | 130 | ## Add cmake target dependencies of the library 131 | ## as an example, code may need to be generated before libraries 132 | ## either from message generation or dynamic reconfigure 133 | # add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 134 | 135 | ## Declare a C++ executable 136 | ## With catkin_make all packages are built within a single CMake context 137 | ## The recommended prefix ensures that target names across packages don't collide 138 | # add_executable(${PROJECT_NAME}_node src/radar_node.cpp) 139 | 140 | ## Rename C++ executable without prefix 141 | ## The above recommended prefix causes long target names, the following renames the 142 | ## target back to the shorter version for ease of user use 143 | ## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" 144 | # set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") 145 | 146 | ## Add cmake target dependencies of the executable 147 | ## same as for the library above 148 | # add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) 149 | 150 | ## Specify libraries to link a library or executable target against 151 | # target_link_libraries(${PROJECT_NAME}_node 152 | # ${catkin_LIBRARIES} 153 | # ) 154 | 155 | ############# 156 | ## Install ## 157 | ############# 158 | 159 | # all install targets should use catkin DESTINATION variables 160 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html 161 | 162 | ## Mark executable scripts (Python etc.) for installation 163 | ## in contrast to setup.py, you can choose the destination 164 | # install(PROGRAMS 165 | # scripts/my_python_script 166 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 167 | # ) 168 | 169 | ## Mark executables and/or libraries for installation 170 | # install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node 171 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 172 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} 173 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} 174 | # ) 175 | 176 | ## Mark cpp header files for installation 177 | # install(DIRECTORY include/${PROJECT_NAME}/ 178 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} 179 | # FILES_MATCHING PATTERN "*.h" 180 | # PATTERN ".svn" EXCLUDE 181 | # ) 182 | 183 | ## Mark other files for installation (e.g. launch and bag files, etc.) 184 | # install(FILES 185 | # # myfile1 186 | # # myfile2 187 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} 188 | # ) 189 | 190 | ############# 191 | ## Testing ## 192 | ############# 193 | 194 | ## Add gtest based cpp test target and link libraries 195 | # catkin_add_gtest(${PROJECT_NAME}-test test/test_radar.cpp) 196 | # if(TARGET ${PROJECT_NAME}-test) 197 | # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) 198 | # endif() 199 | 200 | ## Add folders to be run by python nosetests 201 | # catkin_add_nosetests(test) 202 | -------------------------------------------------------------------------------- /src/radar/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | radar 4 | 0.0.0 5 | The radar package 6 | 7 | 8 | 9 | 10 | mac 11 | 12 | 13 | 14 | 15 | 16 | TODO 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | pcl_conversions 44 | pcl_ros 45 | roscpp 46 | rospy 47 | sensor_msgs 48 | pcl_conversions 49 | pcl_ros 50 | roscpp 51 | rospy 52 | sensor_msgs 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | --------------------------------------------------------------------------------