Skip to content

Commit

Permalink
Fix/build (#150)
Browse files Browse the repository at this point in the history
* Include array, use cyclonedds tag from ROS 2 Humble

Signed-off-by: Aaron Chong <[email protected]>

* Revert version

Signed-off-by: Aaron Chong <[email protected]>

* Update readme with important note

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth authored Oct 16, 2024
1 parent d385372 commit 0909836
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

## About

Welcome to `free_fleet`, an open-source robot fleet management system.
Welcome to `free_fleet`, an open-source robot fleet management system.
Sometimes it is called the "Fun Free Fleet For Friends" (F5).

**Note**, this repository is under active development. Things will be quite unstable
Expand Down Expand Up @@ -53,6 +53,9 @@ sudo apt update && sudo apt install \
# maven default-jdk # Uncomment to install dependencies for message generation
```

> [!IMPORTANT]
> In order to ensure messages using `cyclonedds` are sent, received, serialized and deserialized properly between the ROS 1 and ROS 2 systems, the version of `cyclonedds` used/built should be the same, this can be checked with `dpkg -l | grep cyclonedds` on ROS 2 systems, while ROS 1 systems will need to build `cyclonedds` from source. For ROS 2 versions above `galactic`, users will need to manage the versions of `cyclonedds` themselves. We are working on a newer iteration of `free_fleet` that does not use DDS and has access to newer features of `Open-RMF`, stay tuned!
</br>

### Message Generation
Expand Down Expand Up @@ -111,7 +114,7 @@ cd ~/ff_ros2_ws
rosdep install --from-paths src --ignore-src --rosdistro galactic -yr
```

Source ROS 2 and build,
Source ROS 2 and build,

```bash
cd ~/ff_ros2_ws
Expand Down
11 changes: 6 additions & 5 deletions free_fleet/src/dds_utils/DDSSubscribeHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef FREE_FLEET__SRC__DDS_UTILS__DDSSUBSCRIBEHANDLER_HPP
#define FREE_FLEET__SRC__DDS_UTILS__DDSSUBSCRIBEHANDLER_HPP

#include <array>
#include <memory>
#include <vector>

Expand All @@ -40,9 +41,9 @@ class DDSSubscribeHandler
const dds_topic_descriptor_t* topic_desc;

dds_entity_t topic;

dds_entity_t reader;

std::array<std::shared_ptr<Message>, MaxSamplesNum> shared_msgs;

void* samples[MaxSamplesNum];
Expand All @@ -54,8 +55,8 @@ class DDSSubscribeHandler
public:

DDSSubscribeHandler(
const dds_entity_t& _participant,
const dds_topic_descriptor_t* _topic_desc,
const dds_entity_t& _participant,
const dds_topic_descriptor_t* _topic_desc,
const std::string& _topic_name) :
topic_desc(_topic_desc)
{
Expand Down Expand Up @@ -111,7 +112,7 @@ class DDSSubscribeHandler
msgs.clear();
return msgs;
}

if (return_code > 0)
{
for (size_t i = 0; i < MaxSamplesNum; ++i)
Expand Down

0 comments on commit 0909836

Please sign in to comment.