Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:
1. Clone repo '...'
2. Add these lines '...'
3. Run the script '....'
4. See error
Code or shell commands ready to be copy-pasted are welcome.

**Expected behaviour**
A clear and concise description of what you expected to happen.

**System information (please complete the following information):**
- OS: [e.g. WIndows 10, Ubuntu 16.04, ...]
- ROS 2 [e.g. Dashing, Foxy, ...]
- Version [e.g. commit hash, tag, ...]

**Additional context**
Add any other context about the problem here.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI micro-ROS Agent

on:
pull_request:
branches:
- '**'

jobs:

microros_agent_ci:
runs-on: ubuntu-20.04
container: ros:foxy

steps:
- uses: actions/checkout@v2
with:
path: src/micro_ros_agent

- name: Download dependencies
run: |
git clone -b foxy https://github.com/eProsima/Micro-XRCE-DDS-Agent src/microxrcedds_agent

- name: Build
run: |
. /opt/ros/foxy/setup.sh
colcon build
65 changes: 60 additions & 5 deletions micro_ros_agent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,74 @@ project(micro_ros_agent LANGUAGES CXX)

find_package(ament_cmake REQUIRED)
find_package(microxrcedds_agent REQUIRED)
find_package(rosidl_cmake REQUIRED)
find_package(fastcdr REQUIRED)
find_package(fastrtps REQUIRED)
find_package(fastrtps_cmake_module REQUIRED)
find_package(rmw_dds_common REQUIRED)
find_package(rmw REQUIRED)
find_package(rcutils REQUIRED)
find_package(rmw_fastrtps_shared_cpp REQUIRED)

find_package(ament_lint_auto REQUIRED)

find_package(rosidl_typesupport_fastrtps_cpp REQUIRED)
find_package(rosidl_runtime_cpp REQUIRED)
find_package(rosidl_typesupport_cpp REQUIRED)
find_package(ament_cmake_gtest REQUIRED)

find_package(micro_ros_msgs REQUIRED)

add_executable(${PROJECT_NAME}
src/main.cpp
src/agent/Agent.cpp
src/agent/graph_manager/graph_manager.cpp
src/agent/graph_manager/graph_typesupport.cpp
src/agent/utils/demangle.cpp
)

add_executable(${PROJECT_NAME} src/main.cpp)
target_include_directories(${PROJECT_NAME}
PRIVATE
include
)

ament_target_dependencies(${PROJECT_NAME}
rosidl_typesupport_fastrtps_cpp
rosidl_runtime_cpp
rosidl_typesupport_cpp
fastcdr
fastrtps
rmw_dds_common
rmw
rmw_fastrtps_shared_cpp
micro_ros_msgs
)

target_link_libraries(${PROJECT_NAME}
microxrcedds_agent
fastcdr
fastrtps
$<$<BOOL:$<PLATFORM_ID:Linux>>:rt>
$<$<BOOL:$<PLATFORM_ID:Linux>>:dl>
)

target_compile_options(${PROJECT_NAME}
PRIVATE
microxrcedds_agent
$<$<BOOL:$<PLATFORM_ID:Linux>>:rt>
$<$<BOOL:$<PLATFORM_ID:Linux>>:dl>
$<$<C_COMPILER_ID:GNU>:-Wall>
$<$<C_COMPILER_ID:GNU>:-Wextra>
$<$<C_COMPILER_ID:GNU>:-pedantic>
)

set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD
14
CXX_STANDARD_REQUIRED
YES
)

set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD
11
14
CXX_STANDARD_REQUIRED
YES
)
Expand Down
49 changes: 49 additions & 0 deletions micro_ros_agent/include/agent/Agent.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef _UROS_AGENT_AGENT_HPP
#define _UROS_AGENT_AGENT_HPP

#include <uxr/agent/AgentInstance.hpp>
#include <uxr/agent/middleware/Middleware.hpp>
#include <uxr/agent/middleware/utils/Callbacks.hpp>

#include <agent/graph_manager/graph_manager.hpp>
// TODO(jamoralp): class Documentation
namespace uros {
namespace agent {

class Agent
{
public:

Agent();

~Agent() = default;

bool create(
int argc,
char** argv);

void run();

private:

eprosima::uxr::AgentInstance& xrce_dds_agent_instance_;
std::unique_ptr<graph_manager::GraphManager> graph_manager_;
};

} // namespace agent
} // namespace uros
#endif // _UROS_AGENT_AGENT_HPP
Loading