-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
227 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: DV Tasking Issue | ||
about: Issue template for subteam tasking | ||
title: "[SUBTEAM]-[Project name]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Task Description: | ||
... | ||
|
||
## Task Check-list: | ||
- [ ] ... | ||
- [ ] Write integration tests | ||
- [ ] Add Documentation (to Confluence too) | ||
- [ ] Open Pull Request | ||
|
||
## Task Timeline: | ||
- [ ] Update [Jira](cmr.red/jira) with Task Timeline | ||
|
||
Comment any questions and tag reviewers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Pull Request | ||
Addresses Issue #__ ([issue name]) | ||
|
||
### Description | ||
Explain any proposed changes here. | ||
|
||
### Check-list | ||
- [ ] Integration tests pass | ||
- [ ] Code Documented (and Confluence documentation updated) | ||
- [ ] Reviewer 1 approved | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: cmr-fsdv | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
pip install --upgrade --upgrade-strategy eager -r requirements.txt | ||
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
|
||
# - name: Lint with flake8 | ||
# run: | | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include <chrono> | ||
#include <functional> | ||
#include <memory> | ||
#include <string> | ||
|
||
#include "rclcpp/rclcpp.hpp" | ||
#include "std_msgs/msg/string.hpp" | ||
|
||
using namespace std::chrono_literals; | ||
|
||
/* This example creates a subclass of Node and uses std::bind() to register a | ||
* member function as a callback from the timer. */ | ||
|
||
class MinimalPublisher : public rclcpp::Node | ||
{ | ||
public: | ||
MinimalPublisher() | ||
: Node("minimal_publisher"), count_(0) | ||
{ | ||
publisher_ = this->create_publisher<std_msgs::msg::String>("topic", 10); | ||
timer_ = this->create_wall_timer( | ||
500ms, std::bind(&MinimalPublisher::timer_callback, this)); | ||
} | ||
|
||
private: | ||
void timer_callback() | ||
{ | ||
auto message = std_msgs::msg::String(); | ||
message.data = "Hello, world! " + std::to_string(count_++); | ||
RCLCPP_INFO(this->get_logger(), "Publishing: '%s'", message.data.c_str()); | ||
publisher_->publish(message); | ||
} | ||
rclcpp::TimerBase::SharedPtr timer_; | ||
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr publisher_; | ||
size_t count_; | ||
}; | ||
|
||
int main(int argc, char * argv[]) | ||
{ | ||
rclcpp::init(argc, argv); | ||
rclcpp::spin(std::make_shared<MinimalPublisher>()); | ||
rclcpp::shutdown(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <memory> | ||
|
||
#include "rclcpp/rclcpp.hpp" | ||
#include "std_msgs/msg/string.hpp" | ||
using std::placeholders::_1; | ||
|
||
class MinimalSubscriber : public rclcpp::Node | ||
{ | ||
public: | ||
MinimalSubscriber() | ||
: Node("minimal_subscriber") | ||
{ | ||
subscription_ = this->create_subscription<std_msgs::msg::String>( | ||
"topic", 10, std::bind(&MinimalSubscriber::topic_callback, this, _1)); | ||
} | ||
|
||
private: | ||
void topic_callback(const std_msgs::msg::String::SharedPtr msg) const | ||
{ | ||
RCLCPP_INFO(this->get_logger(), "I heard: '%s'", msg->data.c_str()); | ||
} | ||
rclcpp::Subscription<std_msgs::msg::String>::SharedPtr subscription_; | ||
}; | ||
|
||
int main(int argc, char * argv[]) | ||
{ | ||
rclcpp::init(argc, argv); | ||
rclcpp::spin(std::make_shared<MinimalSubscriber>()); | ||
rclcpp::shutdown(); | ||
return 0; | ||
} |