├── .gitignore ├── .project ├── .pydevproject ├── .settings ├── org.eclipse.cdt.codan.core.prefs └── org.eclipse.cdt.managedbuilder.core.prefs ├── COPYING ├── README.md ├── TODO ├── demos ├── benchmark-chibios+lwip │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── .settings │ │ └── language.settings.xml │ ├── COPYING │ ├── Makefile │ ├── include │ │ ├── app.h │ │ ├── board.h │ │ ├── chconf.h │ │ ├── halconf.h │ │ ├── lwipopts.h │ │ ├── mcuconf.h │ │ ├── urosHandlers.h │ │ ├── urosMsgTypes.h │ │ └── urosconf.h │ ├── misc │ │ ├── benchmark (OpenOCD, Flash and Run).launch │ │ ├── benchmark (OpenOCD, Run only).launch │ │ ├── board.chcfg │ │ └── urosgen.cfg │ ├── project.mk │ └── src │ │ ├── app.c │ │ ├── board.c │ │ ├── main.c │ │ ├── urosHandlers.c │ │ ├── urosMsgTypes.c │ │ └── urosUser.c ├── benchmark-linux │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── language.settings.xml │ │ └── org.eclipse.cdt.codan.core.prefs │ ├── Makefile │ ├── include │ │ ├── app.h │ │ ├── urosHandlers.h │ │ ├── urosMsgTypes.h │ │ └── urosconf.h │ ├── misc │ │ ├── benchmark-posix [ops].launch │ │ ├── benchmark-posix [ps].launch │ │ └── urosgen.cfg │ ├── project.mk │ └── src │ │ ├── app.c │ │ ├── main.c │ │ ├── urosHandlers.c │ │ ├── urosMsgTypes.c │ │ └── urosUser.c ├── turtlesim-chibios+lwip │ ├── .cproject │ ├── .gitignore │ ├── .project │ ├── .settings │ │ ├── language.settings.xml │ │ └── org.eclipse.cdt.codan.core.prefs │ ├── COPYING │ ├── Makefile │ ├── include │ │ ├── app.h │ │ ├── board.h │ │ ├── chconf.h │ │ ├── halconf.h │ │ ├── log.h │ │ ├── logcfg.h │ │ ├── lwipopts.h │ │ ├── mcuconf.h │ │ ├── urosHandlers.h │ │ ├── urosMsgTypes.h │ │ ├── urosconf.h │ │ └── usbcfg.h │ ├── misc │ │ ├── R2P_GW (OpenOCD, Flash and Run).launch │ │ ├── R2P_GW (OpenOCD, Run only).launch │ │ ├── board.chcfg │ │ ├── urosgen.cfg │ │ └── urosstan.cfg │ ├── project.mk │ └── src │ │ ├── app.c │ │ ├── board.c │ │ ├── log.c │ │ ├── main.c │ │ ├── urosHandlers.c │ │ ├── urosMsgTypes.c │ │ ├── urosUser.c │ │ └── usbcfg.c └── turtlesim-posix │ ├── .cproject │ ├── .directory │ ├── .externalToolBuilders │ └── org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder.launch │ ├── .gitignore │ ├── .project │ ├── .settings │ ├── language.settings.xml │ └── org.eclipse.cdt.ui.prefs │ ├── Makefile │ ├── include │ ├── .directory │ ├── app.h │ ├── urosHandlers.h │ ├── urosMsgTypes.h │ └── urosconf.h │ ├── misc │ ├── turtlesim-posix.launch │ ├── urosgen.cfg │ └── urosstan.cfg │ ├── project.mk │ └── src │ ├── app.c │ ├── main.c │ ├── urosHandlers.c │ ├── urosMsgTypes.c │ └── urosUser.c ├── doc ├── .gitignore ├── Documentation.html └── doxygen │ ├── dox │ ├── base.dox │ ├── conn.dox │ ├── demos.dox │ ├── general.dox │ ├── main.dox │ ├── node.dox │ ├── tcpros.dox │ ├── threading.dox │ ├── user.dox │ └── xmlrpc.dox │ ├── doxygen.css │ ├── footer.html │ ├── header.html │ ├── img │ ├── gen_flow.dia │ ├── gen_flow.svg │ ├── logo.png │ ├── logo.svg │ ├── stan_flow.dia │ └── stan_flow.svg │ ├── layout.xml │ └── uros.doxyfile ├── include ├── lld │ ├── uros_lld_base.h │ ├── uros_lld_conn.h │ └── uros_lld_threading.h ├── urosBase.h ├── urosConn.h ├── urosNode.h ├── urosRpcCall.h ├── urosRpcParser.h ├── urosRpcSlave.h ├── urosRpcStreamer.h ├── urosTcpRos.h ├── urosThreading.h └── urosUser.h ├── misc ├── eclipse_syntax_coloring.tar.gz └── gensrclist.py ├── mk ├── chibios.mk ├── lwip.mk ├── posix.mk └── uros.mk ├── src ├── lld │ ├── chibios │ │ ├── uros_lld_base.c │ │ └── uros_lld_threading.c │ ├── lwip │ │ └── uros_lld_conn.c │ └── posix │ │ ├── uros_lld_base.c │ │ ├── uros_lld_conn.c │ │ └── uros_lld_threading.c ├── urosBase.c ├── urosConn.c ├── urosNode.c ├── urosRpcCall.c ├── urosRpcParser.c ├── urosRpcSlave.c ├── urosRpcStreamer.c ├── urosTcpRos.c └── urosThreading.c ├── template ├── include │ └── urosconf.h └── src │ ├── lld │ ├── uros_lld_base.c │ ├── uros_lld_conn.c │ ├── uros_lld_node.c │ └── uros_lld_threading.c │ └── urosUser.c └── tools ├── urosgen ├── .project ├── .pydevproject ├── demos │ ├── urosHandlers.c │ ├── urosHandlers.h │ ├── urosMsgTypes.c │ ├── urosMsgTypes.h │ └── urosgen_demo.cfg └── src │ ├── urosgen.py │ └── urosgen.pyc └── urosstan ├── .project ├── .pydevproject └── src └── urosstan.py /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.tmp 3 | *.bak 4 | *.old 5 | *.o 6 | .directory 7 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | uros 4 | 5 | 6 | 7 | 8 | 9 | 10 | org.python.pydev.pythonNature 11 | 12 | 13 | -------------------------------------------------------------------------------- /.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default 4 | python 2.7 5 | 6 | -------------------------------------------------------------------------------- /.settings/org.eclipse.cdt.managedbuilder.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.lib.debug.1300561874/CPATH/delimiter=\: 3 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.lib.debug.1300561874/CPATH/operation=remove 4 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.lib.debug.1300561874/C_INCLUDE_PATH/delimiter=\: 5 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.lib.debug.1300561874/C_INCLUDE_PATH/operation=remove 6 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.lib.debug.1300561874/append=true 7 | environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.lib.debug.1300561874/appendContributed=true 8 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 2 | 3 | Andrea Zoppi 4 | Martino Migliavacca 5 | 6 | http://airlab.elet.polimi.it/ 7 | http://www.openrobots.com/ 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 2. Redistributions in binary form must reproduce the above copyright notice, 15 | this list of conditions and the following disclaimer in the documentation 16 | and/or other materials provided with the distribution. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | uROSnode 2 | ======== 3 | 4 | uROSnode is a middleware targeted to embedded systems which need to communicate with ROS, in a lightweight and fast way. It is developed in pure ANSI C, which makes it easily portable and optimizable by almost all the embedded system compilers. 5 | 6 | (An unsynchronized copy of the [documentation](https://dl.dropbox.com/u/2771793/uros/doc/html/index.html) is available). 7 | 8 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | LEGEND: 2 | + Add 3 | - Remove 4 | * Fix or change 5 | ? Check 6 | ! High priority 7 | 8 | JOB QUEUE: 9 | +! Get usec timestamps 10 | +! urosThreadSleepUntil??() 11 | *! Error switches in LLD sources 12 | ?! Client service calls 13 | * Move LLD definitions from urosconf.h to specific uros_lld_*.h 14 | + UROS_LIKELY() / UROS_UNLIKELY() for better branch prediction (needed?) 15 | * Project paths 16 | * TCPROS streaming by message descriptors instead of nested functions 17 | + Topic/service flags management (latching, nodelay, ...) 18 | - Redundant XMLRPC function calls, use constant strings instead 19 | + Regex in urosstan.py entry point names 20 | - Infinite recursion (might happen in too weird XMLRPC calls) 21 | + Named dependencies in urosstan.py entry point size 22 | + Advanced logger for ChibiOS (side project) 23 | + BASE64 encoding for XMLRPC parameters 24 | + struct/map for XMLRPC parameters 25 | + Gather bus stats/info 26 | * Better urosgen.py and urosstan.py code 27 | 28 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .dep 3 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | benchmark-chibios+lwip 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | 26 | 27 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/include/app.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file app.c 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Application source header. 36 | */ 37 | 38 | #ifndef _APP_H_ 39 | #define _APP_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | 53 | /*===========================================================================*/ 54 | /* TYPES & MACROS */ 55 | /*===========================================================================*/ 56 | 57 | /** 58 | * @brief Stream counters. 59 | */ 60 | typedef struct streamcnt_t { 61 | unsigned long numMsgs; /**< @brief Total number of exchanged messages.*/ 62 | size_t numBytes; /**< @brief Total exchanged size.*/ 63 | unsigned long deltaMsgs; /**< @brief Incremental number of exchanged messages.*/ 64 | size_t deltaBytes; /**< @brief Incremental exchanged size.*/ 65 | } streamcnt_t; 66 | 67 | /** 68 | * @brief Benchmark status. 69 | */ 70 | typedef struct benchmark_t { 71 | UrosMutex lock; /**< @brief Lock word.*/ 72 | 73 | /* Configuration.*/ 74 | uint32_t rate; /**< @brief Packets/s.*/ 75 | UrosString payload; /**< @brief Packet payload string.*/ 76 | uros_bool_t hasOutPub; /**< @brief Creates the publisher of 77 | * /benchmark/output.*/ 78 | uros_bool_t hasInSub; /**< @brief Creates the subscriber of 79 | * /benchmark/input.*/ 80 | uros_bool_t hasOutSub; /**< @brief Creates the subscriber of 81 | * /benchmark/output.*/ 82 | 83 | /* Meters.*/ 84 | streamcnt_t inCount; /**< @brief Incoming stream counters.*/ 85 | streamcnt_t outCount; /**< @brief Outgoing stream counters.*/ 86 | } benchmark_t; 87 | 88 | /** @brief Sequential stream on UART1 (SD1).*/ 89 | #define SS1 ((BaseSequentialStream *)&SD1) 90 | 91 | /** @brief Skips incoming data in handlers.*/ 92 | #define HANDLERS_INPUT_SKIP 0 93 | 94 | /*===========================================================================*/ 95 | /* GLOBAL VARIABLES */ 96 | /*===========================================================================*/ 97 | 98 | extern benchmark_t benchmark; 99 | extern const UrosString rateparamname, sizeparamname; 100 | 101 | /*===========================================================================*/ 102 | /* GLOBAL PROTOTYPES */ 103 | /*===========================================================================*/ 104 | 105 | #ifdef __cplusplus 106 | extern "C" { 107 | #endif 108 | 109 | void app_initialize(void); 110 | 111 | #ifdef __cplusplus 112 | } 113 | #endif 114 | 115 | #endif /* _APP_H_ */ 116 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/include/urosHandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosHandlers.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief TCPROS topic and service handlers. 36 | */ 37 | 38 | #ifndef _UROSHANDLERS_H_ 39 | #define _UROSHANDLERS_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosMsgTypes.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | /*===========================================================================*/ 52 | /* PUBLISHED TOPIC PROTOTYPES */ 53 | /*===========================================================================*/ 54 | 55 | /*~~~ PUBLISHED TOPIC: /benchmark/output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 56 | 57 | uros_err_t pub_tpc__benchmark__output(UrosTcpRosStatus *tcpstp); 58 | 59 | /*===========================================================================*/ 60 | /* SUBSCRIBED TOPIC PROTOTYPES */ 61 | /*===========================================================================*/ 62 | 63 | /*~~~ SUBSCRIBED TOPIC: /benchmark/input ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 64 | 65 | uros_err_t sub_tpc__benchmark__input(UrosTcpRosStatus *tcpstp); 66 | 67 | /*~~~ SUBSCRIBED TOPIC: /benchmark/output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 68 | 69 | uros_err_t sub_tpc__benchmark__output(UrosTcpRosStatus *tcpstp); 70 | 71 | /*===========================================================================*/ 72 | /* PUBLISHED SERVICE PROTOTYPES */ 73 | /*===========================================================================*/ 74 | 75 | /* There are no published services.*/ 76 | 77 | /*===========================================================================*/ 78 | /* CALLED SERVICE PROTOTYPES */ 79 | /*===========================================================================*/ 80 | 81 | /* There are no called services.*/ 82 | 83 | /*===========================================================================*/ 84 | /* GLOBAL PROTOTYPES */ 85 | /*===========================================================================*/ 86 | 87 | void urosHandlersPublishTopics(void); 88 | void urosHandlersUnpublishTopics(void); 89 | 90 | void urosHandlersSubscribeTopics(void); 91 | void urosHandlersUnsubscribeTopics(void); 92 | 93 | void urosHandlersPublishServices(void); 94 | void urosHandlersUnpublishServices(void); 95 | 96 | #ifdef __cplusplus 97 | } /* extern "C" */ 98 | #endif 99 | 100 | #endif /* _UROSHANDLERS_H_ */ 101 | 102 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/include/urosMsgTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosMsgTypes.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief TCPROS message and service descriptors. 36 | */ 37 | 38 | #ifndef _UROSMSGTYPES_H_ 39 | #define _UROSMSGTYPES_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include 46 | 47 | /*===========================================================================*/ 48 | /* MESSAGE TYPES */ 49 | /*===========================================================================*/ 50 | 51 | /** @addtogroup tcpros_msg_types */ 52 | /** @{ */ 53 | 54 | /*~~~ MESSAGE: std_msgs/String ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 55 | 56 | /** 57 | * @brief TCPROS std_msgs/String message descriptor. 58 | * @details MD5 sum: 992ce8a1687cec8c8bd883ec73ca41d1. 59 | */ 60 | struct msg__std_msgs__String { 61 | UrosString data; 62 | }; 63 | 64 | /** @} */ 65 | 66 | /*===========================================================================*/ 67 | /* SERVICE TYPES */ 68 | /*===========================================================================*/ 69 | 70 | /** @addtogroup tcpros_srv_types */ 71 | /** @{ */ 72 | 73 | /* There are no service types.*/ 74 | 75 | /** @} */ 76 | 77 | /*===========================================================================*/ 78 | /* MESSAGE CONSTANTS */ 79 | /*===========================================================================*/ 80 | 81 | /** @addtogroup tcpros_msg_consts */ 82 | /** @{ */ 83 | 84 | /* There are no message costants.*/ 85 | 86 | /** @} */ 87 | 88 | /*===========================================================================*/ 89 | /* SERVICE CONSTANTS */ 90 | /*===========================================================================*/ 91 | 92 | /** @addtogroup tcpros_srv_consts */ 93 | /** @{ */ 94 | 95 | /* There are no service costants.*/ 96 | 97 | /** @} */ 98 | 99 | #ifdef __cplusplus 100 | extern "C" { 101 | #endif 102 | 103 | /*===========================================================================*/ 104 | /* MESSAGE PROTOTYPES */ 105 | /*===========================================================================*/ 106 | 107 | /*~~~ MESSAGE: std_msgs/String ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 108 | 109 | size_t length_msg__std_msgs__String( 110 | struct msg__std_msgs__String *objp 111 | ); 112 | void init_msg__std_msgs__String( 113 | struct msg__std_msgs__String *objp 114 | ); 115 | void clean_msg__std_msgs__String( 116 | struct msg__std_msgs__String *objp 117 | ); 118 | uros_err_t recv_msg__std_msgs__String( 119 | UrosTcpRosStatus *tcpstp, 120 | struct msg__std_msgs__String *objp 121 | ); 122 | uros_err_t send_msg__std_msgs__String( 123 | UrosTcpRosStatus *tcpstp, 124 | struct msg__std_msgs__String *objp 125 | ); 126 | 127 | /*===========================================================================*/ 128 | /* SERVICE PROTOTYPES */ 129 | /*===========================================================================*/ 130 | 131 | /* There are no service types.*/ 132 | 133 | /*===========================================================================*/ 134 | /* GLOBAL PROTOTYPES */ 135 | /*===========================================================================*/ 136 | 137 | void urosMsgTypesRegStaticTypes(void); 138 | 139 | #ifdef __cplusplus 140 | } /* extern "C" */ 141 | #endif 142 | 143 | #endif /* _UROSMSGTYPES_H_ */ 144 | 145 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/misc/benchmark (OpenOCD, Flash and Run).launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/misc/benchmark (OpenOCD, Run only).launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/misc/urosgen.cfg: -------------------------------------------------------------------------------- 1 | # urosgen.py configuration file for benchmark 2 | 3 | [Options] 4 | author = Andrea Zoppi 5 | licenseFile = ../../../COPYING 6 | includeDir = ../include 7 | sourceDir = ../src 8 | nodeName = benchmark 9 | fieldComments = false 10 | 11 | [PubTopics] 12 | benchmark/output = std_msgs/String 13 | 14 | [SubTopics] 15 | benchmark/input = std_msgs/String 16 | benchmark/output = std_msgs/String 17 | 18 | [PubServices] 19 | 20 | [CallServices] 21 | 22 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/project.mk: -------------------------------------------------------------------------------- 1 | # Project source files. 2 | PROJSRC = ./src/board.c \ 3 | ./src/main.c \ 4 | ./src/urosUser.c \ 5 | ./src/urosMsgTypes.c \ 6 | ./src/urosHandlers.c \ 7 | ./src/app.c 8 | 9 | # Project include directories 10 | PROJINC = ./include 11 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/src/app.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /*===========================================================================*/ 32 | /* HEADER FILES */ 33 | /*===========================================================================*/ 34 | 35 | #include "app.h" 36 | 37 | #include 38 | #include 39 | 40 | /*===========================================================================*/ 41 | /* GLOBAL VARIABLES */ 42 | /*===========================================================================*/ 43 | 44 | const UrosString rateparamname = { 15, "/benchmark_rate" }; 45 | const UrosString sizeparamname = { 15, "/benchmark_size" }; 46 | 47 | /** @brief Benchmark status.*/ 48 | benchmark_t benchmark; 49 | 50 | /*===========================================================================*/ 51 | /* GLOBAL FUNCTIONS */ 52 | /*===========================================================================*/ 53 | 54 | void app_initialize(void) { 55 | 56 | urosMutexObjectInit(&benchmark.lock); 57 | benchmark.rate = 1; 58 | urosStringObjectInit(&benchmark.payload); 59 | 60 | benchmark.hasOutPub = UROS_TRUE; 61 | benchmark.hasInSub = UROS_TRUE; 62 | benchmark.hasOutSub = UROS_FALSE; 63 | 64 | benchmark.inCount.numMsgs = 0; 65 | benchmark.inCount.numBytes = 0; 66 | benchmark.inCount.deltaMsgs = 0; 67 | benchmark.inCount.deltaBytes = 0; 68 | 69 | benchmark.outCount.numMsgs = 0; 70 | benchmark.outCount.numBytes = 0; 71 | benchmark.outCount.deltaMsgs = 0; 72 | benchmark.outCount.deltaBytes = 0; 73 | 74 | urosInit(); 75 | urosNodeCreateThread(); 76 | } 77 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/src/board.c: -------------------------------------------------------------------------------- 1 | /* 2 | ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, 3 | 2011,2012 Giovanni Di Sirio. 4 | 5 | This file is part of ChibiOS/RT. 6 | 7 | ChibiOS/RT is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | ChibiOS/RT is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | #include "ch.h" 22 | #include "hal.h" 23 | 24 | #if HAL_USE_PAL || defined(__DOXYGEN__) 25 | /** 26 | * @brief PAL setup. 27 | * @details Digital I/O ports static configuration as defined in @p board.h. 28 | * This variable is used by the HAL when initializing the PAL driver. 29 | */ 30 | const PALConfig pal_default_config = 31 | { 32 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, 33 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, 34 | {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, 35 | VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, 36 | {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, 37 | VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, 38 | {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, 39 | VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, 40 | {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, 41 | VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, 42 | {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, 43 | VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, 44 | {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, 45 | VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, 46 | {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, 47 | VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, 48 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, 49 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} 50 | }; 51 | #endif 52 | 53 | /** 54 | * @brief Early initialization code. 55 | * @details This initialization must be performed just after stack setup 56 | * and before any other initialization. 57 | */ 58 | void __early_init(void) { 59 | 60 | stm32_clock_init(); 61 | } 62 | 63 | #if HAL_USE_SDC || defined(__DOXYGEN__) 64 | /** 65 | * @brief SDC card detection. 66 | */ 67 | bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { 68 | 69 | (void)sdcp; 70 | /* TODO: Fill the implementation.*/ 71 | return TRUE; 72 | } 73 | 74 | /** 75 | * @brief SDC card write protection detection. 76 | */ 77 | bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { 78 | 79 | (void)sdcp; 80 | /* TODO: Fill the implementation.*/ 81 | return FALSE; 82 | } 83 | #endif /* HAL_USE_SDC */ 84 | 85 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) 86 | /** 87 | * @brief MMC_SPI card detection. 88 | */ 89 | bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { 90 | 91 | (void)mmcp; 92 | /* TODO: Fill the implementation.*/ 93 | return TRUE; 94 | } 95 | 96 | /** 97 | * @brief MMC_SPI card write protection detection. 98 | */ 99 | bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { 100 | 101 | (void)mmcp; 102 | /* TODO: Fill the implementation.*/ 103 | return FALSE; 104 | } 105 | #endif 106 | 107 | /** 108 | * @brief Board-specific initialization code. 109 | * @todo Add your board-specific code, if any. 110 | */ 111 | void boardInit(void) { 112 | } 113 | -------------------------------------------------------------------------------- /demos/benchmark-chibios+lwip/src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, 3 | 2011,2012 Giovanni Di Sirio. 4 | 5 | This file is part of ChibiOS/RT. 6 | 7 | ChibiOS/RT is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | ChibiOS/RT is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | 20 | --- 21 | 22 | A special exception to the GPL can be applied should you wish to distribute 23 | a combined work that includes ChibiOS/RT, without being obliged to provide 24 | the source code for any proprietary components. See the file exception.txt 25 | for full details of how and when the exception can be applied. 26 | */ 27 | 28 | #include "app.h" 29 | 30 | /*===========================================================================*/ 31 | /* Benchmark related. */ 32 | /*===========================================================================*/ 33 | 34 | #define MAX_THREADS 50 35 | 36 | typedef struct thread_info_t { 37 | Thread *threadp; 38 | systime_t time; 39 | const char *namep; 40 | } thread_info_t; 41 | 42 | static thread_info_t infos[MAX_THREADS]; 43 | 44 | static void log_thread_info(void) { 45 | 46 | Thread *tp; 47 | unsigned i, infosize; 48 | streamcnt_t inCount, outCount; 49 | 50 | /* Capture the state with the lowest jitter possible.*/ 51 | urosMutexLock(&benchmark.lock); 52 | inCount = benchmark.inCount; 53 | outCount = benchmark.outCount; 54 | benchmark.inCount.deltaMsgs = 0; 55 | benchmark.inCount.deltaBytes = 0; 56 | benchmark.outCount.deltaMsgs = 0; 57 | benchmark.outCount.deltaBytes = 0; 58 | urosMutexUnlock(&benchmark.lock); 59 | for (i = 0, tp = chRegFirstThread(); 60 | tp != NULL && i < MAX_THREADS; 61 | ++i, tp = chRegNextThread(tp)) { 62 | thread_info_t *const ip = &infos[i]; 63 | ip->threadp = tp; 64 | ip->time = tp->p_time; 65 | ip->namep = tp->p_name; 66 | } 67 | infosize = i; 68 | 69 | /* Log the captured info.*/ 70 | chprintf(SS1, "@ %U\n", (uint32_t)chTimeNow()); 71 | chprintf(SS1, "IN: %U msg %U B %U msg/s %U B/s\n", 72 | inCount.numMsgs, inCount.numBytes, 73 | inCount.deltaMsgs, inCount.deltaBytes); 74 | chprintf(SS1, "OUT: %U msg %U B %U msg/s %U B/s\n", 75 | outCount.numMsgs, outCount.numBytes, 76 | outCount.deltaMsgs, outCount.deltaBytes); 77 | for (i = 0; i < infosize; ++i) { 78 | thread_info_t *const ip = &infos[i]; 79 | chprintf(SS1, "%X %U %s\n", 80 | (uint32_t)ip->threadp, (uint32_t)ip->time, ip->namep); 81 | } 82 | chprintf(SS1, "\n"); 83 | } 84 | 85 | /*===========================================================================*/ 86 | /* Main features. */ 87 | /*===========================================================================*/ 88 | 89 | #define BLINKER_STKSIZE 128 90 | #define BLINKER_WA_SIZE THD_WA_SIZE(BLINKER_STKSIZE) 91 | 92 | static WORKING_AREA(wa_blinker, BLINKER_STKSIZE); 93 | 94 | msg_t blinker_thread(void *argp) { 95 | 96 | (void)argp; 97 | 98 | #if CH_USE_REGISTRY 99 | chSysLock(); 100 | currp->p_name = "blue_led_blinker"; 101 | chSysUnlock(); 102 | #endif 103 | while (TRUE) { 104 | palClearPad(GPIOC, GPIOC_LED1); 105 | chThdSleepMilliseconds(500); 106 | palSetPad(GPIOC, GPIOC_LED1); 107 | chThdSleepMilliseconds(500); 108 | } 109 | return RDY_OK; 110 | } 111 | 112 | /* 113 | * Application entry point. 114 | */ 115 | int main(void) { 116 | 117 | /* 118 | * System initializations. 119 | * - HAL initialization, this also initializes the configured device drivers 120 | * and performs the board-specific initializations. 121 | * - Kernel initialization, the main() function becomes a thread and the 122 | * RTOS is active. 123 | */ 124 | halInit(); 125 | chSysInit(); 126 | 127 | /* Creates the blinker thread.*/ 128 | chThdCreateStatic(wa_blinker, BLINKER_WA_SIZE, HIGHPRIO, 129 | blinker_thread, NULL); 130 | 131 | /* Make the PHY wake up.*/ 132 | palSetPad(GPIOC, GPIOC_ETH_NOT_PWRDN); 133 | 134 | /* Activates the serial driver 1 using the driver default configuration.*/ 135 | sdStart(&SD1, NULL); 136 | 137 | /* Creates the LWIP threads (it changes priority internally).*/ 138 | chThdCreateStatic(wa_lwip_thread, THD_WA_SIZE(LWIP_THREAD_STACK_SIZE), 139 | NORMALPRIO + 1, lwip_thread, NULL); 140 | 141 | /* Initializes the application.*/ 142 | app_initialize(); 143 | 144 | /* 145 | * Normal main() thread activity. It prints the useful thread information. 146 | */ 147 | while (TRUE) { 148 | systime_t deadline = chTimeNow() + MS2ST(1000); 149 | log_thread_info(); 150 | chThdSleepUntil(deadline); 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /demos/benchmark-linux/.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /demos/benchmark-linux/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .dep 3 | urosNode.config 4 | -------------------------------------------------------------------------------- /demos/benchmark-linux/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | benchmark-linux 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | 26 | 27 | 28 | uros 29 | 2 30 | virtual:/virtual 31 | 32 | 33 | uros/include 34 | 2 35 | virtual:/virtual 36 | 37 | 38 | uros/src 39 | 2 40 | virtual:/virtual 41 | 42 | 43 | uros/include/lld 44 | 2 45 | virtual:/virtual 46 | 47 | 48 | uros/include/urosBase.h 49 | 1 50 | copy_PARENT/include/urosBase.h 51 | 52 | 53 | uros/include/urosConn.h 54 | 1 55 | copy_PARENT/include/urosConn.h 56 | 57 | 58 | uros/include/urosNode.h 59 | 1 60 | copy_PARENT/include/urosNode.h 61 | 62 | 63 | uros/include/urosRpcCall.h 64 | 1 65 | copy_PARENT/include/urosRpcCall.h 66 | 67 | 68 | uros/include/urosRpcParser.h 69 | 1 70 | copy_PARENT/include/urosRpcParser.h 71 | 72 | 73 | uros/include/urosRpcSlave.h 74 | 1 75 | copy_PARENT/include/urosRpcSlave.h 76 | 77 | 78 | uros/include/urosRpcStreamer.h 79 | 1 80 | copy_PARENT/include/urosRpcStreamer.h 81 | 82 | 83 | uros/include/urosTcpRos.h 84 | 1 85 | copy_PARENT/include/urosTcpRos.h 86 | 87 | 88 | uros/include/urosThreading.h 89 | 1 90 | copy_PARENT/include/urosThreading.h 91 | 92 | 93 | uros/include/urosUser.h 94 | 1 95 | copy_PARENT/include/urosUser.h 96 | 97 | 98 | uros/src/lld 99 | 2 100 | virtual:/virtual 101 | 102 | 103 | uros/src/urosBase.c 104 | 1 105 | copy_PARENT/src/urosBase.c 106 | 107 | 108 | uros/src/urosConn.c 109 | 1 110 | copy_PARENT/src/urosConn.c 111 | 112 | 113 | uros/src/urosNode.c 114 | 1 115 | copy_PARENT/src/urosNode.c 116 | 117 | 118 | uros/src/urosRpcCall.c 119 | 1 120 | copy_PARENT/src/urosRpcCall.c 121 | 122 | 123 | uros/src/urosRpcParser.c 124 | 1 125 | copy_PARENT/src/urosRpcParser.c 126 | 127 | 128 | uros/src/urosRpcSlave.c 129 | 1 130 | copy_PARENT/src/urosRpcSlave.c 131 | 132 | 133 | uros/src/urosRpcStreamer.c 134 | 1 135 | copy_PARENT/src/urosRpcStreamer.c 136 | 137 | 138 | uros/src/urosTcpRos.c 139 | 1 140 | copy_PARENT/src/urosTcpRos.c 141 | 142 | 143 | uros/src/urosThreading.c 144 | 1 145 | copy_PARENT/src/urosThreading.c 146 | 147 | 148 | uros/include/lld/uros_lld_base.h 149 | 1 150 | copy_PARENT/include/lld/uros_lld_base.h 151 | 152 | 153 | uros/include/lld/uros_lld_conn.h 154 | 1 155 | copy_PARENT/include/lld/uros_lld_conn.h 156 | 157 | 158 | uros/include/lld/uros_lld_threading.h 159 | 1 160 | copy_PARENT/include/lld/uros_lld_threading.h 161 | 162 | 163 | uros/src/lld/posix 164 | 2 165 | virtual:/virtual 166 | 167 | 168 | uros/src/lld/posix/uros_lld_base.c 169 | 1 170 | copy_PARENT/src/lld/posix/uros_lld_base.c 171 | 172 | 173 | uros/src/lld/posix/uros_lld_conn.c 174 | 1 175 | copy_PARENT/src/lld/posix/uros_lld_conn.c 176 | 177 | 178 | uros/src/lld/posix/uros_lld_threading.c 179 | 1 180 | copy_PARENT/src/lld/posix/uros_lld_threading.c 181 | 182 | 183 | 184 | 185 | copy_PARENT 186 | $%7BPARENT-1-ECLIPSE_HOME%7D/chibios/ext/uros 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /demos/benchmark-linux/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demos/benchmark-linux/include/app.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file app.c 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Application source header. 36 | */ 37 | 38 | #ifndef _APP_H_ 39 | #define _APP_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include 46 | 47 | /*===========================================================================*/ 48 | /* TYPES & MACROS */ 49 | /*===========================================================================*/ 50 | 51 | /** 52 | * @brief Stream counters. 53 | */ 54 | typedef struct streamcnt_t { 55 | unsigned long numMsgs; /**< @brief Total number of exchanged messages.*/ 56 | size_t numBytes; /**< @brief Total exchanged size.*/ 57 | unsigned long deltaMsgs; /**< @brief Incremental number of exchanged messages.*/ 58 | size_t deltaBytes; /**< @brief Incremental exchanged size.*/ 59 | } streamcnt_t; 60 | 61 | /** 62 | * @brief CPU usage time counters (jiffies). 63 | */ 64 | typedef struct cpucnt_t { 65 | unsigned long user; /**< @brief User-level CPU time.*/ 66 | unsigned long nice; /**< @brief Niced user-level CPU time.*/ 67 | unsigned long system; /**< @brief System-level CPU time.*/ 68 | unsigned long idle; /**< @brief Idle CPU time.*/ 69 | unsigned long iowait; /**< @brief I/O wait time.*/ 70 | unsigned long irq; /**< @brief Interrupt service time.*/ 71 | unsigned long softirq; /**< @brief Software interrupt service time.*/ 72 | unsigned long misc; /**< @brief Remaining counters, aggregated.*/ 73 | } cpucnt_t; 74 | 75 | /** 76 | * @brief Benchmark status. 77 | */ 78 | typedef struct benchmark_t { 79 | UrosMutex lock; /**< @brief Lock word.*/ 80 | 81 | /* Configuration.*/ 82 | uint32_t rate; /**< @brief Packets/s.*/ 83 | UrosString payload; /**< @brief Packet payload string.*/ 84 | uros_bool_t hasOutPub; /**< @brief Creates the publisher of 85 | * /benchmark/output.*/ 86 | uros_bool_t hasInSub; /**< @brief Creates the subscriber of 87 | * /benchmark/input.*/ 88 | uros_bool_t hasOutSub; /**< @brief Creates the subscriber of 89 | * /benchmark/output.*/ 90 | 91 | /* Meters.*/ 92 | cpucnt_t curCpu; /**< @brief Current CPU usages.*/ 93 | cpucnt_t oldCpu; /**< @brief Previous CPU usages.*/ 94 | streamcnt_t inCount; /**< @brief Incoming stream counters.*/ 95 | streamcnt_t outCount; /**< @brief Outgoing stream counters.*/ 96 | UrosThreadId printerId; /**< @brief Stats printer thread.*/ 97 | } benchmark_t; 98 | 99 | /** @brief Stack size of the printer thread.*/ 100 | #define PRINTER_STKLEN (PTHREAD_STACK_MIN << 1) 101 | 102 | /** @brief Skips incoming data in handlers.*/ 103 | #define HANDLERS_INPUT_SKIP 1 104 | 105 | /** @brief Tells whether @p pthread_getname_np() adds a trailing newline.*/ 106 | #define PTHREAD_GETNAME_NP_NEWLINE 0 107 | 108 | /*===========================================================================*/ 109 | /* GLOBAL VARIABLES */ 110 | /*===========================================================================*/ 111 | 112 | extern benchmark_t benchmark; 113 | extern const UrosString rateparamname, sizeparamname; 114 | 115 | /*===========================================================================*/ 116 | /* GLOBAL PROTOTYPES */ 117 | /*===========================================================================*/ 118 | 119 | #ifdef __cplusplus 120 | extern "C" { 121 | #endif 122 | 123 | uros_err_t app_printer_thread(void* argp); 124 | void app_printusage(void); 125 | uros_bool_t app_parseargs(int argc, char *argv[]); 126 | void app_initialize(void); 127 | void app_wait_exit(void); 128 | 129 | #ifdef __cplusplus 130 | } 131 | #endif 132 | 133 | #endif /* _APP_H_ */ 134 | -------------------------------------------------------------------------------- /demos/benchmark-linux/include/urosHandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosHandlers.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief TCPROS topic and service handlers. 36 | */ 37 | 38 | #ifndef _UROSHANDLERS_H_ 39 | #define _UROSHANDLERS_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosMsgTypes.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | /*===========================================================================*/ 52 | /* PUBLISHED TOPIC PROTOTYPES */ 53 | /*===========================================================================*/ 54 | 55 | /*~~~ PUBLISHED TOPIC: /benchmark/output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 56 | 57 | uros_err_t pub_tpc__benchmark__output(UrosTcpRosStatus *tcpstp); 58 | 59 | /*===========================================================================*/ 60 | /* SUBSCRIBED TOPIC PROTOTYPES */ 61 | /*===========================================================================*/ 62 | 63 | /*~~~ SUBSCRIBED TOPIC: /benchmark/input ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 64 | 65 | uros_err_t sub_tpc__benchmark__input(UrosTcpRosStatus *tcpstp); 66 | 67 | /*~~~ SUBSCRIBED TOPIC: /benchmark/output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 68 | 69 | uros_err_t sub_tpc__benchmark__output(UrosTcpRosStatus *tcpstp); 70 | 71 | /*===========================================================================*/ 72 | /* PUBLISHED SERVICE PROTOTYPES */ 73 | /*===========================================================================*/ 74 | 75 | /* There are no published services.*/ 76 | 77 | /*===========================================================================*/ 78 | /* CALLED SERVICE PROTOTYPES */ 79 | /*===========================================================================*/ 80 | 81 | /* There are no called services.*/ 82 | 83 | /*===========================================================================*/ 84 | /* GLOBAL PROTOTYPES */ 85 | /*===========================================================================*/ 86 | 87 | void urosHandlersPublishTopics(void); 88 | void urosHandlersUnpublishTopics(void); 89 | 90 | void urosHandlersSubscribeTopics(void); 91 | void urosHandlersUnsubscribeTopics(void); 92 | 93 | void urosHandlersPublishServices(void); 94 | void urosHandlersUnpublishServices(void); 95 | 96 | #ifdef __cplusplus 97 | } /* extern "C" */ 98 | #endif 99 | 100 | #endif /* _UROSHANDLERS_H_ */ 101 | 102 | -------------------------------------------------------------------------------- /demos/benchmark-linux/include/urosMsgTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosMsgTypes.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief TCPROS message and service descriptors. 36 | */ 37 | 38 | #ifndef _UROSMSGTYPES_H_ 39 | #define _UROSMSGTYPES_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include 46 | 47 | /*===========================================================================*/ 48 | /* MESSAGE TYPES */ 49 | /*===========================================================================*/ 50 | 51 | /** @addtogroup tcpros_msg_types */ 52 | /** @{ */ 53 | 54 | /*~~~ MESSAGE: std_msgs/String ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 55 | 56 | /** 57 | * @brief TCPROS std_msgs/String message descriptor. 58 | * @details MD5 sum: 992ce8a1687cec8c8bd883ec73ca41d1. 59 | */ 60 | struct msg__std_msgs__String { 61 | UrosString data; 62 | }; 63 | 64 | /** @} */ 65 | 66 | /*===========================================================================*/ 67 | /* SERVICE TYPES */ 68 | /*===========================================================================*/ 69 | 70 | /** @addtogroup tcpros_srv_types */ 71 | /** @{ */ 72 | 73 | /* There are no service types.*/ 74 | 75 | /** @} */ 76 | 77 | /*===========================================================================*/ 78 | /* MESSAGE CONSTANTS */ 79 | /*===========================================================================*/ 80 | 81 | /** @addtogroup tcpros_msg_consts */ 82 | /** @{ */ 83 | 84 | /* There are no message costants.*/ 85 | 86 | /** @} */ 87 | 88 | /*===========================================================================*/ 89 | /* SERVICE CONSTANTS */ 90 | /*===========================================================================*/ 91 | 92 | /** @addtogroup tcpros_srv_consts */ 93 | /** @{ */ 94 | 95 | /* There are no service costants.*/ 96 | 97 | /** @} */ 98 | 99 | #ifdef __cplusplus 100 | extern "C" { 101 | #endif 102 | 103 | /*===========================================================================*/ 104 | /* MESSAGE PROTOTYPES */ 105 | /*===========================================================================*/ 106 | 107 | /*~~~ MESSAGE: std_msgs/String ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 108 | 109 | size_t length_msg__std_msgs__String( 110 | struct msg__std_msgs__String *objp 111 | ); 112 | void init_msg__std_msgs__String( 113 | struct msg__std_msgs__String *objp 114 | ); 115 | void clean_msg__std_msgs__String( 116 | struct msg__std_msgs__String *objp 117 | ); 118 | uros_err_t recv_msg__std_msgs__String( 119 | UrosTcpRosStatus *tcpstp, 120 | struct msg__std_msgs__String *objp 121 | ); 122 | uros_err_t send_msg__std_msgs__String( 123 | UrosTcpRosStatus *tcpstp, 124 | struct msg__std_msgs__String *objp 125 | ); 126 | 127 | /*===========================================================================*/ 128 | /* SERVICE PROTOTYPES */ 129 | /*===========================================================================*/ 130 | 131 | /* There are no service types.*/ 132 | 133 | /*===========================================================================*/ 134 | /* GLOBAL PROTOTYPES */ 135 | /*===========================================================================*/ 136 | 137 | void urosMsgTypesRegStaticTypes(void); 138 | 139 | #ifdef __cplusplus 140 | } /* extern "C" */ 141 | #endif 142 | 143 | #endif /* _UROSMSGTYPES_H_ */ 144 | 145 | -------------------------------------------------------------------------------- /demos/benchmark-linux/misc/benchmark-posix [ops].launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /demos/benchmark-linux/misc/benchmark-posix [ps].launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /demos/benchmark-linux/misc/urosgen.cfg: -------------------------------------------------------------------------------- 1 | # urosgen.py configuration file for benchmark 2 | 3 | [Options] 4 | author = Andrea Zoppi 5 | licenseFile = ../../../COPYING 6 | includeDir = ../include 7 | sourceDir = ../src 8 | nodeName = benchmark 9 | fieldComments = false 10 | 11 | [PubTopics] 12 | benchmark/output = std_msgs/String 13 | 14 | [SubTopics] 15 | benchmark/input = std_msgs/String 16 | benchmark/output = std_msgs/String 17 | 18 | [PubServices] 19 | 20 | [CallServices] 21 | 22 | -------------------------------------------------------------------------------- /demos/benchmark-linux/project.mk: -------------------------------------------------------------------------------- 1 | # Project source files. 2 | PROJSRC = ./src/main.c \ 3 | ./src/urosMsgTypes.c \ 4 | ./src/urosHandlers.c \ 5 | ./src/urosUser.c \ 6 | ./src/app.c 7 | 8 | # Project include directories 9 | PROJINC = ./include 10 | -------------------------------------------------------------------------------- /demos/benchmark-linux/src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /*===========================================================================*/ 32 | /* HEADER FILES */ 33 | /*===========================================================================*/ 34 | 35 | #include "app.h" 36 | 37 | /*===========================================================================*/ 38 | /* GLOBAL FUNCTIONS */ 39 | /*===========================================================================*/ 40 | 41 | int main (int argc, char *argv[]) { 42 | 43 | printf("=> uROSnode benchmark <=\n"); 44 | 45 | if (!app_parseargs(argc, argv)) { 46 | app_printusage(); 47 | return 1; 48 | } 49 | 50 | app_initialize(); 51 | app_wait_exit(); 52 | 53 | printf("\n(Node has shut down successfully)\n"); 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/.cproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | make 73 | 74 | static-analysis 75 | false 76 | true 77 | false 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .dep 3 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | turtlesim-chibios+lwip 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | 17 | 18 | 19 | 20 | 21 | org.eclipse.cdt.core.cnature 22 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 23 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 24 | 25 | 26 | 27 | uros 28 | 2 29 | ../.. 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/include/logcfg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file logcfg.h 3 | * @brief Log configuration header. 4 | * @details Log configuration file. You may also use this file in order to 5 | * override the log driver default settings. 6 | * 7 | * @addtogroup LOG_CFG 8 | * @{ 9 | */ 10 | 11 | #ifndef _LOGCFG_H_ 12 | #define _LOGCFG_H_ 13 | 14 | #define LOG_USE_WCHAR 1 15 | #define LOG_USE_64BIT 1 16 | #define LOG_USE_UINTS 1 17 | #define LOG_USE_INTS 1 18 | #define LOG_USE_OCTALS 1 19 | #define LOG_USE_FLOATS 1 20 | #define LOG_USE_STRICT_FLOATS 0 21 | #define LOG_USE_PRINTF 1 22 | #define LOG_USE_PRINTFC 1 23 | 24 | #define LOG_DEFINE_WCHAR 25 | 26 | #define LOGT_INTMAX LOGT_INT32 27 | #define LOGT_UINTMAX LOGT_UINT32 28 | #define LOGT_OCTMAX LOGT_OCT32 29 | #define LOGT_HEXMAX LOGT_HEX32 30 | 31 | #define LOGT_INTPTRDIFF LOGT_INT32 32 | #define LOGT_UINTPTRDIFF LOGT_UINT32 33 | #define LOGT_OCTPTRDIFF LOGT_OCT32 34 | #define LOGT_HEXPTRDIFF LOGT_HEX32 35 | 36 | #define LOGT_INTSIZE LOGT_INT32 37 | #define LOGT_UINTSIZE LOGT_UINT32 38 | #define LOGT_OCTSIZE LOGT_OCT32 39 | #define LOGT_HEXSIZE LOGT_HEX32 40 | 41 | #endif /* _LOGCFG_H_ */ 42 | 43 | /** @} */ 44 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/include/urosHandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosHandlers.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief TCPROS topic and service handlers. 36 | */ 37 | 38 | #ifndef _UROSHANDLERS_H_ 39 | #define _UROSHANDLERS_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosMsgTypes.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | /*===========================================================================*/ 52 | /* PUBLISHED TOPIC PROTOTYPES */ 53 | /*===========================================================================*/ 54 | 55 | /*~~~ PUBLISHED TOPIC: /rosout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 56 | 57 | uros_err_t pub_tpc__rosout(UrosTcpRosStatus *tcpstp); 58 | 59 | /*~~~ PUBLISHED TOPIC: /turtleX/color_sensor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 60 | 61 | uros_err_t pub_tpc__turtleX__color_sensor(UrosTcpRosStatus *tcpstp); 62 | 63 | /*~~~ PUBLISHED TOPIC: /turtleX/pose ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 64 | 65 | uros_err_t pub_tpc__turtleX__pose(UrosTcpRosStatus *tcpstp); 66 | 67 | /*===========================================================================*/ 68 | /* SUBSCRIBED TOPIC PROTOTYPES */ 69 | /*===========================================================================*/ 70 | 71 | /*~~~ SUBSCRIBED TOPIC: /turtleX/command_velocity ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 72 | 73 | uros_err_t sub_tpc__turtleX__command_velocity(UrosTcpRosStatus *tcpstp); 74 | 75 | /*===========================================================================*/ 76 | /* PUBLISHED SERVICE PROTOTYPES */ 77 | /*===========================================================================*/ 78 | 79 | /*~~~ PUBLISHED SERVICE: /clear ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 80 | 81 | uros_err_t pub_srv__clear(UrosTcpRosStatus *tcpstp); 82 | 83 | /*~~~ PUBLISHED SERVICE: /kill ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 84 | 85 | uros_err_t pub_srv__kill(UrosTcpRosStatus *tcpstp); 86 | 87 | /*~~~ PUBLISHED SERVICE: /spawn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 88 | 89 | uros_err_t pub_srv__spawn(UrosTcpRosStatus *tcpstp); 90 | 91 | /*~~~ PUBLISHED SERVICE: /turtleX/set_pen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 92 | 93 | uros_err_t pub_srv__turtleX__set_pen(UrosTcpRosStatus *tcpstp); 94 | 95 | /*~~~ PUBLISHED SERVICE: /turtleX/teleport_absolute ~~~~~~~~~~~~~~~~~~~~~~~~~*/ 96 | 97 | uros_err_t pub_srv__turtleX__teleport_absolute(UrosTcpRosStatus *tcpstp); 98 | 99 | /*~~~ PUBLISHED SERVICE: /turtleX/teleport_relative ~~~~~~~~~~~~~~~~~~~~~~~~~*/ 100 | 101 | uros_err_t pub_srv__turtleX__teleport_relative(UrosTcpRosStatus *tcpstp); 102 | 103 | /*===========================================================================*/ 104 | /* CALLED SERVICE PROTOTYPES */ 105 | /*===========================================================================*/ 106 | 107 | /* There are no called services.*/ 108 | 109 | /*===========================================================================*/ 110 | /* GLOBAL PROTOTYPES */ 111 | /*===========================================================================*/ 112 | 113 | void urosHandlersPublishTopics(void); 114 | void urosHandlersUnpublishTopics(void); 115 | 116 | void urosHandlersSubscribeTopics(void); 117 | void urosHandlersUnsubscribeTopics(void); 118 | 119 | void urosHandlersPublishServices(void); 120 | void urosHandlersUnpublishServices(void); 121 | 122 | #ifdef __cplusplus 123 | } /* extern "C" */ 124 | #endif 125 | 126 | #endif /* _UROSHANDLERS_H_ */ 127 | 128 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/include/usbcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, 3 | 2011,2012 Giovanni Di Sirio. 4 | 5 | This file is part of ChibiOS/RT. 6 | 7 | ChibiOS/RT is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | ChibiOS/RT is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | #ifndef _USBCFG_H_ 22 | #define _USBCFG_H_ 23 | 24 | extern const USBConfig usbcfg; 25 | extern SerialUSBConfig serusbcfg; 26 | 27 | #endif /* _USBCFG_H_ */ 28 | 29 | /** @} */ 30 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/misc/R2P_GW (OpenOCD, Flash and Run).launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/misc/R2P_GW (OpenOCD, Run only).launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 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 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/misc/urosgen.cfg: -------------------------------------------------------------------------------- 1 | # urosgen.py configuration file for turtlesim 2 | 3 | [Options] 4 | author = Andrea Zoppi 5 | licenseFile = ../../../COPYING 6 | includeDir = ../include 7 | sourceDir = ../src 8 | nodeName = turtlesim 9 | fieldComments = false 10 | 11 | [PubTopics] 12 | rosout = rosgraph_msgs/Log 13 | turtleX/pose = turtlesim/Pose 14 | turtleX/color_sensor = turtlesim/Color 15 | 16 | [SubTopics] 17 | turtleX/command_velocity = turtlesim/Velocity 18 | 19 | [PubServices] 20 | clear = std_srvs/Empty 21 | kill = turtlesim/Kill 22 | spawn = turtlesim/Spawn 23 | turtleX/set_pen = turtlesim/SetPen 24 | turtleX/teleport_absolute = turtlesim/TeleportAbsolute 25 | turtleX/teleport_relative = turtlesim/TeleportRelative 26 | 27 | [CallServices] 28 | 29 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/project.mk: -------------------------------------------------------------------------------- 1 | # Project source files. 2 | PROJSRC = ./src/board.c \ 3 | ./src/main.c \ 4 | ./src/usbcfg.c \ 5 | ./src/urosUser.c \ 6 | ./src/urosMsgTypes.c \ 7 | ./src/urosHandlers.c \ 8 | ./src/app.c 9 | 10 | # Project include directories 11 | PROJINC = ./include 12 | -------------------------------------------------------------------------------- /demos/turtlesim-chibios+lwip/src/board.c: -------------------------------------------------------------------------------- 1 | /* 2 | ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, 3 | 2011,2012 Giovanni Di Sirio. 4 | 5 | This file is part of ChibiOS/RT. 6 | 7 | ChibiOS/RT is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | ChibiOS/RT is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | #include "ch.h" 22 | #include "hal.h" 23 | 24 | #if HAL_USE_PAL || defined(__DOXYGEN__) 25 | /** 26 | * @brief PAL setup. 27 | * @details Digital I/O ports static configuration as defined in @p board.h. 28 | * This variable is used by the HAL when initializing the PAL driver. 29 | */ 30 | const PALConfig pal_default_config = 31 | { 32 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, 33 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, 34 | {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, 35 | VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, 36 | {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, 37 | VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, 38 | {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, 39 | VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, 40 | {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, 41 | VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, 42 | {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, 43 | VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, 44 | {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, 45 | VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, 46 | {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, 47 | VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, 48 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, 49 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} 50 | }; 51 | #endif 52 | 53 | /** 54 | * @brief Early initialization code. 55 | * @details This initialization must be performed just after stack setup 56 | * and before any other initialization. 57 | */ 58 | void __early_init(void) { 59 | 60 | stm32_clock_init(); 61 | } 62 | 63 | #if HAL_USE_SDC || defined(__DOXYGEN__) 64 | /** 65 | * @brief SDC card detection. 66 | */ 67 | bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { 68 | 69 | (void)sdcp; 70 | /* TODO: Fill the implementation.*/ 71 | return TRUE; 72 | } 73 | 74 | /** 75 | * @brief SDC card write protection detection. 76 | */ 77 | bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { 78 | 79 | (void)sdcp; 80 | /* TODO: Fill the implementation.*/ 81 | return FALSE; 82 | } 83 | #endif /* HAL_USE_SDC */ 84 | 85 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) 86 | /** 87 | * @brief MMC_SPI card detection. 88 | */ 89 | bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) { 90 | 91 | (void)mmcp; 92 | /* TODO: Fill the implementation.*/ 93 | return TRUE; 94 | } 95 | 96 | /** 97 | * @brief MMC_SPI card write protection detection. 98 | */ 99 | bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) { 100 | 101 | (void)mmcp; 102 | /* TODO: Fill the implementation.*/ 103 | return FALSE; 104 | } 105 | #endif 106 | 107 | /** 108 | * @brief Board-specific initialization code. 109 | * @todo Add your board-specific code, if any. 110 | */ 111 | void boardInit(void) { 112 | } 113 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | AdditionalInfoV2=Details_Size,Details_Date,CustomizedDetails 3 | Timestamp=2012,11,23,20,28,52 4 | Version=2 5 | ViewMode=1 6 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .dep 3 | urosNode.config 4 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | turtlesim-posix 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.ui.externaltools.ExternalToolBuilder 16 | full,incremental, 17 | 18 | 19 | LaunchConfigHandle 20 | <project>/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder.launch 21 | 22 | 23 | 24 | 25 | 26 | org.eclipse.cdt.core.cnature 27 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 28 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 29 | 30 | 31 | 32 | uros 33 | 2 34 | virtual:/virtual 35 | 36 | 37 | uros/include 38 | 2 39 | virtual:/virtual 40 | 41 | 42 | uros/src 43 | 2 44 | virtual:/virtual 45 | 46 | 47 | uros/include/lld 48 | 2 49 | virtual:/virtual 50 | 51 | 52 | uros/include/urosBase.h 53 | 1 54 | PARENT-2-PROJECT_LOC/include/urosBase.h 55 | 56 | 57 | uros/include/urosConn.h 58 | 1 59 | PARENT-2-PROJECT_LOC/include/urosConn.h 60 | 61 | 62 | uros/include/urosNode.h 63 | 1 64 | PARENT-2-PROJECT_LOC/include/urosNode.h 65 | 66 | 67 | uros/include/urosRpcCall.h 68 | 1 69 | PARENT-2-PROJECT_LOC/include/urosRpcCall.h 70 | 71 | 72 | uros/include/urosRpcParser.h 73 | 1 74 | PARENT-2-PROJECT_LOC/include/urosRpcParser.h 75 | 76 | 77 | uros/include/urosRpcSlave.h 78 | 1 79 | PARENT-2-PROJECT_LOC/include/urosRpcSlave.h 80 | 81 | 82 | uros/include/urosRpcStreamer.h 83 | 1 84 | PARENT-2-PROJECT_LOC/include/urosRpcStreamer.h 85 | 86 | 87 | uros/include/urosTcpRos.h 88 | 1 89 | PARENT-2-PROJECT_LOC/include/urosTcpRos.h 90 | 91 | 92 | uros/include/urosThreading.h 93 | 1 94 | PARENT-2-PROJECT_LOC/include/urosThreading.h 95 | 96 | 97 | uros/include/urosUser.h 98 | 1 99 | PARENT-2-PROJECT_LOC/include/urosUser.h 100 | 101 | 102 | uros/src/lld 103 | 2 104 | virtual:/virtual 105 | 106 | 107 | uros/src/urosBase.c 108 | 1 109 | PARENT-2-PROJECT_LOC/src/urosBase.c 110 | 111 | 112 | uros/src/urosConn.c 113 | 1 114 | PARENT-2-PROJECT_LOC/src/urosConn.c 115 | 116 | 117 | uros/src/urosNode.c 118 | 1 119 | PARENT-2-PROJECT_LOC/src/urosNode.c 120 | 121 | 122 | uros/src/urosRpcCall.c 123 | 1 124 | PARENT-2-PROJECT_LOC/src/urosRpcCall.c 125 | 126 | 127 | uros/src/urosRpcParser.c 128 | 1 129 | PARENT-2-PROJECT_LOC/src/urosRpcParser.c 130 | 131 | 132 | uros/src/urosRpcSlave.c 133 | 1 134 | PARENT-2-PROJECT_LOC/src/urosRpcSlave.c 135 | 136 | 137 | uros/src/urosRpcStreamer.c 138 | 1 139 | PARENT-2-PROJECT_LOC/src/urosRpcStreamer.c 140 | 141 | 142 | uros/src/urosTcpRos.c 143 | 1 144 | PARENT-2-PROJECT_LOC/src/urosTcpRos.c 145 | 146 | 147 | uros/src/urosThreading.c 148 | 1 149 | PARENT-2-PROJECT_LOC/src/urosThreading.c 150 | 151 | 152 | uros/include/lld/uros_lld_base.h 153 | 1 154 | PARENT-1-ECLIPSE_HOME/chibios/ext/uros/include/lld/uros_lld_base.h 155 | 156 | 157 | uros/include/lld/uros_lld_conn.h 158 | 1 159 | PARENT-1-ECLIPSE_HOME/chibios/ext/uros/include/lld/uros_lld_conn.h 160 | 161 | 162 | uros/include/lld/uros_lld_threading.h 163 | 1 164 | PARENT-1-ECLIPSE_HOME/chibios/ext/uros/include/lld/uros_lld_threading.h 165 | 166 | 167 | uros/src/lld/posix 168 | 2 169 | virtual:/virtual 170 | 171 | 172 | uros/src/lld/posix/uros_lld_base.c 173 | 1 174 | PARENT-2-PROJECT_LOC/src/lld/posix/uros_lld_base.c 175 | 176 | 177 | uros/src/lld/posix/uros_lld_conn.c 178 | 1 179 | PARENT-2-PROJECT_LOC/src/lld/posix/uros_lld_conn.c 180 | 181 | 182 | uros/src/lld/posix/uros_lld_threading.c 183 | 1 184 | PARENT-2-PROJECT_LOC/src/lld/posix/uros_lld_threading.c 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/.settings/org.eclipse.cdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_settings_version=1 3 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/include/.directory: -------------------------------------------------------------------------------- 1 | [Dolphin] 2 | Timestamp=2012,11,22,0,15,23 3 | Version=2 4 | 5 | [Settings] 6 | ShowDotFiles=true 7 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/include/urosHandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosHandlers.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief TCPROS topic and service handlers. 36 | */ 37 | 38 | #ifndef _UROSHANDLERS_H_ 39 | #define _UROSHANDLERS_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosMsgTypes.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | /*===========================================================================*/ 52 | /* PUBLISHED TOPIC PROTOTYPES */ 53 | /*===========================================================================*/ 54 | 55 | /*~~~ PUBLISHED TOPIC: /rosout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 56 | 57 | uros_err_t pub_tpc__rosout(UrosTcpRosStatus *tcpstp); 58 | 59 | /*~~~ PUBLISHED TOPIC: /turtleX/color_sensor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 60 | 61 | uros_err_t pub_tpc__turtleX__color_sensor(UrosTcpRosStatus *tcpstp); 62 | 63 | /*~~~ PUBLISHED TOPIC: /turtleX/pose ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 64 | 65 | uros_err_t pub_tpc__turtleX__pose(UrosTcpRosStatus *tcpstp); 66 | 67 | /*===========================================================================*/ 68 | /* SUBSCRIBED TOPIC PROTOTYPES */ 69 | /*===========================================================================*/ 70 | 71 | /*~~~ SUBSCRIBED TOPIC: /turtleX/command_velocity ~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 72 | 73 | uros_err_t sub_tpc__turtleX__command_velocity(UrosTcpRosStatus *tcpstp); 74 | 75 | /*===========================================================================*/ 76 | /* PUBLISHED SERVICE PROTOTYPES */ 77 | /*===========================================================================*/ 78 | 79 | /*~~~ PUBLISHED SERVICE: /clear ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 80 | 81 | uros_err_t pub_srv__clear(UrosTcpRosStatus *tcpstp); 82 | 83 | /*~~~ PUBLISHED SERVICE: /kill ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 84 | 85 | uros_err_t pub_srv__kill(UrosTcpRosStatus *tcpstp); 86 | 87 | /*~~~ PUBLISHED SERVICE: /spawn ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 88 | 89 | uros_err_t pub_srv__spawn(UrosTcpRosStatus *tcpstp); 90 | 91 | /*~~~ PUBLISHED SERVICE: /turtleX/set_pen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 92 | 93 | uros_err_t pub_srv__turtleX__set_pen(UrosTcpRosStatus *tcpstp); 94 | 95 | /*~~~ PUBLISHED SERVICE: /turtleX/teleport_absolute ~~~~~~~~~~~~~~~~~~~~~~~~~*/ 96 | 97 | uros_err_t pub_srv__turtleX__teleport_absolute(UrosTcpRosStatus *tcpstp); 98 | 99 | /*~~~ PUBLISHED SERVICE: /turtleX/teleport_relative ~~~~~~~~~~~~~~~~~~~~~~~~~*/ 100 | 101 | uros_err_t pub_srv__turtleX__teleport_relative(UrosTcpRosStatus *tcpstp); 102 | 103 | /*===========================================================================*/ 104 | /* CALLED SERVICE PROTOTYPES */ 105 | /*===========================================================================*/ 106 | 107 | /* There are no called services.*/ 108 | 109 | /*===========================================================================*/ 110 | /* GLOBAL PROTOTYPES */ 111 | /*===========================================================================*/ 112 | 113 | void urosHandlersPublishTopics(void); 114 | void urosHandlersUnpublishTopics(void); 115 | 116 | void urosHandlersSubscribeTopics(void); 117 | void urosHandlersUnsubscribeTopics(void); 118 | 119 | void urosHandlersPublishServices(void); 120 | void urosHandlersUnpublishServices(void); 121 | 122 | #ifdef __cplusplus 123 | } /* extern "C" */ 124 | #endif 125 | 126 | #endif /* _UROSHANDLERS_H_ */ 127 | 128 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/misc/turtlesim-posix.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/misc/urosgen.cfg: -------------------------------------------------------------------------------- 1 | # urosgen.py configuration file for turtlesim 2 | 3 | [Options] 4 | author = Andrea Zoppi 5 | licenseFile = ../../../COPYING 6 | includeDir = ../include 7 | sourceDir = ../src 8 | nodeName = turtlesim 9 | fieldComments = false 10 | 11 | [PubTopics] 12 | rosout = rosgraph_msgs/Log 13 | turtleX/pose = turtlesim/Pose 14 | turtleX/color_sensor = turtlesim/Color 15 | 16 | [SubTopics] 17 | turtleX/command_velocity = turtlesim/Velocity 18 | 19 | [PubServices] 20 | clear = std_srvs/Empty 21 | kill = turtlesim/Kill 22 | spawn = turtlesim/Spawn 23 | turtleX/set_pen = turtlesim/SetPen 24 | turtleX/teleport_absolute = turtlesim/TeleportAbsolute 25 | turtleX/teleport_relative = turtlesim/TeleportRelative 26 | 27 | [CallServices] 28 | 29 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/misc/urosstan.cfg: -------------------------------------------------------------------------------- 1 | # urosstan.py demo configuration file for turtlesim 2 | 3 | # List of options for urosstan.py 4 | [Options] 5 | 6 | # Output directory (must exist!), relative to this configuration file 7 | outDir = ../build/obj 8 | 9 | # Reference Makefile location, relative to this configuration file 10 | makefileDir = .. 11 | 12 | # Known graph leafs (terminators), in the form: = 13 | # where is unmangled (see GKD/SU) and globally defined 14 | [Terminators] 15 | 16 | 17 | # List of starting functions, in the form: = 18 | [EntryPoints] 19 | main = 0 20 | urosThreadPoolWorkerThread = 0 21 | urosNodeThread = 0 22 | urosRpcSlaveServerThread = 0 23 | urosRpcSlaveListenerThread = 0 24 | urosTcpRosListenerThread = 0 25 | 26 | pub_tpc__rosout = 0 27 | pub_tpc__turtleX__pose = 0 28 | pub_tpc__turtleX__color_sensor = 0 29 | 30 | sub_tpc__turtleX__command_velocity = 0 31 | 32 | pub_srv__clear = 0 33 | pub_srv__kill = 0 34 | pub_srv__spawn = 0 35 | pub_srv__turtleX__set_pen = 0 36 | pub_srv__turtleX__teleport_absolute = 0 37 | pub_srv__turtleX__teleport_relative = 0 38 | 39 | urosRpcParserMethodResponse = 0 40 | 41 | # List of source units to be analyzed, in the form: 42 | # <*.c[pp]> = <*.gkd> | <*.su> | <*.nm> 43 | # where paths are relative to the Makefile 44 | [SourceUnits] 45 | "../../src/urosBase.c" = "./build/obj/urosBase.o.gkd" | "./build/obj/urosBase.su" | "./build/obj/urosBase.o.nm" 46 | "../../src/urosConn.c" = "./build/obj/urosConn.o.gkd" | "./build/obj/urosConn.su" | "./build/obj/urosConn.o.nm" 47 | "../../src/urosNode.c" = "./build/obj/urosNode.o.gkd" | "./build/obj/urosNode.su" | "./build/obj/urosNode.o.nm" 48 | "../../src/urosRpcCall.c" = "./build/obj/urosRpcCall.o.gkd" | "./build/obj/urosRpcCall.su" | "./build/obj/urosRpcCall.o.nm" 49 | "../../src/urosRpcParser.c" = "./build/obj/urosRpcParser.o.gkd" | "./build/obj/urosRpcParser.su" | "./build/obj/urosRpcParser.o.nm" 50 | "../../src/urosRpcSlave.c" = "./build/obj/urosRpcSlave.o.gkd" | "./build/obj/urosRpcSlave.su" | "./build/obj/urosRpcSlave.o.nm" 51 | "../../src/urosRpcStreamer.c" = "./build/obj/urosRpcStreamer.o.gkd" | "./build/obj/urosRpcStreamer.su" | "./build/obj/urosRpcStreamer.o.nm" 52 | "../../src/urosTcpRos.c" = "./build/obj/urosTcpRos.o.gkd" | "./build/obj/urosTcpRos.su" | "./build/obj/urosTcpRos.o.nm" 53 | "../../src/urosThreading.c" = "./build/obj/urosThreading.o.gkd" | "./build/obj/urosThreading.su" | "./build/obj/urosThreading.o.nm" 54 | "../../src/lld/chibios/uros_lld_base.c" = "./build/obj/uros_lld_base.o.gkd" | "./build/obj/uros_lld_base.su" | "./build/obj/uros_lld_base.o.nm" 55 | "../../src/lld/chibios/uros_lld_threading.c" = "./build/obj/uros_lld_threading.o.gkd" | "./build/obj/uros_lld_threading.su" | "./build/obj/uros_lld_threading.o.nm" 56 | "../../src/lld/lwip/uros_lld_conn.c" = "./build/obj/uros_lld_conn.o.gkd" | "./build/obj/uros_lld_conn.su" | "./build/obj/uros_lld_conn.o.nm" 57 | "./src/main.c" = "./build/obj/main.o.gkd" | "./build/obj/main.su" | "./build/obj/main.o.nm" 58 | "./src/urosUser.c" = "./build/obj/urosUser.o.gkd" | "./build/obj/urosUser.su" | "./build/obj/urosUser.o.nm" 59 | "./src/urosMsgTypes.c" = "./build/obj/urosMsgTypes.o.gkd" | "./build/obj/urosMsgTypes.su" | "./build/obj/urosMsgTypes.o.nm" 60 | "./src/urosHandlers.c" = "./build/obj/urosHandlers.o.gkd" | "./build/obj/urosHandlers.su" | "./build/obj/urosHandlers.o.nm" 61 | "./src/app.c" = "./build/obj/app.o.gkd" | "./build/obj/app.su" | "./build/obj/app.o.nm" 62 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/project.mk: -------------------------------------------------------------------------------- 1 | # Project source files. 2 | PROJSRC = ./src/main.c \ 3 | ./src/urosMsgTypes.c \ 4 | ./src/urosHandlers.c \ 5 | ./src/urosUser.c \ 6 | ./src/app.c 7 | 8 | # Project include directories 9 | PROJINC = ./include 10 | -------------------------------------------------------------------------------- /demos/turtlesim-posix/src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /*===========================================================================*/ 32 | /* HEADER FILES */ 33 | /*===========================================================================*/ 34 | 35 | #include 36 | 37 | #include 38 | #include "app.h" 39 | 40 | /*===========================================================================*/ 41 | /* GLOBAL FUNCTIONS */ 42 | /*===========================================================================*/ 43 | 44 | int main (int argc, char *argv[]) { 45 | 46 | (void)argc; 47 | (void)argv; 48 | 49 | printf("=> uROS Node Test <=\n"); 50 | 51 | /* Initialize the application.*/ 52 | app_initialize(); 53 | 54 | /* Wait until the node has shut down.*/ 55 | urosThreadJoin(urosNode.status.nodeThreadId); 56 | 57 | printf("\n(Node has shut down successfully)\n"); 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | -------------------------------------------------------------------------------- /doc/Documentation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Redirecting... 4 | 5 | 6 | 7 |

Redirecting...

8 |
9 | Click here to go to the documentation page, 10 | if it is not automatically redirected. 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /doc/doxygen/dox/base.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup base Base 33 | * @details Base features of the middleware. 34 | */ 35 | 36 | /** 37 | * @defgroup base_config Configuration 38 | * @ingroup base 39 | */ 40 | 41 | /** 42 | * @defgroup base_types Data types 43 | * @ingroup base 44 | */ 45 | 46 | /** 47 | * @defgroup base_macros Macros 48 | * @ingroup base 49 | */ 50 | 51 | /** 52 | * @defgroup base_funcs Functions 53 | * @ingroup base 54 | */ 55 | 56 | /** 57 | * @defgroup base_lld_funcs Low-level functions 58 | * @ingroup base 59 | */ 60 | 61 | -------------------------------------------------------------------------------- /doc/doxygen/dox/conn.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup conn Connectivity 33 | * @details Connectivity features of the middleware. 34 | */ 35 | 36 | /** 37 | * @defgroup conn_config Configuration 38 | * @ingroup conn 39 | */ 40 | 41 | /** 42 | * @defgroup conn_types Data types 43 | * @ingroup conn 44 | */ 45 | 46 | /** 47 | * @defgroup conn_macros Macros 48 | * @ingroup conn 49 | */ 50 | 51 | /** 52 | * @defgroup conn_funcs Functions 53 | * @ingroup conn 54 | */ 55 | 56 | /** 57 | * @defgroup conn_lld_funcs Low-level functions 58 | * @ingroup conn 59 | */ 60 | 61 | -------------------------------------------------------------------------------- /doc/doxygen/dox/main.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** @mainpage Front page 32 | 33 | This is the documentation of the μROSnode middleware. This is an 34 | alpha release. This documentation may not be synchronized with the actual code. 35 | It is only a brief overview of the features being developed. 36 | 37 | 38 | @section sec_main_license Disclaimer 39 | 40 | Copyright © 2012-2013, Politecnico di Milano. 41 | All rights reserved. 42 | 43 | Andrea Zoppi <texzk@email.it>
44 | Martino Migliavacca <martino.migliavacca@gmail.com> 45 | 46 | http://airlab.elet.polimi.it/
47 | http://www.openrobots.com/ 48 | 49 | Redistribution and use in source and binary forms, with or without 50 | modification, are permitted provided that the following conditions are met: 51 | -# Redistributions of source code must retain the above copyright notice, this 52 | list of conditions and the following disclaimer. 53 | -# Redistributions in binary form must reproduce the above copyright notice, 54 | this list of conditions and the following disclaimer in the documentation 55 | and/or other materials provided with the distribution. 56 | 57 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 58 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 59 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 60 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 61 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 62 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 63 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 64 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 65 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 66 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 67 | 68 | */ 69 | 70 | -------------------------------------------------------------------------------- /doc/doxygen/dox/node.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup node Node 33 | * @details Node features of the middleware. 34 | */ 35 | 36 | /** 37 | * @defgroup node_config Configuration 38 | * @ingroup node 39 | */ 40 | 41 | /** 42 | * @defgroup node_types Data types 43 | * @ingroup node 44 | */ 45 | 46 | /** 47 | * @defgroup node_macros Macros 48 | * @ingroup node 49 | */ 50 | 51 | /** 52 | * @defgroup node_funcs Functions 53 | * @ingroup node 54 | */ 55 | 56 | /** 57 | * @defgroup node_lld_funcs Low-level functions 58 | * @ingroup node 59 | */ 60 | 61 | -------------------------------------------------------------------------------- /doc/doxygen/dox/tcpros.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup tcpros TCPROS 33 | * @details TCPROS features of the middleware. 34 | */ 35 | 36 | /** 37 | * @defgroup tcpros_config Configuration 38 | * @ingroup tcpros 39 | */ 40 | 41 | /** 42 | * @defgroup tcpros_types Data types 43 | * @ingroup tcpros 44 | */ 45 | 46 | /** 47 | * @defgroup tcpros_macros Macros 48 | * @ingroup tcpros 49 | */ 50 | 51 | /** 52 | * @defgroup tcpros_funcs Functions 53 | * @ingroup tcpros 54 | */ 55 | 56 | /** 57 | * @defgroup tcpros_lld_funcs Low-level functions 58 | * @ingroup tcpros 59 | */ 60 | 61 | -------------------------------------------------------------------------------- /doc/doxygen/dox/threading.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup threading Threading 33 | * @details Threading features of the middleware. 34 | */ 35 | 36 | /** 37 | * @defgroup threading_config Configuration 38 | * @ingroup threading 39 | */ 40 | 41 | /** 42 | * @defgroup threading_types Data types 43 | * @ingroup threading 44 | */ 45 | 46 | /** 47 | * @defgroup threading_macros Macros 48 | * @ingroup threading 49 | */ 50 | 51 | /** 52 | * @defgroup threading_funcs Functions 53 | * @ingroup threading 54 | */ 55 | 56 | /** 57 | * @defgroup threading_lld_funcs Low-level functions 58 | * @ingroup threading 59 | */ 60 | 61 | -------------------------------------------------------------------------------- /doc/doxygen/dox/user.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup user User 33 | * @details User callback functions. 34 | */ 35 | 36 | /** 37 | * @defgroup user_funcs Functions 38 | * @ingroup user 39 | */ 40 | 41 | -------------------------------------------------------------------------------- /doc/doxygen/dox/xmlrpc.dox: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @defgroup rpc XMLRPC 33 | * @details XMLRPC features of the middleware. 34 | */ 35 | 36 | /** 37 | * @defgroup rpc_config Configuration 38 | * @ingroup rpc 39 | */ 40 | 41 | /** 42 | * @defgroup rpc_types Data types 43 | * @ingroup rpc 44 | */ 45 | 46 | /** 47 | * @defgroup rpc_macros Macros 48 | * @ingroup rpc 49 | */ 50 | 51 | /** 52 | * @defgroup rpc_funcs XMLRPC functions 53 | * @ingroup rpc 54 | */ 55 | 56 | /** 57 | * @defgroup rpc_call_funcs Call functions 58 | * @ingroup rpc 59 | * @see http://www.ros.org/wiki/ROS/Master_Slave_APIs 60 | * @see http://www.ros.org/wiki/ROS/Master_API 61 | * @see http://www.ros.org/wiki/ROS/Slave_API 62 | * @see http://www.ros.org/wiki/ROS/Parameter%20Server%20API 63 | */ 64 | 65 | /** 66 | * @defgroup rpc_slave_funcs Slave API functions 67 | * @ingroup rpc 68 | */ 69 | 70 | /** 71 | * @defgroup rpc_parser_funcs Parser methods 72 | * @ingroup rpc 73 | */ 74 | 75 | /** 76 | * @defgroup rpc_streamer_funcs Streamer methods 77 | * @ingroup rpc 78 | */ 79 | 80 | -------------------------------------------------------------------------------- /doc/doxygen/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /doc/doxygen/header.html: -------------------------------------------------------------------------------- 1 | 2 | 31 | 32 | 33 | 34 | 35 | 36 | μROSnode 37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 |
50 |
51 | 52 | 53 | 54 | 55 | 59 | 60 | 61 |
56 |
$projectnumber
57 |
$projectbrief
58 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /doc/doxygen/img/gen_flow.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrobots-dev/uROSnode/83c75d16441519fde349846d3f092f7e4fbd4b85/doc/doxygen/img/gen_flow.dia -------------------------------------------------------------------------------- /doc/doxygen/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrobots-dev/uROSnode/83c75d16441519fde349846d3f092f7e4fbd4b85/doc/doxygen/img/logo.png -------------------------------------------------------------------------------- /doc/doxygen/img/stan_flow.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrobots-dev/uROSnode/83c75d16441519fde349846d3f092f7e4fbd4b85/doc/doxygen/img/stan_flow.dia -------------------------------------------------------------------------------- /include/lld/uros_lld_base.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file uros_lld_base.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Low-level basic features of the middleware. 36 | */ 37 | 38 | #ifndef _UROS_LLD_BASE_H_ 39 | #define _UROS_LLD_BASE_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "../urosBase.h" 46 | 47 | /*===========================================================================*/ 48 | /* GLOBAL PROTOTYPES */ 49 | /*===========================================================================*/ 50 | 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | void uros_lld_init(void); 56 | void *uros_lld_alloc(UrosMemHeap *heapp, size_t size); 57 | void uros_lld_free(void *chunkp); 58 | 59 | #if UROS_USE_BUILTIN_MEMPOOL == UROS_FALSE 60 | void uros_lld_mempool_objectinit(UrosMemPool *poolp, size_t blocksize, 61 | uros_alloc_f provider); 62 | void *uros_lld_mempool_alloc(UrosMemPool *poolp); 63 | void uros_lld_mempool_free(UrosMemPool *poolp, void *objp); 64 | uros_cnt_t uros_lld_mempool_numfree(UrosMemPool *poolp); 65 | void uros_lld_mempool_loadarray(UrosMemPool *poolp, 66 | void *objp, uros_cnt_t n); 67 | size_t uros_lld_mempool_blocksize(UrosMemPool *poolp); 68 | #endif /* UROS_USE_BUILTIN_MEMPOOL == UROS_FALSE */ 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | #endif /* _UROS_LLD_BASE_H_ */ 74 | -------------------------------------------------------------------------------- /include/lld/uros_lld_conn.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file uros_lld_conn.c 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Low-level connectivity features of the middleware. 36 | */ 37 | 38 | #ifndef _UROS_LLD_CONN_H_ 39 | #define _UROS_LLD_CONN_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "../urosConn.h" 46 | 47 | /*===========================================================================*/ 48 | /* GLOBAL PROTOTYPES */ 49 | /*===========================================================================*/ 50 | 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | uros_err_t uros_lld_hostnametoip(const UrosString *hostnamep, 56 | UrosIp *ipp); 57 | void uros_lld_conn_objectinit(UrosConn *cp); 58 | uros_bool_t uros_lld_conn_isvalid(UrosConn *cp); 59 | uros_err_t uros_lld_conn_create(UrosConn *cp, uros_connproto_t protocol); 60 | uros_err_t uros_lld_conn_bind(UrosConn *cp, const UrosAddr *locaddrp); 61 | uros_err_t uros_lld_conn_accept(UrosConn *cp, UrosConn *spawnedp); 62 | uros_err_t uros_lld_conn_listen(UrosConn *cp, uros_cnt_t backlog); 63 | uros_err_t uros_lld_conn_connect(UrosConn *cp, const UrosAddr *remaddrp); 64 | uros_err_t uros_lld_conn_recv(UrosConn *cp, 65 | void **bufpp, size_t *buflenp); 66 | uros_err_t uros_lld_conn_recvfrom(UrosConn *cp, 67 | void **bufpp, size_t *buflenp, 68 | const UrosAddr *remaddrp); 69 | uros_err_t uros_lld_conn_send(UrosConn *cp, 70 | const void *bufp, size_t buflen); 71 | uros_err_t uros_lld_conn_sendconst(UrosConn *cp, 72 | const void *bufp, size_t buflen); 73 | uros_err_t uros_lld_conn_sendto(UrosConn *cp, 74 | const void *bufp, size_t buflen, 75 | const UrosAddr *remaddrp); 76 | uros_err_t uros_lld_conn_sendtoconst(UrosConn *cp, 77 | const void *bufp, size_t buflen, 78 | const UrosAddr *remaddrp); 79 | uros_err_t uros_lld_conn_shutdown(UrosConn *cp, 80 | uros_bool_t read, uros_bool_t write); 81 | uros_err_t uros_lld_conn_close(UrosConn *cp); 82 | 83 | uros_err_t uros_lld_conn_gettcpnodelay(UrosConn *cp, uros_bool_t *enablep); 84 | uros_err_t uros_lld_conn_settcpnodelay(UrosConn *cp, uros_bool_t enable); 85 | uros_err_t uros_lld_conn_getrecvtimeout(UrosConn *cp, uint32_t *msp); 86 | uros_err_t uros_lld_conn_setrecvtimeout(UrosConn *cp, uint32_t ms); 87 | uros_err_t uros_lld_conn_getsendtimeout(UrosConn *cp, uint32_t *msp); 88 | uros_err_t uros_lld_conn_setsendtimeout(UrosConn *cp, uint32_t ms); 89 | 90 | const char *uros_lld_conn_lasterrortext(const UrosConn *cp); 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | #endif /* _UROS_LLD_CONN_H_ */ 96 | -------------------------------------------------------------------------------- /include/lld/uros_lld_threading.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file uros_lld_threading.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Low-level threading features of the middleware. 36 | */ 37 | 38 | #ifndef _UROS_LLD_THREADING_H_ 39 | #define _UROS_LLD_THREADING_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "../urosThreading.h" 46 | 47 | /*===========================================================================*/ 48 | /* GLOBAL PROTOTYPES */ 49 | /*===========================================================================*/ 50 | 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | void uros_lld_sem_objectinit(UrosSem *semp, uros_cnt_t n); 56 | void uros_lld_sem_clean(UrosSem *semp); 57 | void uros_lld_sem_wait(UrosSem *semp); 58 | void uros_lld_sem_signal(UrosSem *semp); 59 | uros_cnt_t uros_lld_sem_value(UrosSem *semp); 60 | 61 | void uros_lld_mutex_objectinit(UrosMutex *mtxp); 62 | void uros_lld_mutex_clean(UrosMutex *mtxp); 63 | void uros_lld_mutex_lock(UrosMutex *mtxp); 64 | void uros_lld_mutex_unlock(UrosMutex *mtxp); 65 | 66 | void uros_lld_condvar_objectinit(UrosCondVar *cvp); 67 | void uros_lld_condvar_clean(UrosCondVar *cvp); 68 | void uros_lld_condvar_wait(UrosCondVar *cvp, UrosMutex *mtxp); 69 | void uros_lld_condvar_signal(UrosCondVar *cvp); 70 | void uros_lld_condvar_broadcast(UrosCondVar *cvp); 71 | 72 | UrosThreadId uros_lld_thread_self(void); 73 | const char *uros_lld_thread_getname(UrosThreadId id); 74 | uros_err_t uros_lld_thread_createstatic(UrosThreadId *idp, const char *namep, 75 | uros_prio_t priority, 76 | uros_proc_f routine, void *argp, 77 | void *stackp, size_t stacksize); 78 | uros_err_t uros_lld_thread_createfrommempool(UrosThreadId *idp, const char *namep, 79 | uros_prio_t priority, 80 | uros_proc_f routine, void *argp, 81 | UrosMemPool *mempoolp); 82 | uros_err_t uros_lld_thread_createfromheap(UrosThreadId *idp, const char *namep, 83 | uros_prio_t priority, 84 | uros_proc_f routine, void *argp, 85 | size_t stacksize); 86 | uros_err_t uros_lld_thread_join(UrosThreadId id); 87 | void uros_lld_thread_sleepsec(uint32_t sec); 88 | void uros_lld_thread_sleepmsec(uint32_t msec); 89 | void uros_lld_thread_sleepusec(uint32_t usec); 90 | 91 | uint32_t uros_lld_threading_gettimestampmsec(void); 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | #endif /* _UROS_LLD_THREADING_H_ */ 97 | -------------------------------------------------------------------------------- /include/urosRpcSlave.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosRpcSlave.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief XMLRPC Slave API functions. 36 | */ 37 | 38 | #ifndef _UROSSLAVE_H_ 39 | #define _UROSSLAVE_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosBase.h" 46 | #include "urosRpcCall.h" 47 | #include "urosTcpRos.h" 48 | 49 | /*===========================================================================*/ 50 | /* TYPES & MACROS */ 51 | /*===========================================================================*/ 52 | 53 | /** @addtogroup rpc_types */ 54 | /** @{ */ 55 | 56 | /** 57 | * @brief XMLRPC Slave API methods. 58 | */ 59 | typedef enum uros_rpcslave_methodid_t { 60 | 61 | UROS_RPCSM_GET_BUS_INFO, /**< @brief @p getBusInfo() command.*/ 62 | UROS_RPCSM_GET_BUS_STATS, /**< @brief @p getBusStatus() command.*/ 63 | UROS_RPCSM_GET_MASTER_URI, /**< @brief @p getMasterUri() command.*/ 64 | UROS_RPCSM_GET_PID, /**< @brief @p getPid() command.*/ 65 | UROS_RPCSM_GET_PUBLICATIONS, /**< @brief @p getPublications() command.*/ 66 | UROS_RPCSM_GET_SUBSCRIPTIONS, /**< @brief @p getSubscriptions() command.*/ 67 | UROS_RPCSM_PARAM_UPDATE, /**< @brief @p paramUpdate() command.*/ 68 | UROS_RPCSM_PUBLISHER_UPDATE, /**< @brief @p publisherUpdate() command.*/ 69 | UROS_RPCSM_REQUEST_TOPIC, /**< @brief @p requestTopic() command.*/ 70 | UROS_RPCSM_SHUTDOWN, /**< @brief @p shutdown() command.*/ 71 | 72 | UROS_RPCSM__LENGTH 73 | } uros_rpcslave_methodid_t; 74 | 75 | /** @} */ 76 | 77 | /*===========================================================================*/ 78 | /* GLOBAL PROTOTYPES */ 79 | /*===========================================================================*/ 80 | 81 | #ifdef __cplusplus 82 | extern "C" { 83 | #endif 84 | 85 | uros_err_t urosRpcSlaveConnectToPublishers(const UrosString *topicp, 86 | const UrosList *addrlstp); 87 | uros_err_t urosRpcSlaveListenerThread(void *data); 88 | uros_err_t urosRpcSlaveServerThread(UrosConn *csp); 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | #endif /* _UROSSLAVE_H_ */ 94 | -------------------------------------------------------------------------------- /include/urosThreading.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosThreading.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Threading features of the middleware. 36 | */ 37 | 38 | #ifndef _UROSTHREADING_H_ 39 | #define _UROSTHREADING_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosBase.h" 46 | 47 | /*===========================================================================*/ 48 | /* TYPES & MACROS */ 49 | /*===========================================================================*/ 50 | 51 | /** @addtogroup threading_types */ 52 | /** @{ */ 53 | 54 | /** 55 | * @brief Thread pool object. 56 | */ 57 | typedef struct UrosThreadPool { 58 | UrosMemPool *stackPoolp; /**< @brief Memory pool for thread stacks.*/ 59 | uros_cnt_t size; /**< @brief Thread pool size.*/ 60 | uros_proc_f routine; /**< @brief User routine for children.*/ 61 | const char *namep; /**< @brief Default thread name.*/ 62 | uros_prio_t priority; /**< @brief Default thread priority.*/ 63 | UrosThreadId *threadsp; /**< @brief Thread identifier array.*/ 64 | void *argp; /**< @brief Next thread argument pointer.*/ 65 | uros_cnt_t readyCnt; /**< @brief Ready threads counter.*/ 66 | UrosMutex readyMtx; /**< @brief Ready threads mutex.*/ 67 | UrosCondVar readyCond; /**< @brief Ready threads condvar.*/ 68 | uros_cnt_t busyCnt; /**< @brief Busy threads counter.*/ 69 | UrosMutex busyMtx; /**< @brief Busy threads mutex.*/ 70 | UrosCondVar busyCond; /**< @brief Busy threads condvar.*/ 71 | uros_bool_t exitFlag; /**< @brief Exit request flag, broadcast.*/ 72 | } UrosThreadPool; 73 | 74 | /** @} */ 75 | 76 | /*===========================================================================*/ 77 | /* GLOBAL PROTOTYPES */ 78 | /*===========================================================================*/ 79 | 80 | #ifdef __cplusplus 81 | extern "C" { 82 | #endif 83 | 84 | void urosSemObjectInit(UrosSem *semp, uros_cnt_t n); 85 | void urosSemClean(UrosSem *semp); 86 | void urosSemWait(UrosSem *semp); 87 | void urosSemSignal(UrosSem *semp); 88 | 89 | void urosMutexObjectInit(UrosMutex *mtxp); 90 | void urosMutexClean(UrosMutex *mtxp); 91 | void urosMutexLock(UrosMutex *mtxp); 92 | void urosMutexUnlock(UrosMutex *mtxp); 93 | 94 | void urosCondVarObjectInit(UrosCondVar *cvp); 95 | void urosCondVarClean(UrosCondVar *cvp); 96 | void urosCondVarWait(UrosCondVar *cvp, UrosMutex *mtxp); 97 | void urosCondVarSignal(UrosCondVar *cvp); 98 | void urosCondVarBroadcast(UrosCondVar *cvp); 99 | 100 | uros_err_t urosThreadPoolObjectInit(UrosThreadPool *poolp, 101 | UrosMemPool *stackpoolp, 102 | uros_proc_f routine, 103 | const char *namep, 104 | uros_prio_t priority); 105 | void urosThreadPoolClean(UrosThreadPool *poolp); 106 | uros_err_t urosThreadPoolCreateAll(UrosThreadPool *poolp); 107 | uros_err_t urosThreadPoolJoinAll(UrosThreadPool *poolp); 108 | uros_err_t urosThreadPoolStartWorker(UrosThreadPool *poolp, void *argp); 109 | uros_err_t urosThreadPoolWorkerThread(UrosThreadPool *poolp); 110 | 111 | UrosThreadId urosThreadSelf(void); 112 | const char *urosThreadGetName(UrosThreadId id); 113 | uros_err_t urosThreadCreateStatic(UrosThreadId *idp, const char *namep, 114 | uros_prio_t priority, 115 | uros_proc_f routine, void *argp, 116 | void *stackp, size_t stacksize); 117 | uros_err_t urosThreadCreateFromMemPool(UrosThreadId *threadp, const char *namep, 118 | uros_prio_t priority, 119 | uros_proc_f routine, void *argp, 120 | UrosMemPool *mempoolp); 121 | uros_err_t urosThreadCreateFromHeap(UrosThreadId *idp, const char *namep, 122 | uros_prio_t priority, 123 | uros_proc_f routine, void *argp, 124 | size_t stacksize); 125 | uros_err_t urosThreadJoin(UrosThreadId id); 126 | void urosThreadSleepSec(uint32_t sec); 127 | void urosThreadSleepMsec(uint32_t msec); 128 | void urosThreadSleepUsec(uint32_t usec); 129 | 130 | uint32_t urosGetTimestampMsec(void); 131 | 132 | #ifdef __cplusplus 133 | } 134 | #endif 135 | #endif /* _UROSTHREADING_H_ */ 136 | -------------------------------------------------------------------------------- /include/urosUser.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosUser.h 33 | * @author Andrea Zoppi 34 | * 35 | * @brief User-defined callback functions. 36 | */ 37 | 38 | #ifndef _UROSUSER_H_ 39 | #define _UROSUSER_H_ 40 | 41 | /*===========================================================================*/ 42 | /* HEADER FILES */ 43 | /*===========================================================================*/ 44 | 45 | #include "urosBase.h" 46 | #include "urosNode.h" 47 | #include "urosRpcCall.h" 48 | 49 | /*===========================================================================*/ 50 | /* GLOBAL PROTOTYPES */ 51 | /*===========================================================================*/ 52 | 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | void urosUserNodeConfigLoad(UrosNodeConfig *cfgp); 58 | void urosUserNodeConfigSave(const UrosNodeConfig *cfgp); 59 | 60 | uros_err_t urosUserShutdown(const UrosString *msgp); 61 | 62 | void urosUserRegisterStaticTypes(void); 63 | 64 | uros_err_t urosUserPublishTopics(void); 65 | uros_err_t urosUserUnpublishTopics(void); 66 | 67 | uros_err_t urosUserSubscribeTopics(void); 68 | uros_err_t urosUserUnsubscribeTopics(void); 69 | 70 | uros_err_t urosUserPublishServices(void); 71 | uros_err_t urosUserUnpublishServices(void); 72 | 73 | uros_err_t urosUserSubscribeParams(void); 74 | uros_err_t urosUserUnsubscribeParams(void); 75 | uros_err_t urosUserParamUpdate(const UrosString *keyp, 76 | const UrosRpcParam *paramp); 77 | 78 | #ifdef __cplusplus 79 | } 80 | #endif 81 | #endif /* _UROSUSER_H_ */ 82 | -------------------------------------------------------------------------------- /misc/eclipse_syntax_coloring.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrobots-dev/uROSnode/83c75d16441519fde349846d3f092f7e4fbd4b85/misc/eclipse_syntax_coloring.tar.gz -------------------------------------------------------------------------------- /misc/gensrclist.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | 5 | line = "" 6 | with open('sources.lst', 'r') as f: 7 | lines = f.readlines() 8 | 9 | standir = './build/obj' 10 | for line in lines: 11 | line = line.strip() 12 | filename = (line.split('/')[-1]).rpartition('.')[0] 13 | gkd = '%s/%s.o.gkd' % (standir, filename) 14 | su = '%s/%s.su' % (standir, filename) 15 | nm = '%s/%s.o.nm' % (standir, filename) 16 | entry = '"%s" = "%s" | "%s" | "%s"' % (line, gkd, su, nm) 17 | print entry 18 | -------------------------------------------------------------------------------- /mk/chibios.mk: -------------------------------------------------------------------------------- 1 | # Makefile include for uROSnode 2 | 3 | ifeq ($(UROS),) 4 | # Set the default uROSnode root directory to "/ext/uros" 5 | UROS = $(CHIBIOS)/ext/uros 6 | $(info folder automatically set to: $(UROS)) 7 | endif 8 | 9 | # Low Level Driver bindings for ChibiOS/RT 10 | UROSLLDSRC += $(UROS)/src/lld/chibios/uros_lld_base.c \ 11 | $(UROS)/src/lld/chibios/uros_lld_threading.c 12 | -------------------------------------------------------------------------------- /mk/lwip.mk: -------------------------------------------------------------------------------- 1 | # Makefile include for uROSnode 2 | 3 | ifeq ($(UROS),) 4 | ifeq ($(CHIBIOS),) 5 | # Set the default uROSnode root directory to "/ext/uros" 6 | UROS = $(CHIBIOS)/ext/uros 7 | $(info folder automatically set to: $(UROS)) 8 | else 9 | $(error Please define so that it points to the uROSnode root folder!) 10 | endif 11 | endif 12 | 13 | # Low Level Driver bindings for LWIP 14 | UROSLLDSRC += $(UROS)/src/lld/lwip/uros_lld_conn.c 15 | -------------------------------------------------------------------------------- /mk/posix.mk: -------------------------------------------------------------------------------- 1 | # Makefile include for uROSnode 2 | 3 | ifeq ($(UROS),) 4 | $(error Please define so that it points to the uROSnode root folder!) 5 | endif 6 | 7 | # Low Level Driver bindings for POSIX 8 | UROSLLDSRC += $(UROS)/src/lld/posix/uros_lld_base.c \ 9 | $(UROS)/src/lld/posix/uros_lld_conn.c \ 10 | $(UROS)/src/lld/posix/uros_lld_threading.c 11 | -------------------------------------------------------------------------------- /mk/uros.mk: -------------------------------------------------------------------------------- 1 | # Makefile include for uROSnode 2 | 3 | ifeq ($(UROS),) 4 | $(error Please define so that it points to the uROSnode root folder!) 5 | endif 6 | ifneq ($(UROSLLDSRC),) 7 | $(error not empty; please include uros.mk BEFORE makefile scripts for low-level sources) 8 | endif 9 | 10 | # List of all the related source files 11 | UROSSRC = $(UROS)/src/urosBase.c \ 12 | $(UROS)/src/urosConn.c \ 13 | $(UROS)/src/urosNode.c \ 14 | $(UROS)/src/urosRpcCall.c \ 15 | $(UROS)/src/urosRpcParser.c \ 16 | $(UROS)/src/urosRpcSlave.c \ 17 | $(UROS)/src/urosRpcStreamer.c \ 18 | $(UROS)/src/urosTcpRos.c \ 19 | $(UROS)/src/urosThreading.c 20 | 21 | # Required include directories 22 | UROSINC = $(UROS)/include 23 | 24 | # Remember to append to to list low-level source files 25 | UROSLLDSRC = # Do not append here 26 | -------------------------------------------------------------------------------- /src/lld/posix/uros_lld_base.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file uros_lld_base.c 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Low-level basic features implementation. 36 | */ 37 | 38 | /*===========================================================================*/ 39 | /* HEADER FILES */ 40 | /*===========================================================================*/ 41 | 42 | #include "../../../include/lld/uros_lld_base.h" 43 | 44 | #include 45 | 46 | /*===========================================================================*/ 47 | /* LOCAL TYPES & MACROS */ 48 | /*===========================================================================*/ 49 | 50 | #if UROS_BASE_C_USE_ASSERT == UROS_FALSE && !defined(__DOXYGEN__) 51 | #undef urosAssert 52 | #define urosAssert(expr) 53 | #endif 54 | 55 | /*===========================================================================*/ 56 | /* GLOBAL FUNCTIONS */ 57 | /*===========================================================================*/ 58 | 59 | /** @addtogroup base_lld_funcs */ 60 | /** @{ */ 61 | 62 | /** 63 | * @brief Initializes the low-level system. 64 | * 65 | * @pre The low-level system has not been initialized yet. 66 | */ 67 | void uros_lld_init(void) { 68 | 69 | /* Nothing to initialize.*/ 70 | } 71 | 72 | /** 73 | * @brief Allocates a memory block. 74 | * @details This function tries to allocate a memory block of the required size 75 | * inside the default heap of the operating system. 76 | * @see urosAlloc() 77 | * 78 | * @pre There is enough contiguous free space inside the default heap. 79 | * 80 | * @param[in,out] heapp 81 | * Pointer to an initialized @p UrosMemHeap object, default @p NULL. 82 | * @param[in] size 83 | * Size of the memory block to be allocated, in bytes. 84 | * @return 85 | * The address of the allocated memory chunk. 86 | * @retval NULL 87 | * There is not enough contiguous free memory to allocate a memory 88 | * block of the requested size. 89 | */ 90 | void *uros_lld_alloc(UrosMemHeap *heapp, size_t size) { 91 | 92 | (void)heapp; 93 | 94 | urosAssert(heapp == NULL); 95 | 96 | /* Default memory block allocation.*/ 97 | return malloc(size); 98 | } 99 | 100 | /** 101 | * @brief Deallocates a memory block. 102 | * @see urosFree() 103 | * 104 | * @pre The block pointed by @p chunkp must have been allocated with 105 | * @p urosAlloc(). 106 | * @post @p chunkp points to an invalid address. 107 | * 108 | * @param[in] chunkp 109 | * Pointer to the memory block to be deallocated. 110 | * A @p NULL value will simply be ignored. 111 | */ 112 | void uros_lld_free(void *chunkp) { 113 | 114 | /* Default memory block deallocation.*/ 115 | if (chunkp != NULL) { 116 | free(chunkp); 117 | } 118 | } 119 | 120 | /** @} */ 121 | -------------------------------------------------------------------------------- /template/src/lld/uros_lld_base.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file uros_lld_base.c 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Low-level basic features implementation (TEMPLATE). 36 | */ 37 | 38 | /*===========================================================================*/ 39 | /* HEADER FILES */ 40 | /*===========================================================================*/ 41 | 42 | #include "../../../include/lld/uros_lld_base.h" 43 | 44 | /*===========================================================================*/ 45 | /* LOCAL TYPES & MACROS */ 46 | /*===========================================================================*/ 47 | 48 | #if UROS_BASE_C_USE_ASSERT == UROS_FALSE && !defined(__DOXYGEN__) 49 | #undef urosAssert 50 | #define urosAssert(expr) 51 | #endif 52 | 53 | /*===========================================================================*/ 54 | /* GLOBAL FUNCTIONS */ 55 | /*===========================================================================*/ 56 | 57 | /** @addtogroup base_lld_funcs */ 58 | /** @{ */ 59 | 60 | /** 61 | * @brief Initializes the low-level system. 62 | * 63 | * @pre The low-level system has not been initialized yet. 64 | */ 65 | void uros_lld_init(void) { 66 | 67 | /* TODO: Low-level initialization.*/ 68 | } 69 | 70 | /** 71 | * @brief Allocates a memory block. 72 | * @details This function tries to allocate a memory block of the required size 73 | * inside the default heap of the operating system. 74 | * @see urosAlloc() 75 | * 76 | * @pre There is enough contiguous free space inside the default heap. 77 | * 78 | * @param[in] size 79 | * Size of the memory block to be allocated, in bytes. 80 | * @return 81 | * The address of the allocated memory chunk. 82 | * @retval NULL 83 | * There is not enough contiguous free memory to allocate a memory 84 | * block of the requested size. 85 | */ 86 | void *uros_lld_alloc(size_t size) { 87 | 88 | /* TODO: Default memory block allocation.*/ 89 | (void)size; 90 | return NULL; 91 | } 92 | 93 | /** 94 | * @brief Deallocates a memory block. 95 | * @see urosFree() 96 | * 97 | * @pre The block pointed by @p chunkp must have been allocated with 98 | * @p urosAlloc(). 99 | * @post @p chunkp points to an invalid address. 100 | * 101 | * @param[in] chunkp 102 | * Pointer to the memory block to be deallocated. 103 | * A @p NULL value will simply be ignored. 104 | */ 105 | void uros_lld_free(void *chunkp) { 106 | 107 | /* TODO: Default memory block deallocation.*/ 108 | (void)chunkp; 109 | } 110 | 111 | /** @} */ 112 | -------------------------------------------------------------------------------- /template/src/lld/uros_lld_node.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file uros_lld_node.c 33 | * @author Andrea Zoppi 34 | * 35 | * @brief Low-level Node features implementation (TEMPLATE). 36 | */ 37 | 38 | /*===========================================================================*/ 39 | /* HEADER FILES */ 40 | /*===========================================================================*/ 41 | 42 | #include "../../../include/urosBase.h" 43 | #include "../../../include/urosUser.h" 44 | #include "../../../include/urosNode.h" 45 | #include "../../../include/lld/uros_lld_node.h" 46 | 47 | /*===========================================================================*/ 48 | /* LOCAL TYPES & MACROS */ 49 | /*===========================================================================*/ 50 | 51 | #if UROS_NODE_C_USE_ASSERT == UROS_FALSE && !defined(__DOXYGEN__) 52 | #undef urosAssert 53 | #define urosAssert(expr) 54 | #endif 55 | 56 | /*===========================================================================*/ 57 | /* GLOBAL FUNCTIONS */ 58 | /*===========================================================================*/ 59 | 60 | /** @addtogroup node_lld_funcs */ 61 | /** @{ */ 62 | 63 | /** 64 | * @brief Loads node configuration. 65 | * @details Any previously allocated data is freed, then the configuration is 66 | * loaded from a static non-volatile memory chunk. 67 | * @see uros_lld_nodeconfig_load() 68 | * 69 | * @pre The related @p UrosNode is initialized. 70 | * 71 | * @param[in,out] cfgp 72 | * Pointer to the target configuration descriptor. 73 | */ 74 | void uros_lld_nodeconfig_load(UrosNodeConfig *cfgp) { 75 | 76 | urosAssert(cfgp != NULL); 77 | 78 | /* Clean any allocated variables.*/ 79 | urosStringClean(&cfgp->nodeName); 80 | urosStringClean(&cfgp->xmlrpcUri); 81 | urosStringClean(&cfgp->tcprosUri); 82 | urosStringClean(&cfgp->masterUri); 83 | 84 | /* TODO: Load saved configuration values.*/ 85 | } 86 | 87 | /** 88 | * @brief Saves the node configuration. 89 | * @details The node configuration is saved to a static non-volatile memory 90 | * chunk. 91 | * @see uros_lld_nodeconfig_save() 92 | * 93 | * @pre The related @p UrosNode is initialized. 94 | * 95 | * @param[in] cfgp 96 | * Pointer to the configuration descriptor to be saved. 97 | */ 98 | void uros_lld_nodeconfig_save(const UrosNodeConfig *cfgp) { 99 | 100 | /* TODO: Save configuration values.*/ 101 | (void)cfgp; 102 | } 103 | 104 | /** @} */ 105 | -------------------------------------------------------------------------------- /tools/urosgen/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | urosgen 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.python.pydev.pythonNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /tools/urosgen/.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /urosgen/src 5 | 6 | python 2.7 7 | Default 8 | 9 | 10 | -------------------------------------------------------------------------------- /tools/urosgen/demos/urosHandlers.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved. 3 | 4 | Andrea Zoppi 5 | Martino Migliavacca 6 | 7 | http://airlab.elet.polimi.it/ 8 | http://www.openrobots.com/ 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are met: 12 | 13 | 1. Redistributions of source code must retain the above copyright notice, this 14 | list of conditions and the following disclaimer. 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file urosHandlers.h 33 | * @author Your Name 34 | * 35 | * @brief TCPROS topic and service handlers. 36 | */ 37 | 38 | #ifndef _UROSHANDLERS_H_ 39 | #define _UROSHANDLERS_H_ 40 | 41 | /*============================================================================*/ 42 | /* HEADER FILES */ 43 | /*============================================================================*/ 44 | 45 | #include "urosMsgTypes.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | /*============================================================================*/ 52 | /* PUBLISHED TOPIC PROTOTYPES */ 53 | /*============================================================================*/ 54 | 55 | /*~~~ PUBLISHED TOPIC: /output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 56 | 57 | uros_err_t pub_tpc__output(UrosTcpRosStatus *tcpstp); 58 | 59 | /*~~~ PUBLISHED TOPIC: /rosout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 60 | 61 | uros_err_t pub_tpc__rosout(UrosTcpRosStatus *tcpstp); 62 | 63 | /*============================================================================*/ 64 | /* SUBSCRIBED TOPIC PROTOTYPES */ 65 | /*============================================================================*/ 66 | 67 | /*~~~ SUBSCRIBED TOPIC: /constants ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 68 | 69 | uros_err_t sub_tpc__constants(UrosTcpRosStatus *tcpstp); 70 | 71 | /*~~~ SUBSCRIBED TOPIC: /input ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 72 | 73 | uros_err_t sub_tpc__input(UrosTcpRosStatus *tcpstp); 74 | 75 | /*~~~ SUBSCRIBED TOPIC: /rosin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 76 | 77 | uros_err_t sub_tpc__rosin(UrosTcpRosStatus *tcpstp); 78 | 79 | /*============================================================================*/ 80 | /* PUBLISHED SERVICE PROTOTYPES */ 81 | /*============================================================================*/ 82 | 83 | /*~~~ PUBLISHED SERVICE: /reconfigure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 84 | 85 | uros_err_t pub_srv__reconfigure(UrosTcpRosStatus *tcpstp); 86 | 87 | /*============================================================================*/ 88 | /* CALLED SERVICE PROTOTYPES */ 89 | /*============================================================================*/ 90 | 91 | /*~~~ CALLED SERVICE: /reconfigure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 92 | 93 | uros_err_t call_srv__reconfigure( 94 | UrosTcpRosStatus *tcpstp, 95 | struct in_srv__dynamic_reconfigure__Reconfigure *inmsgp, 96 | struct out_srv__dynamic_reconfigure__Reconfigure *outmsgp 97 | ); 98 | 99 | /*============================================================================*/ 100 | /* GLOBAL PROTOTYPES */ 101 | /*============================================================================*/ 102 | 103 | void urosHandlersPublishTopics(void); 104 | void urosHandlersUnpublishTopics(void); 105 | 106 | void urosHandlersSubscribeTopics(void); 107 | void urosHandlersUnsubscribeTopics(void); 108 | 109 | void urosHandlersPublishServices(void); 110 | void urosHandlersUnpublishServices(void); 111 | 112 | #ifdef __cplusplus 113 | } /* extern "C" */ 114 | #endif 115 | 116 | #endif /* _UROSHANDLERS_H_ */ 117 | 118 | -------------------------------------------------------------------------------- /tools/urosgen/demos/urosgen_demo.cfg: -------------------------------------------------------------------------------- 1 | # urosgen.py configuration file, for demonstration purposes. 2 | 3 | # This is the options section. All the options are assigned below. An undefined 4 | # option is assigned its default value. Run urosgen.py without arguments to see 5 | # their default values. 6 | [Options] 7 | 8 | # Author of the generated files 9 | author = Your Name 10 | 11 | # Optional license text file to comment at the beginning of generated files 12 | licenseFile = ../../../COPYING 13 | 14 | # Name of the generated node 15 | nodeName = uros_demo_node 16 | 17 | # Paths of the generated files, relative to this configuration file 18 | includeDir = . # Header files path (must exist!) 19 | sourceDir = . # Source files path (must exist!) 20 | 21 | # File names for ".h" and ".c" generation 22 | msgTypesFilename = urosMsgTypes # Message types file name 23 | handlersFilename = urosHandlers # Handlers file name 24 | 25 | # Generation switches 26 | genMsgTypesHeader = true 27 | genMsgTypesSource = true 28 | genHandlersHeader = true 29 | genHandlersSource = true 30 | 31 | # Allocates the message/service values on the stack instead of into the heap 32 | msgOnStack = false # All the topic messages 33 | inOnStack = false # All the service requests (in) 34 | outOnStack = true # All the service responses (out) 35 | 36 | # Base name of handler variables. Depending on the stack/heap options, they 37 | # will be declared as: [*namep = NULL] if in heap, [name] if on stack. 38 | msgVarBaseName = msg # Topic message variable name 39 | inVarBaseName = inmsg # Service request variable name 40 | outVarBaseName = outmsg # Service response variable name 41 | 42 | # Generates comments above the declaration of each structure field 43 | fieldComments = true 44 | 45 | # Generated function names 46 | regTypesFuncName = urosMsgTypesRegStaticTypes 47 | regPubTopicsFuncName = urosHandlersPublishTopics 48 | unregPubTopicsFuncName = urosHandlersUnpublishTopics 49 | regSubTopicsFuncName = urosHandlersSubscribeTopics 50 | unregSubTopicsFuncName = urosHandlersUnsubscribeTopics 51 | regPubServicesFuncName = urosHandlersPublishServices 52 | unregPubServicesFuncName = urosHandlersUnpublishServices 53 | 54 | 55 | # List of published topics, in the form: = 56 | [PubTopics] 57 | output = stereo_msgs/DisparityImage # 3 levels deep type 58 | rosout = rosgraph_msgs/Log # A common type 59 | 60 | 61 | # List of subscribed topics, in the form: = 62 | [SubTopics] 63 | input = stereo_msgs/DisparityImage # Just to check 64 | constants = bond/Constants # This type defines only constants 65 | rosin = rosgraph_msgs/Log # Just to check 66 | 67 | 68 | # List of published services, in the form: = 69 | [PubServices] 70 | reconfigure = dynamic_reconfigure/Reconfigure # 3 levels deep type 71 | 72 | 73 | # List of services called by the node, in the form: = 74 | [CallServices] 75 | reconfigure = dynamic_reconfigure/Reconfigure # Just to check 76 | 77 | -------------------------------------------------------------------------------- /tools/urosgen/src/urosgen.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openrobots-dev/uROSnode/83c75d16441519fde349846d3f092f7e4fbd4b85/tools/urosgen/src/urosgen.pyc -------------------------------------------------------------------------------- /tools/urosstan/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | urosstan 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.python.pydev.pythonNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /tools/urosstan/.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /urosstan/src 5 | 6 | python 2.7 7 | Default 8 | 9 | --------------------------------------------------------------------------------