Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issues identified while investigating #21 #22

Merged
merged 22 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5f007c2
Use Rolling in README's Quick Start
asorbini Mar 30, 2021
229fc36
Allow deletion of waited objects
asorbini Mar 31, 2021
fb22d2f
Only invalidate waitsets when free
asorbini Apr 1, 2021
fbb312a
Use C++ std WaitSets by default
asorbini Apr 1, 2021
3c76ca3
Protect status updates with mutex
asorbini Apr 1, 2021
efde9af
Remove commented out code and add wait assertion
asorbini Apr 1, 2021
4262e7a
Improved implementation of client::is_service_available for Connext Pro
asorbini Apr 2, 2021
80524f7
Only add request header to typecode with Basic req/rep profile
asorbini Apr 2, 2021
afe28ee
Uncrustify errors
asorbini Apr 2, 2021
c812e7c
Enable new is_service_available for Micro too
asorbini Apr 2, 2021
0b8fd8a
Resolve linter errors
asorbini Apr 3, 2021
e090686
Remove unnecessary boolean flags
asorbini Apr 5, 2021
876ba51
Avoid race conditions between WaitSets and Conditions
asorbini Apr 5, 2021
8922b29
Cache data available in the RMW
asorbini Apr 6, 2021
ce1401e
Protect data available with waitset lock
asorbini Apr 6, 2021
b35d211
Clean up waitset synchronization
asorbini Apr 6, 2021
a5f5e74
Disable DDS-based WaitSet implementation
asorbini Apr 6, 2021
2715a2f
Remove commented/unused code
asorbini Apr 6, 2021
71df269
Resolve compiler warnings for unused variables
asorbini Apr 7, 2021
dc75a84
* Avoid topic name validation in get_info functions
asorbini Apr 9, 2021
7de7492
Restore checks for valid topic name
asorbini Apr 9, 2021
ce3f86d
Remove DDS-based WaitSet implementation
asorbini Apr 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ For any questions or feedback, feel free to reach out to robotics@rti.com.

## Quick Start

1. Load ROS into the shell environment, e.g. if you are using Foxy:
1. Load ROS into the shell environment (Rolling if using the `master` branch,
see [Support for different ROS 2 Releases](#support-for-different-ros-2-releases))

```sh
source /opt/ros/foxy/setup.bash
source /opt/ros/rolling/setup.bash
```

2. Configure RTI Connext DDS Professional and/or RTI Connext DDS Micro on your
Expand Down
4 changes: 4 additions & 0 deletions rmw_connextdds_common/include/rmw_connextdds/dds_api_ndds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ typedef RMW_Connext_Uint8ArrayPtrSeq RMW_Connext_UntypedSampleSeq;
// the guid with 0's.
#define DDS_SampleIdentity_UNKNOWN DDS_SAMPLEIDENTITY_DEFAULT

// Convenience function to compare the first 12 bytes of the handle
#define DDS_InstanceHandle_compare_prefix(ih_a_, ih_b_) \
memcmp((ih_a_)->keyHash.value, (ih_b_)->keyHash.value, 12)

#endif // RMW_CONNEXTDDS__DDS_API_NDDS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ struct DDS_LifespanQosPolicy;
// the guid with 0's.
#define DDS_SampleIdentity_UNKNOWN DDS_SAMPLE_IDENTITY_UNKNOWN

// Convenience function to compare the first 12 bytes of the handle
#define DDS_InstanceHandle_compare_prefix(ih_a_, ih_b_) \
memcmp((ih_a_)->octet, (ih_b_)->octet, 12)

#endif // RMW_CONNEXTDDS__DDS_API_RTIME_HPP_
14 changes: 6 additions & 8 deletions rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,13 @@ class RMW_Connext_Subscriber
qos(rmw_qos_profile_t * const qos);

rmw_ret_t
loan_messages();
loan_messages(const bool update_condition = true);

rmw_ret_t
return_messages();

rmw_ret_t
loan_messages_if_needed()
loan_messages_if_needed(const bool update_condition = true)
{
rmw_ret_t rc = RMW_RET_OK;

Expand All @@ -389,16 +389,12 @@ class RMW_Connext_Subscriber
}
}
/* loan messages from reader */
rc = this->loan_messages();
rc = this->loan_messages(update_condition);
if (RMW_RET_OK != rc) {
return rc;
}
}

if (this->internal) {
return this->status_condition.trigger_loan_guard_condition(this->loan_len > 0);
}

return RMW_RET_OK;
}

Expand Down Expand Up @@ -441,7 +437,9 @@ class RMW_Connext_Subscriber
has_data()
{
std::lock_guard<std::mutex> lock(this->loan_mutex);
if (RMW_RET_OK != this->loan_messages_if_needed()) {
if (RMW_RET_OK !=
this->loan_messages_if_needed(false /* update_condition */))
{
RMW_CONNEXT_LOG_ERROR("failed to check loaned messages")
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ enum RMW_Connext_WaitSetState
RMW_CONNEXT_WAITSET_FREE,
RMW_CONNEXT_WAITSET_ACQUIRING,
RMW_CONNEXT_WAITSET_BLOCKED,
RMW_CONNEXT_WAITSET_RELEASING,
RMW_CONNEXT_WAITSET_INVALIDATING
RMW_CONNEXT_WAITSET_RELEASING
};

class RMW_Connext_WaitSet
Expand Down
Loading