Commit graph

315 commits

Author SHA1 Message Date
Dirk Thomas
72bcb6b5b6 update style to match latest uncrustify 2017-09-28 15:27:22 -07:00
Dirk Thomas
ef94e9f277 0.0.3 2017-09-13 15:07:07 -07:00
Mikael Arguedas
1fa4acac8c Timer tests (#163)
* dont return timeout errcode if we didnt hit user specified timeout

* update axisting test accordingly

* add timer test

* Revert "dont return timeout errcode if we didnt hit user specified timeout"

This reverts commit f44a93b8528e87ce46594af0d1184c116ade0cb4.

* alternative fix to not return timeout when timer is ready

this also fixes a bug where the wait would always return when all the
timers were canceled

fixes rclcpp#319

* fixups

* more tests

* another one just for fun

* remove new tests

* clearer variable name

* update comment
2017-09-08 10:22:14 -07:00
Mikael Arguedas
cd8cff0024 remove todo that doesnt seem necessary anymore (#161) 2017-08-29 22:58:21 -07:00
Mikael Arguedas
173f1da229 add issue template 2017-08-14 18:04:24 -07:00
Dirk Thomas
ef61baa903 Merge pull request #159 from ros2/issue155
reset expected error msg to avoid warning
2017-08-11 15:14:20 -07:00
Dirk Thomas
ad044b509a reset expected error msg to avoid warning 2017-08-11 15:06:19 -07:00
Chris Lalancette
c1232a7288 Fix memory problems in rcl. (#158)
* Fix memory problems in rcl.

There are actually two problems here.  In one of the problems,
we were sometimes taking an rcl_guard_condition that we did *not*
allocate, and trying to deallocate it.  This was leading to
double frees.

The second problem was forgetting to call guard_condition_fini
during node_fini.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>

* Drop duplicated check for overwriting previous error.

As pointed out by Dirk in review, the RCL_SET_ERROR_MSG
macro (through the rcutils_set_error_state() function)
already checks to see if a message is being dropped and
warns about it.  Thus, we don't need to do it ourselves.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2017-08-10 15:11:16 -07:00
Mikael Arguedas
cdedde8c91 Merge pull request #157 from ros2/rcl_use_rcutils
Rcl use rcutils
2017-08-10 12:12:11 -07:00
Mikael Arguedas
abf331e81f use snprintf from rcutils 2017-08-10 12:08:44 -07:00
Mikael Arguedas
835a90761c use macros 2017-08-10 12:08:18 -07:00
Karsten Knese
3cff9020d1 replace rcl_lifecycle_ret_t with lifecycle_msgs__TRANSITION__CALLBACK* (#153) 2017-08-02 14:05:03 -07:00
Karsten Knese
5cdef527de remove fprintf, use logging macros (#152)
* remove fprintf, use logging macros

* consistent includes
2017-07-27 07:55:26 -07:00
Mikael Arguedas
2d961fb501 Use _WIN32 everywhere (#151) 2017-07-24 14:49:26 -07:00
Hunter Allen
af03d0c44d Implement is valid methods (#103)
* Implemented service is valid check.

* Added an is-valid check for publishers.

* Changed the checks to the single call to

* Added subscription is_valid function, and replaced individual checks with a call to the function in the subscription code.

* Added documentation for is_valid functions.

* Moved the options pointer check into the is_valid function.

* Implemented client checks.
2017-07-18 13:12:06 -07:00
Dirk Thomas
a57f66b54c 0.0.2 2017-06-30 15:11:46 -07:00
Mikael Arguedas
39ddf00378 slightly less confusing error msg (#149) 2017-06-30 14:34:16 -07:00
Dirk Thomas
7eecba9d7d Merge pull request #148 from ros2/check_node_validity
ensure node is valid before using it
2017-06-27 12:04:38 -07:00
William Woodall
9d37b9de72 update docs (#147) 2017-06-27 12:02:49 -07:00
Dirk Thomas
ee140b1bf0 ensure node is valid before using it 2017-06-27 11:25:24 -07:00
William Woodall
6c5f98ed4c Refactor get topic names and types (#144)
* cleanup

* refactor for no_demangle and service n&t

* fixup convenience function

* add missing null check
2017-06-16 18:02:06 -07:00
Karsten Knese
c37bfec072 use rcl_allocator for rcl_lifecycle & namespaced topics (#142)
* use rcl_allocator for rcl_lifecycle

* correct return value interpretation

* fix unsigned comparison

* use namespace for lifecycle in-built topics

* linters
2017-06-16 14:44:06 -07:00
Esteve Fernandez
0f2519944a Explicitly set C11 and C++14 via the CMake variables (#141)
* Explicitly set C99 and C++14 via the CMake variables

* Enable passing CMAKE_C_STANDARD and CMAKE_CXX_STANDARD externally

* Use add_compile_options

* Be more specific about the compiler, independent from the OS

* Check compiler, not OS. Use add_compile_options instead of CMAKE_C_FLAGS and CMAKE_CXX_FLAGS

* add_compile_options() takes a list, not a string

* switch to c11 because of redefinition warnings

avoid typedef redifinition warning on macos

remove todo, compiler come from redefinition of typedef
2017-06-16 13:23:59 -07:00
Mikael Arguedas
21fff528e1 add support for DDS Security (#125)
* add functions to find certificates in filesystem

* only pass the security root path to the rmw

* remove unused code

* fix memory leak

* style

* memory leak round 2

* temporary ifdef for file permission flags

* _S_IREAD works only for file not directories

* use c_utililties functions

* add todo to use c_utility/concat rather that snprintf

* remove now unnecessary stat include

* use backslash separator for path on windows

* duh

* update c_utilities imports and functions signatures

* use c_utilities to concatenate paths

* print debug msg to stdout

* suppress warning, put sros env var as static at the beginnign of the file

* pass local namespace

* more c_utilities renaming

* comment out debug prints for now

* add env vars for security strategy and enforce them

* use rmw_node_security_options structure

* line length

* remove unused conditional

* rename environment variable

* style

* use defines for env var names and use rcutils_stringify on it

* remove unnecessary assignment

* consistent define naming for environment variables names

* stringify SECURITY_ROOST_DIRECTORY
2017-06-14 19:50:07 -07:00
Karsten Knese
553920ff9e string array takes allocator (#143) 2017-06-14 11:38:47 -07:00
Dirk Thomas
14a496696c Merge pull request #140 from ros2/move_time
move time files to rcutils
2017-06-01 22:11:09 -07:00
Dirk Thomas
e86f7a667a Merge pull request #120 from ros2/reenable_node_get_graph_guard_condition_tests
reenable tests for rcl_node_get_graph_guard_condition for all rmw impl
2017-06-01 20:35:02 -07:00
Dirk Thomas
e84b178c85 move system and steady time to rcutils 2017-06-01 15:48:59 -07:00
Dirk Thomas
ee03d1a7cc add debug output which part of the state is incorrect 2017-06-01 14:58:57 -07:00
William Woodall
517b79bac6 found more disabled tests that shouldn't be for Fast-RTPS 2017-06-01 14:51:05 -07:00
William Woodall
283e476c26 reenable tests for rcl_node_get_graph_guard_condition for all rmw impl 2017-06-01 14:51:05 -07:00
William Woodall
e1bfa26cea Use namespaces (#137)
* fix documentation of expand_topic_name()

* use expand_topic_name() in pub/sub/client/service

* update test expectations

* use absolute topic names to avoid mismatch due to expansion

* propagate new functions from rcutils error handling

* convert given rcl allocator to a rcutils allocator
2017-05-30 18:24:48 -07:00
Karsten Knese
6fbfb4ee07 Warn unused (#139)
* add unused warning

* comply with unused warning

* add unused warning

* comply with unused warning

* remove wrongly modified files

* consistent include style
2017-05-25 19:52:25 -07:00
Karsten Knese
d433ee193c Namespace impl (#135)
* massive fprints everywhere

* add rcl test for namespacing

* client server test

* organize test folder

* address review comments
2017-05-18 11:45:16 -07:00
William Woodall
853c2e30a5 fix examples in documentation that were out of date (#136) 2017-05-11 17:26:53 -07:00
William Woodall
cbfe6b90f9 Namespace expansion (#132)
* update to use new rmw function name

* add rcl_validate_topic_name()

* add rcl_expand_topic_name()

* gcc couldn't handle the init lists with tuples

* uncrustify and cpplint

* fix signed compare warnings

* address comments

* organize the substitution string constants together at the top of the file

* comment
2017-05-09 15:15:57 -07:00
dhood
fc75c58962 Debug info for test_rcl_get_node_names (#133)
* Debug output for failed node_names test

* Give test nodes unique names

* Put test name in printout
2017-05-02 10:25:48 -07:00
David Wang
309fa5cf0f Rename some functions to match the style in rcl (#131)
Signed-off-by: David Wang <david.wang@arm.com>
2017-04-28 00:33:47 -07:00
William Woodall
bed40d3d40 rename {c_}utilities to rcutils (#130) 2017-04-20 11:15:03 -07:00
Karsten Knese
f9e03e51bb use c_utilities packages (#129)
* use c_utilities packages

* use rmw topic validation

* fix rebase/merge commits

* alphabetical includes
2017-04-19 15:40:41 -07:00
William Woodall
90176d9f1a move allocator and error handling to c utilities (#122)
* moved allocator to c_utilities

* moved error_handling to c_utilities

* refactor uses of RCL_SET_ERROR_MSG with allocator

* add missing guard condition functions and tests

* add missing timer functions

* refactor rcl_lifecycyle

* missed an instance of RCL_SET_ERROR_MSG

* fix segfaults in error cases for rcl_lifecycle

* remove extra header

* check return code of rcl_lifecycle_init_default_state_machine
2017-04-19 12:37:48 -07:00
Loïc Dauphin
415612f8af time OS-specific implementation chosen by CMakeLists.txt (#124) 2017-04-17 23:54:54 -07:00
Karsten Knese
08d9763ce7 use string_array_t from c_utilities package (#118)
* use c_utilities package

* add doc for get_node_names

* fix typo

* fixup docs

* fix tests to handle return value of destroy function
2017-04-14 16:18:23 -07:00
Loïc Dauphin
a78c18b58b Debug stdatomic_helper.h (#117) 2017-04-11 10:54:15 -07:00
Karsten Knese
2678316863 fix cmake for test - remove unused params (#116)
* fix cmake for test - remove unused params

* set env variable for rmw_implementation
2017-04-11 08:54:58 -07:00
Dirk Thomas
9f1459733a Merge pull request #115 from esteve/honor-build-shared-libs-2
Control shared/static linking via BUILD_SHARED_LIBS and ament_cmake_ros
2017-04-10 08:16:57 -07:00
William Woodall
64f1b16d2f add concept of node namespace to rcl API (#112)
* add concept of node namespace to rcl API

also validate node name and node namespace

* name_space -> namespace_

* doc clarification

* make use of rmw_validate_namespace()

* clear expected error messages in test_node.cpp

* avoid unused invalid_index

* include the validation result value when it is unknown

* use _snprintf_s on windows

* uncrustify
2017-04-08 02:04:51 -07:00
Esteve Fernandez
7d389e0d51 Control shared/static linking via BUILD_SHARED_LIBS and ament_cmake_ros 2017-04-07 15:03:29 +02:00
Dirk Thomas
77ee3f987c Merge pull request #114 from ros2/revert-93-honor-build-shared-libs
Revert "Control shared/static linking via BUILD_SHARED_LIBS"
2017-04-05 15:53:59 -07:00
Dirk Thomas
5c35549009 Revert "Control shared/static linking via BUILD_SHARED_LIBS" 2017-04-05 15:53:40 -07:00