Skip to content

Commit

Permalink
Merge pull request #37 from Juancams/rolling
Browse files Browse the repository at this point in the history
Rolling support
  • Loading branch information
fmrico authored Nov 8, 2024
2 parents a489bb5 + c3c8790 commit 9609629
Show file tree
Hide file tree
Showing 23 changed files with 419 additions and 590 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/jazzy-devel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: jazzy-devel

on:
pull_request:
branches:
- jazzy-devel
push:
branches:
- jazzy-devel


jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
fail-fast: false
steps:
- name: Install popf deps
run: sudo apt-get install libfl-dev
- uses: actions/checkout@v2
- name: Setup ROS 2
uses: ros-tooling/[email protected]
with:
required-ros-distributions: jazzy
- name: build and test
uses: ros-tooling/[email protected]
with:
package-name: br2_basics br2_bt_bumpgo br2_bt_patrolling br2_fsm_bumpgo_cpp br2_fsm_bumpgo_py br2_navigation br2_tf2_detector br2_tiago br2_tracking br2_tracking_msgs br2_vff_avoidance
target-ros2-distro: jazzy
vcs-repo-file-url: ${GITHUB_WORKSPACE}/third_parties.repos
colcon-defaults: |
{
"test": {
"parallel-workers" : 1
}
}
36 changes: 0 additions & 36 deletions .github/workflows/main.yaml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/rolling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: rolling

on:
pull_request:
branches:
- rolling
push:
branches:
- rolling


jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
fail-fast: false
steps:
- name: Install popf deps
run: sudo apt-get install libfl-dev
- uses: actions/checkout@v2
- name: Setup ROS 2
uses: ros-tooling/[email protected]
with:
required-ros-distributions: rolling
- name: build and test
uses: ros-tooling/[email protected]
with:
package-name: br2_basics br2_bt_bumpgo br2_bt_patrolling br2_fsm_bumpgo_cpp br2_fsm_bumpgo_py br2_navigation br2_tf2_detector br2_tiago br2_tracking br2_tracking_msgs br2_vff_avoidance
target-ros2-distro: rolling
vcs-repo-file-url: ${GITHUB_WORKSPACE}/third_parties.repos
colcon-defaults: |
{
"test": {
"parallel-workers" : 1
}
}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A Concise Introduction to Robot Programming with ROS2 - Code Repository

[![GitHub Action
Status](https://github.com/fmrico/book_ros2/workflows/main/badge.svg)](https://github.com/fmrico/book_ros2)
[![rolling](https://github.com/fmrico/book_ros2/actions/workflows/rolling.yaml/badge.svg)](https://github.com/fmrico/book_ros2/actions/workflows/rolling.yaml)
[![jazzy-devel](https://github.com/fmrico/book_ros2/actions/workflows/jazzy-devel.yaml/badge.svg)](https://github.com/fmrico/book_ros2/actions/workflows/jazzy-devel.yaml)
[![GitHub Action
Status](https://github.com/fmrico/book_ros2/actions/workflows/humble-devel.yaml/badge.svg?branch=humble-devel)](https://github.com/fmrico/book_ros2)
[![GitHub Action
Expand All @@ -11,11 +11,13 @@ Status](https://github.com/fmrico/book_ros2/workflows/foxy-devel/badge.svg)](htt

This repository contains the source code shown and analyzed in book _A Concise Introduction to Robot Programming with ROS2_, as well as complementary teaching material that will be added.

**Requirements for `main` branch**: Ubuntu 22.04 LTS + ROS2 Humble Hawksbill
**Requirements for `rolling` branch**: Ubuntu 24.04 LTS + ROS 2 Rolling Ridley

**Requirements for `jazzy-devel` branch**: Ubuntu 24.04 LTS + ROS 2 Jazzy Jalisco

**Requirements for `humble-devel` branch**: Ubuntu 22.04 LTS + ROS2 Humble Hawksbill
**Requirements for `humble-devel` branch**: Ubuntu 22.04 LTS + ROS 2 Humble Hawksbill

**Requirements for `foxy-devel` branch**: Ubuntu 20.04 LTS + ROS2 Foxy Fitzroy
**Requirements for `foxy-devel` branch**: Ubuntu 20.04 LTS + ROS 2 Foxy Fitzroy

## Slides

Expand Down
2 changes: 1 addition & 1 deletion br2_bt_patrolling/launch/patrolling.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def generate_launch_description():
}],
remappings=[
('input_scan', '/scan_raw'),
('output_vel', '/nav_vel')
('output_vel', '/cmd_vel')
],
output='screen'
)
Expand Down
16 changes: 8 additions & 8 deletions br2_bt_patrolling/src/br2_bt_patrolling/GetWaypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ GetWaypoint::GetWaypoint(
wp.pose.orientation.w = 1.0;

// recharge wp
wp.pose.position.x = 3.67;
wp.pose.position.y = -0.24;
wp.pose.position.x = -1.0;
wp.pose.position.y = 4.14;
recharge_point_ = wp;

// wp1
wp.pose.position.x = 1.07;
wp.pose.position.y = -12.38;
wp.pose.position.x = 6.7;
wp.pose.position.y = -2.54;
waypoints_.push_back(wp);

// wp2
wp.pose.position.x = -5.32;
wp.pose.position.y = -8.85;
wp.pose.position.x = 0.45;
wp.pose.position.y = -3.9;
waypoints_.push_back(wp);

// wp3
wp.pose.position.x = -0.56;
wp.pose.position.y = 0.24;
wp.pose.position.x = -6.01;
wp.pose.position.y = -0.3;
waypoints_.push_back(wp);
}

Expand Down
36 changes: 18 additions & 18 deletions br2_bt_patrolling/tests/bt_action_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ TEST(bt_action, get_waypoint_btn)
auto point = blackboard->get<geometry_msgs::msg::PoseStamped>("waypoint");

ASSERT_EQ(counter, 1);
ASSERT_NEAR(point.pose.position.x, 3.67, 0.0000001);
ASSERT_NEAR(point.pose.position.y, -0.24, 0.0000001);
ASSERT_NEAR(point.pose.position.x, -1.0, 0.0000001);
ASSERT_NEAR(point.pose.position.y, 4.14, 0.0000001);
}

{
Expand Down Expand Up @@ -354,22 +354,22 @@ TEST(bt_action, get_waypoint_btn)

const auto & waypoints = StoreWP::waypoints_;
ASSERT_EQ(waypoints.size(), 7);
ASSERT_NEAR(waypoints[0].pose.position.x, 1.07, 0.0000001);
ASSERT_NEAR(waypoints[0].pose.position.y, -12.38, 0.0000001);
ASSERT_NEAR(waypoints[1].pose.position.x, -5.32, 0.0000001);
ASSERT_NEAR(waypoints[1].pose.position.y, -8.85, 0.0000001);
ASSERT_NEAR(waypoints[2].pose.position.x, -0.56, 0.0000001);
ASSERT_NEAR(waypoints[2].pose.position.y, 0.24, 0.0000001);

ASSERT_NEAR(waypoints[3].pose.position.x, 3.67, 0.0000001);
ASSERT_NEAR(waypoints[3].pose.position.y, -0.24, 0.0000001);

ASSERT_NEAR(waypoints[4].pose.position.x, 1.07, 0.0000001);
ASSERT_NEAR(waypoints[4].pose.position.y, -12.38, 0.0000001);
ASSERT_NEAR(waypoints[5].pose.position.x, -5.32, 0.0000001);
ASSERT_NEAR(waypoints[5].pose.position.y, -8.85, 0.0000001);
ASSERT_NEAR(waypoints[6].pose.position.x, -0.56, 0.0000001);
ASSERT_NEAR(waypoints[6].pose.position.y, 0.24, 0.0000001);
ASSERT_NEAR(waypoints[0].pose.position.x, 6.7, 0.0000001);
ASSERT_NEAR(waypoints[0].pose.position.y, -2.54, 0.0000001);
ASSERT_NEAR(waypoints[1].pose.position.x, 0.45, 0.0000001);
ASSERT_NEAR(waypoints[1].pose.position.y, -3.9, 0.0000001);
ASSERT_NEAR(waypoints[2].pose.position.x, -6.01, 0.0000001);
ASSERT_NEAR(waypoints[2].pose.position.y, -0.3, 0.0000001);

ASSERT_NEAR(waypoints[3].pose.position.x, -1.0, 0.0000001);
ASSERT_NEAR(waypoints[3].pose.position.y, 4.14, 0.0000001);

ASSERT_NEAR(waypoints[4].pose.position.x, 6.7, 0.0000001);
ASSERT_NEAR(waypoints[4].pose.position.y, -2.54, 0.0000001);
ASSERT_NEAR(waypoints[5].pose.position.x, 0.45, 0.0000001);
ASSERT_NEAR(waypoints[5].pose.position.y, -3.9, 0.0000001);
ASSERT_NEAR(waypoints[6].pose.position.x, -6.01, 0.0000001);
ASSERT_NEAR(waypoints[6].pose.position.y, -0.3, 0.0000001);
}
}

Expand Down
2 changes: 1 addition & 1 deletion br2_fsm_bumpgo_cpp/launch/bump_and_go.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def generate_launch_description():
}],
remappings=[
('input_scan', '/scan_raw'),
('output_vel', '/nav_vel')
('output_vel', '/cmd_vel')
])

ld = LaunchDescription()
Expand Down
2 changes: 1 addition & 1 deletion br2_fsm_bumpgo_py/launch/bump_and_go.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def generate_launch_description():
}],
remappings=[
('input_scan', '/scan_raw'),
('output_vel', '/nav_vel')
('output_vel', '/cmd_vel')
])

ld = LaunchDescription()
Expand Down
Loading

0 comments on commit 9609629

Please sign in to comment.