Giter Site home page Giter Site logo

rcl's Introduction

rcl's People

Contributors

ahcorde avatar audrow avatar barry-xu-2018 avatar blast545 avatar brawner avatar christophebedard avatar clalancette avatar cottsay avatar dhood avatar dirk-thomas avatar emersonknapp avatar esteve avatar fujitatomoya avatar gaoethan avatar hidmic avatar ivanpauno avatar jacobperron avatar jacquelinekay avatar jwang11 avatar karsten1987 avatar methyldragon avatar mikaelarguedas avatar mjcarroll avatar mm318 avatar nuclearsandwich avatar sloretz avatar tfoote avatar wjwwood avatar xabxx avatar y-okumura-isp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rcl's Issues

Setup code documentation generation

Temporarily until we have a general solution, so that people can generate and browse the documentation we have so far on this package.

The other motivation for setting this up is to resolve issues like this one: #5 (comment)

Static Remapping Multi Token Wildcard `**`

Feature request

Feature description

Implement multi token wildcard ** for static remapping from command line arguments.
Implementing requires changing rcl_remap_t to store information about wildcards.
It also requires changing the matching logic to allow backtracking.
This is blocked by ros2/design#173

Implementation considerations

Behavior of ** is described in the remapping design doc.

handling of command line arguments

In ROS 1, command line arguments specific to ROS were removed, see:

argc and argv
ROS uses these to parse remapping arguments from the command line. It also modifies them so that they no longer contain any remapping arguments, so that if you call ros::init() before processing your command line you will not need to skip those arguments yourself.

-- https://wiki.ros.org/roscpp/Overview/Initialization%20and%20Shutdown#Initializing_the_roscpp_Node

And the signature for roscpp::init() uses int & argc, char ** argv, allowing it technically to modify what ever C array of strings you give it. This is permissible according to my research, e.g.:

The strings are modifiable, although these modifications do not propagate back to the execution environment: they can be used, for example, with std::strtok. The size of the array pointed to by argv is at least argc+1, and the last element, argv[argc], is guaranteed to be a null pointer.

-- http://en.cppreference.com/w/cpp/language/main_function

But modifying the system provided argv automatically (implicitly) is a bit surprising for users.

Other places recommend int main(int argc, char const * argv[]) as the signature to main, which I can't find a foundation for, but seems like a reasonable thing to do.


For ROS 2, I'd like to propose that we change our rcl interface and down to not directly modify argv, and instead provide a function that removes the arguments by returning a copy that is pruned (still not modifying the originals). In rclcpp we can do something like have rclcpp::init() return a vector<string> rather than mutate the argc and argv it was given. Which keeps the number of statements low, but again avoids mutating the arguments in place.

So that would mean:

  • void init(int argc, char * argv[]) -> void init(int argc, char const * const argv[])
  • rcl_ret_t rcl_init(int argc, char ** argv, rcl_allocator_t allocator) -> rcl_ret_t rcl_init(int argc, char const * const argv[], rcl_allocator_t allocator)
  • add function to rcl like rcl_ret_t rcl_remove_ros_arguments(int argc, char const * const argv[], size_t pruned_argc, char const * pruned_argv[], const rcl_cli_arguments_t * parsed_arguments)
    • note rcl_cli_arguments_t is created after calling rcl_parse_arguments, which rcl_init does
    • this is dependent on #217
  • add C++ version of rcl_remove_ros_arguments, e.g. vector<string> rclcpp::remove_ros_arguments(int argc, char const * const argv[], const rcl_cli_arguments_t * parsed_arguments) or something like that
  • add convenience version of rclcpp::init which removes the args and exposed the pruned args automatically, e.g. vector<string> rclcpp::init_and_remove_ros_arguments(int argc, char const * const argv[]) or something like that
  • add a similar behavior for rclpy, not sure off hand how this should look

Optionally there are few things we could do at the same time:

  • add support for command line arguments to rmw_init, it would need to:
    • take argc and argv and
    • have a way to indicate which indices in argv were "consumed" by the middleware and should/could be remove for the user
  • make all the global init functions not global, by returning a handle or structure
    • this would just be good to do, and while we're touching these functions anyways...
    • this would also allow us to simplify the remove_ros_args like functions in a few cases, especially in C++
  • perhaps other things I'll think of later...

[YAML parser] Support for multiple parameter files

#235 takes of supporting parsing single YAML parameter file.

The above work needs to be extended to support multiple parameter files. This helps where a vendor can ship their product with a default parameter file and customer can use their parameter file if they want to change some of the default values. The files will be parsed one after the other updating the same C parameter structure. If the same node/parameter exists in the structure, the newer values will update the older values. If it is a new node/parameter, it needs to get appended. Also, if the parameter struct is already present which was created by previous rcl_parse_yaml_file(), the later calls updates the structure

/// \brief Parse the YAML file, initialize and populate params_st
/// \param[in] file_patha is the list of paths to the YAML files
/// \param[in/out] params_st points to the populated paramter struct
/// \return true on success and false on failure
RCL_YAML_PARAM_PARSER_PUBLIC
bool rcl_parse_yaml_file(
  const char ** file_paths,
  rcl_params_t * params_st);

[YAML parser] Improve print function

follow-up of #235 (comment)

The public rcl_yaml_node_struct_print prints a single type of structures and doesn't allow to chose the destination of the print.

We should provide utilities to provide a pretty string representation of the structure that could then easily be printed to:

  • string
  • stream
  • topic
    ...

Linking errors for client_fixture and service_fixture tests

The service_fixture and client_fixture tests are not linking properly on my machine. The rest work fine.

Linking CXX executable client_fixture__rmw_connext_cpp
cd /home/dhood/src/rcl/build/rcl/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/client_fixture__rmw_connext_cpp.dir/link.txt --verbose=1
/usr/bin/c++    -std=c++11 -Wall -Wextra    CMakeFiles/client_fixture__rmw_connext_cpp.dir/rcl/client_fixture.cpp.o  -o client_fixture__rmw_connext_cpp  -L/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2 -rdynamic ../librcl__rmw_connext_cpp.so -ldl memory_tools/librcl_memory_tools.so /home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib/librmw_connext_shared_cpp.so /home/dhood/ros2_ws/install_isolated/rmw/lib/librmw.so /home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib/librosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_connext_cpp/lib/librosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_cpp/lib/librmw_connext_cpp.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib/libbuiltin_interfaces__rosidl_typesupport_opensplice_cpp.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/example_interfaces/lib/libexample_interfaces__rosidl_typesupport_opensplice_cpp.so -lnddsc -lnddscore -lnddscpp -lrticonnextmsgcpp -lcmxml -lcommonserv -ldcpsgapi -ldcpssac -lddsconfparser -lddsconf -lddsdatabase -lddsi2 -lddskernel -lddsosnet -lddsos -lddsserialization -lddsuser -lddsutil -ldurability -lspliced -ldcpssacpp -lpthread -ldl /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_opensplice_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib/librmw_connext_shared_cpp.so /home/dhood/ros2_ws/install_isolated/rmw/lib/librmw.so /home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib/librosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_connext_cpp/lib/librosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_cpp/lib/librmw_connext_cpp.so -ldl -lnddsc -lnddscore -lnddscpp -lrticonnextmsgcpp -lcmxml -lcommonserv -ldcpsgapi -ldcpssac -lddsconfparser -lddsconf -lddsdatabase -lddsi2 -lddskernel -lddsosnet -lddsos -lddsserialization -lddsuser -lddsutil -ldurability -lspliced -ldcpssacpp -lpthread -ldl -Wl,-rpath,/home/dhood/src/rcl/build/rcl:/home/dhood/src/rcl/build/rcl/test/memory_tools:/home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib:/home/dhood/ros2_ws/install_isolated/rmw/lib:/home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib:/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_connext_cpp/lib:/home/dhood/ros2_ws/install_isolated/rmw_connext_cpp/lib:/home/dhood/ros2_ws/install_isolated/builtin_interfaces/lib:/home/dhood/ros2_ws/install_isolated/example_interfaces/lib:/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2:/home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib 
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlopen'
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlclose'
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlerror'
/home/dhood/rti_connext_dds-5.2.0/lib/x64Linux3gcc4.8.2/libnddscore.so: undefined reference to `dlsym'

-ldl is in the linking output, but I think it might be something similar to this issue
I'm on Trusty with gcc version 4.8.4. I think the buildfarm has 4.6.3.

I have seen that the memory_tools tests are doing something specific with dl which might be relevant to these tests as well?

[YAML parser] Support command line yaml parameter string

#235 takes of supporting parsing YAML parameter file.

The above work needs to be extended to support command line string yaml parameters. The API that needs to be implemented for this functionality is

/// \brief Parse the YAML string, initialize and populate params_st
/// \param[in] yaml_string is the YAML parameter string to be parsed
/// \param[in/out] params_st points to the populated paramter struct
/// \return true on success and false on failure
RCL_YAML_PARAM_PARSER_PUBLIC
bool rcl_parse_yaml_file(
  const char * yaml_string,
  rcl_params_t * params_st);

use allocator in rcl time related functions

Some of the time functions call out to allocator functions directly like calloc:

time_source->data = calloc(1, sizeof(rcl_ros_time_source_storage_t));

They should instead get passed an allocator (perhaps optionally) and use that to allocate memory.

Possibly the allocator structure should be extended to have calloc, so that the OS calloc can be used rather than emulating it with malloc and memset.

Expose rcl_remap_t in public API

Feature request

The structure rcl_remap_t should be exposed in the public API, and maybe _rcl_parse_remap_rule() should be to.

Feature description

This is to allow it to be wrapped by rclcpp and passed into the node's constructor as something other than string arguments, which will allow ros2 launch to handle remap rules and parameter files the same way: parse arguments, decide which ones apply to which nodes, and pass just those args into the node's constructor.

Implementation considerations

  • remap.h will need to be installed
  • rcl_remap_t needs to use PIMPL pattern
  • maybe expose _rcl_parse_remap_rule() as a public function to allow creating a remap rule from one string
  • rcl_arguments_t needs a method to get remap rules
  • Could update rcl_remap_*() functions to accept a list of remap rules instead of an arguments struct since that's all they need.

Implement rcl_x_is_valid methods

In order to track what was discussed in #78 I open this issue tracker.

@wjwwood suggested that in the future it might become necessary/useful to implement functions in the style rcl_x_is_valid .

An example would be: bool rcl_service_is_valid(rcl_service_t * service) which would check if this service is valid. (Perhaps check if it's not null, check if it was initialized, and so on)

[YAML parser] Support bytes type

This is a follow-up of #235

The parser from #235 doesn't parse byte types, mainly because there is no native type in the yaml specification matching this.
TODO:

  • decide what type and tags use to map ROS bytes
  • extend the parser to implement it

Reasons intra/interprocess message transport isn't implemented transparent in rcl

After having a look at the implementation of the rclcpp I was wondering why there are special mechanisms implemented in the rclcpp for interprocess message transport and intraprocess message transport (there's an extra intra_process_manager)? Wouldn't it be more convenient to have these mechanism transparently implemented in the rcl? By transparent I mean: The client lib on top of the rcl doesn't have to care how the message is transported.

How to obtain rmw_message_info_t ?

I'm currently trying to create a C# wrapper for ROS2 based on the rcl lib.
At the moment I'm kind of stuck at the following function

rcl_take(
  const rcl_subscription_t * subscription,
  void * ros_message,
  rmw_message_info_t * message_info);

How can I obtain the rmw_message_info_t of a given message from which I've already got the rosidl_message_type_support_t ?

rcl_send_response can return a RCL_RET_CLIENT_INVALID?

According to the documentation the rcl_send_response function can return a RCL_RET_CLIENT_INVALID.

 * \return RCL_RET_OK if the response was sent successfully, or
 *         RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
 *         RCL_RET_CLIENT_INVALID if the service is invalid, or
 *         RCL_RET_ERROR if an unspecified error occurs.
 */
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_send_response(
  const rcl_service_t * service,
  rmw_request_id_t * response_header,
  void * ros_response);

Shouldn't this be a RCL_RET_SERVICE_INVALID ?

rcl_difference_times() function 32 bit overflow

rcl_difference_times() function can't process time diff > 2^31

Bug report

Required Info:

  • Operating System:
    • Ubuntu 16.04
  • Installation type:
    • Ardent Apalone
  • Version or commit hash:
    • NA
  • DDS implementation:
    • Default
  • Client library (if applicable):
    • rcl

Steps to reproduce issue

This test case would pass

Start: sec = 1514423496, nanosec = 0
Finish: sec = 1514423498, nanosec = 147483647
64 bit .nanoseconds: (1514423496000000000 - 1514423498147483647)
rcl_difference_times: delta.nanoseconds = 2147483647
Human readable result: { sec: 2, nanosec: 147483647 }

This test case would fail

Start: sec = 1514423496, nanosec = 0
Finish: sec = 1514423498, nanosec = 147483648
64 bit .nanoseconds: (1514423496000000000 - 1514423498147483648)
rcl_difference_times: delta.nanoseconds = -2147483648  // This is the issue
Human readable result: { sec: -2, nanosec: -147483648 }

Expected behavior

that rcl_difference_times() function can process diff > 2 ^ 31 (e.g. 3 seconds or greater)

Actual behavior

32 bit signed integer overflow

Additional information

I found this when I'm writing Node.js bindings to rcl

Obsolete API/header found in document

in `publisher.h', the embedded API document describes below usage, which is obsolete:

#include <rosidl_generator_c/message_type_support.h>
rosidl_message_type_support_t * string_ts =
  ROSIDL_GET_MESSAGE_TYPE_SUPPORT(std_msgs, String);

The correction might be:

#include <rosidl_generator_c/message_type_support_struct.h>
const rosidl_message_type_support_t * ts =
  ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String);

Some of them occur multiple times, e.g. the obsolete header is x3.

Static Remapping backreferences `\1` - `\9`

Feature request

Feature description

Implement references \1 - \9 for static remapping from command line arguments.
Implementing requires changing matching and replacement logic to store and use tokens that were captured by a wildcard.
This is blocked by having support for wild cards on the match side (#232 or #233).

Implementation considerations

Behavior of \1 \9 is described in the remapping design doc.

Wrong return number in types.h

I read some code for my C# wrapper and found these lines in the rcl types.h:

// rcl subscription specific ret codes in 4XX
#define RCL_RET_SUBSCRIPTION_INVALID 400
#define RCL_RET_SUBSCRIPTION_TAKE_FAILED 501
// rcl service client specific ret codes in 5XX
#define RCL_RET_CLIENT_INVALID 500
#define RCL_RET_CLIENT_TAKE_FAILED 501

Shouldn't be #define RCL_RET_SUBSCRIPTION_TAKE_FAILED 501 defined to 401 instead of 501 ?

use rcutils allocator

rcl_lifecycle currently uses malloc and free natively. This should be changed to the allocators in rcutils.

Static Remapping Single Token Wildcard `*`

Feature request

Feature description

Implement single token wildcard * for static remapping from command line arguments.
Implementing requires changing rcl_remap_t to store information about wildcards.
It also requires changing the matching logic to allow matching any token instead of doing a direct string comparison.

Implementation considerations

Behavior of * is described in the remapping design doc.

calling shutdown fails in examples_rclpy

When running examples_rclpy_minimal_service and examples_rclpy_minimal_client_async with Connext the second one fails with the following error message after handling the response properly:

[rmw|error_handling.c:93] error string being overwritten: rcl node is invalid, rcl instance id does not match, at .../src/ros2/rcl/rcl/src/rcl/node.c:191

In that case the code tries to destroy the rcl client but the rcl node handle already has a mismatch with the underlying rmw node id since the Python code has called shutdown (https://github.com/ros2/examples/blob/b57f9591d96432671978f0a4be8a1f928bde5016/rclpy/services/minimal_client/client_async.py#L48).

Linking errors for tests when using connext

Am having linking issues for at least the following tests:

  • rmw_connext_dynamic_cpp
    • test_client
    • service_fixture
    • client_fixture
    • test_allocator
    • test_time
    • test_publisher
  • rmw_connext_cpp
    • test_services
    • service_fixture
    • client_fixture
    • test_client

no issues for opensplice

the error is:

[ 82%] Building CXX object test/CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/rcl/test_wait.cpp.o
cd /home/dhood/ros2_ws/build_isolated/rcl/test && /usr/bin/c++   -DRMW_IMPLEMENTATION=rmw_connext_dynamic_cpp -DRTI_LINUX -DRTI_UNIX -I/home/dhood/ros2_ws/src/ros2/rcl/rcl/include -I/home/dhood/ros2_ws/install_isolated/gtest_vendor/src/gtest_vendor/gtest-1.7.0/include -I/home/dhood/ros2_ws/install_isolated/rosidl_generator_c/include -I/home/dhood/ros2_ws/install_isolated/rmw/include -I/home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/include -I/home/dhood/rti_connext_dds-5.2.3/include -I/home/dhood/rti_connext_dds-5.2.3/include/ndds -I/home/dhood/ros2_ws/install_isolated/rosidl_generator_cpp/include -I/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_c/include -I/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/impl -I/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_cpp/include -I/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/impl -I/home/dhood/ros2_ws/install_isolated/rcl_interfaces/include  -std=c++11 -Wall -Wextra   -o CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/rcl/test_wait.cpp.o -c /home/dhood/ros2_ws/src/ros2/rcl/rcl/test/rcl/test_wait.cpp
[ 83%] Linking CXX executable test_wait__rmw_connext_dynamic_cpp
cd /home/dhood/ros2_ws/build_isolated/rcl/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/link.txt --verbose=1
/usr/bin/c++    -std=c++11 -Wall -Wextra   CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/rcl/test_wait.cpp.o  -o test_wait__rmw_connext_dynamic_cpp  -L/home/dhood/rti_connext_dds-5.2.3/lib/x64Linux3gcc4.8.2 ../gtest/libgtest.a ../gtest/libgtest_main.a ../librcl__rmw_connext_dynamic_cpp.so -ldl memory_tools/librcl_memory_tools.so /home/dhood/ros2_ws/install_isolated/rmw/lib/librmw.so /home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib/librmw_connext_shared_cpp.so /home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib/librosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_c/lib/librosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_cpp/lib/librosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_dynamic_cpp/lib/librmw_connext_dynamic_cpp.so -lnddsc -lnddscore -lnddscpp -lrticonnextmsgcpp -lpthread /usr/lib/x86_64-linux-gnu/libdl.so -lpthread /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_connext_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_connext_cpp.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_opensplice_c.so /home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib/librcl_interfaces__rosidl_typesupport_opensplice_cpp.so -lcmxml -lcommonserv -ldcpsgapi -ldcpssac -lddsconfparser -lddsconf -lddsdatabase -lddsi2 -lddskernel -lddsosnet -lddsos -lddsserialization -lddsuser -lddsutil -ldurability -lspliced -ldcpssacpp /home/dhood/ros2_ws/install_isolated/rmw/lib/librmw.so /home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib/librmw_connext_shared_cpp.so /home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib/librosidl_generator_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_c/lib/librosidl_typesupport_introspection_c.so /home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_cpp/lib/librosidl_typesupport_introspection_cpp.so /home/dhood/ros2_ws/install_isolated/rmw_connext_dynamic_cpp/lib/librmw_connext_dynamic_cpp.so -lnddsc -lnddscore -lnddscpp -lrticonnextmsgcpp -lpthread /usr/lib/x86_64-linux-gnu/libdl.so -ldl -Wl,-rpath,/home/dhood/ros2_ws/build_isolated/rcl:/home/dhood/ros2_ws/build_isolated/rcl/test/memory_tools:/home/dhood/ros2_ws/install_isolated/rmw/lib:/home/dhood/ros2_ws/install_isolated/rmw_connext_shared_cpp/lib:/home/dhood/ros2_ws/install_isolated/rosidl_generator_c/lib:/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_c/lib:/home/dhood/ros2_ws/install_isolated/rosidl_typesupport_introspection_cpp/lib:/home/dhood/ros2_ws/install_isolated/rmw_connext_dynamic_cpp/lib:/home/dhood/rti_connext_dds-5.2.3/lib/x64Linux3gcc4.8.2:/home/dhood/ros2_ws/install_isolated/rcl_interfaces/lib 
/home/dhood/ros2_ws/install_isolated/rmw_connext_dynamic_cpp/lib/librmw_connext_dynamic_cpp.so: undefined reference to `connext::RequesterParams::service_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/dhood/ros2_ws/install_isolated/rmw_connext_dynamic_cpp/lib/librmw_connext_dynamic_cpp.so: undefined reference to `connext::check_retcode(DDS_ReturnCode_t, char const*, RTILogMessage const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
collect2: error: ld returned 1 exit status
test/CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/build.make:149: recipe for target 'test/test_wait__rmw_connext_dynamic_cpp' failed
make[2]: *** [test/test_wait__rmw_connext_dynamic_cpp] Error 1
make[2]: Leaving directory '/home/dhood/ros2_ws/build_isolated/rcl'
CMakeFiles/Makefile2:1812: recipe for target 'test/CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/all' failed
make[1]: *** [test/CMakeFiles/test_wait__rmw_connext_dynamic_cpp.dir/all] Error 2
make[1]: Leaving directory '/home/dhood/ros2_ws/build_isolated/rcl'
Makefile:141: recipe for target 'all' failed
make: *** [all] Error 2

<== Command '. /home/dhood/ros2_ws/build_isolated/rcl/cmake__build.sh && /usr/bin/make -j1' failed with exit code '2'

seems to be a problem with rmw_connext_dynamic_cpp/lib/librmw_connext_dynamic_cpp.so
same issue when using connext 5.2.0 instead of 5.2.3.

looking into it

More tests

Timers, more waitset test coverage, etc.

rcl_init called multiple times

From @BrannonKing on March 30, 2017 15:50

I'm getting the error below when attempting to use rmw_opensplice in the current (Mar 29) codebase. I'm running a Gazebo simulation. I'm guessing that Gazebo loads all the plugins into the same process, which causes this error. It seems I can eat the error and still run fine. I just wondered if we should track the initialization state in the RMW.

[rmw|error_handling.c:93] error string being overwritten: rcl_init called while already initialized, at src/ros2/rcl/rcl/src/rcl/rcl.c:69
failed to initialize rmw implementation: rcl_init called while already initialized, at src/ros2/rcl/rcl/src/rcl/rcl.c:69

Copied from original issue: ros2/rmw_opensplice#165

rcl/rosidl arrays - need some help understanding

I'm currently trying to implement arrays in my .net wrapper. At the moment I'm running into some problems. Let's take an int8 array for example:

On C side the struct for the array contains three entries:

typedef struct rosidl_generator_c__int8__Array
{
    int8* data;
    size_t size;
    size_t capacity;
}rosidl_generator_c__int8__Array;

As far as I understand the initialization code for the arrays I have to insert a pointer into the data field, and insert the amount of array elements into the size field. The capacity field is the same value as the size field. Is this correct?

@esteve Are there any other traps you could imagine when passing arrays from .net to native code that invoke this error?

terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException'
what(): Not enough memory in the buffer stream

At the moment I',m doing the marshalling by hand: For example for the int8 array:

[StructLayout(LayoutKind.Sequential)]
    public struct rosidl_generator_c__primitive_array_int8
    {   
        public IntPtr Data ;
        UIntPtr Size;
        UIntPtr Capacity;


        public rosidl_generator_c__primitive_array_int8(byte[] _Data)
        {

            Data = Marshal.AllocHGlobal (_Data.Length);//Marshal.SizeOf<byte> ()*_Data.Length);
            Size = (UIntPtr) _Data.Length;
            Capacity = Size;
            Marshal.Copy (_Data, 0, Data, _Data.Length);
        }
        public byte[] Array
        {
            get{ byte[] tempArray = new byte[(int)Size]; 
                Marshal.Copy (Data, tempArray, 0, (int)Size);
                return tempArray;}
        }
        public int ArraySize
        {
            get{return (int)Size;}
        }
        public int ArrayCapacity
        {
            get{ return (int)Capacity;}
        }
    }

Error message is being overwritten in rcl_lifecycle tests

If you look at one of the recent nightly tests, and look for "is being overwritten", you can see that the tests for rcl_lifecycle are causing an error message to be lost. We should probably fix this so that the first error causes the whole thing to return the error message, and not get lost later on.

Is documentation for reallocate consistent?

https://github.com/ros2/rcl/blob/master/rcl/include/rcl/allocator.h#L45-L52

The comment for "reallocate" implies to me that if the field is left null, then a reallocate function will be constructed from "deallocate" and "allocate". I wasn't sure where in the implementation this actually happens though; it seems as if realloc will simply throw an error in this case.

https://github.com/ros2/rcl/blob/master/rcl/src/rcl/allocator.c#L54-L64

There are also several places were an error is returned in reallocate is null, e.g. https://github.com/ros2/rcl/blob/master/rcl/src/rcl/wait.c#L126-L127

It's not an issue in terms of what's needed in the implementation, but we should take a moment to make sure implementation and documentation are consistent.

Unused variable warning when compiling in `RelWithDebInfo`

The problem is that the variable is only referenced inside an assert(), which is presumably being compiled out under RelWithDebInfo.

Building C object CMakeFiles/rcl__rmw_opensplice_cpp.dir/src/rcl/timer.c.o
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c: In function ‘__wait_set_clean_up’:
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c:66:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
   rcl_ret_t ret;
             ^
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c: In function ‘rcl_wait’:
/home/gerkey/ros2_ws/src/ros2/rcl/rcl/src/rcl/wait.c:431:15: warning: variable ‘rcl_ret’ set but not used [-Wunused-but-set-variable]
     rcl_ret_t rcl_ret;
               ^

rcl_take - documentation doesn't match with code

The documentation to the rcl_take function states that there should be a:

param[out] taken pointer to a bool, if set to false a message was not taken

But the he function itself has only a declaration with 3 arguments:

rcl_ret_t
rcl_take(
  const rcl_subscription_t * subscription,
  void * ros_message,
  rmw_message_info_t * message_info);

Error in stdatomic_helper.h while compiling with gcc version > 5

I get the following error while compiling ROS2 with gcc (Debian 5.3.1-4) 5.3.1 20151219

error: missing binary operator before token "("
 #elif defined(__clang__) && defined(__has_feature) && !__has_feature(c_atomic)

It compiles when I change line 23 in stdatomic_helper.h from

#elif defined(__clang__) && defined(__has_feature) && !__has_feature(c_atomic)

to

#elif defined(__clang__) && defined(__has_feature) 

on my server with gcc (Debian 4.9.2-10) 4.9.2 it compiles without any errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.