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

Jazzy 2.0 RC #56

Draft
wants to merge 21 commits into
base: jazzy
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ca94a7e
Rename ign_ -> gz_ for gazebo dependencies
civerachb-cpr Oct 21, 2024
442530e
Fix formatting for Jazzy
civerachb-cpr Nov 6, 2024
5ce5c0f
Fix import orders in clearpath_gz
civerachb-cpr Nov 6, 2024
5df7436
Update CI for Jazzy
civerachb-cpr Nov 6, 2024
8e3c850
Add source CI
civerachb-cpr Nov 6, 2024
8f515f7
Typo in CI
civerachb-cpr Nov 7, 2024
ccee385
Change dependency branches
civerachb-cpr Nov 7, 2024
0f7f910
Add a newline that the source CI is complaining about that didn't sho…
civerachb-cpr Nov 7, 2024
9c35c34
Merge pull request #54 from clearpathrobotics/cib/jazzy-fixes
tonybaltovski Nov 12, 2024
a5cd4ae
Rename Gazbo libraries (#55)
civerachb-cpr Nov 21, 2024
adb42a6
Add more simulation environments (#57)
civerachb-cpr Nov 25, 2024
5dd578b
Increase the XY scaling of the pipeline world (#58)
civerachb-cpr Nov 25, 2024
872950d
Add launch instructions, screenshots for new worlds (#59)
civerachb-cpr Nov 25, 2024
48924b5
Rotate the solar_farm world so the solar panels are correctly facing …
civerachb-cpr Nov 26, 2024
fe4ee05
Rotate the pipeline world so the solar panels face south. Adjust the …
civerachb-cpr Nov 26, 2024
879b282
Add GeoTif files, instructions for generating map tiles (#60)
civerachb-cpr Nov 29, 2024
fc92361
Add pan & tilt velocity commands (#64)
civerachb-cpr Dec 6, 2024
3efc1fd
Implement PTZ action server interface (#65)
civerachb-cpr Dec 10, 2024
e2984b4
Add A300 to supported platforms (#63)
civerachb-cpr Dec 16, 2024
64faf39
Non-functional linting issues resulting in CI failures (#67)
civerachb-cpr Dec 17, 2024
5bf3b63
Fix typo in IMU bridge node
civerachb-cpr Dec 17, 2024
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
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,33 @@ on:

jobs:
build_and_test:
name: humble
name: jazzy
strategy:
matrix:
env:
- {ROS_DISTRO: humble, ROS_REPO: testing}
- {ROS_DISTRO: humble, ROS_REPO: main}
- {ROS_DISTRO: jazzy, ROS_REPO: testing}
- {ROS_DISTRO: jazzy, ROS_REPO: main}
fail-fast: false
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}

clearpath_simulator_src_ci:
name: Jazzy Clearpath Source
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: jazzy
- uses: ros-tooling/action-ros-ci@v0.3
id: action_ros_ci_step
with:
target-ros2-distro: jazzy
package-name: |
clearpath_generator_gz
clearpath_gz
clearpath_simulator
vcs-repo-file-url: dependencies.repos
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
devel/
logs/
build/
bin/
lib/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py
build_isolated/
devel_isolated/

# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
/cfg/*.py

# Ignore generated docs
*.dox
*.wikidoc

# eclipse stuff
.project
.cproject

# qcreator stuff
CMakeLists.txt.user

srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user

/planning/cfg
/planning/docs
/planning/src

*~

# Emacs
.#*

# VS Code
.vscode

# Catkin custom files
CATKIN_IGNORE
58 changes: 51 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
## Setup

Prerequisites:
- Install [ROS 2 Humble](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
- Install [ROS 2 Jazzy](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debians.html)

### Ignition Fortress
### Gazebo Harmonic

See [Gazebo Installation](https://gazebosim.org/docs/latest/ros_installation/) for more information
on installing Gazebo.

```
sudo apt-get update && sudo apt-get install wget
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update && sudo apt-get install ignition-fortress
sudo apt-get install ros-${ROS_DISTRO}-ros-gz
```

### Workspace
Expand All @@ -37,4 +37,48 @@ Copy your `robot.yaml` into `~/clearpath`

```
ros2 launch clearpath_gz simulation.launch.py
```
```

## Worlds

The `clearpath_gz` package includes several simulation worlds. To select a specific world, use the
`world` launch parameter, e.g.
```
ros2 launch clearpath_gz simulation.launch.py world:=pipeline
```

Available worlds are:

| World | Description | Screenshots | Geographic Location |
|-----------------------|------------------------------------------------------------------------------------------------------------------------|------------------------------|--------------------------|
| `construction` | The same floorplan as the `office` world, but under construction. Features non-solid walls and debris piles. | [link](docs/construction.md) | Waterloo ON, Canada |
| `office` | The same floorplan as the `construction` world. Features narrow hallways, doorways, meeting rooms, and loading docks. | [link](docs/office.md) | Waterloo ON, Canada |
| `orchard` | An outdoor, agricultural environment featuring rows of trees. The terrain has small slopes, but is mostly flat. | [link](docs/orchard.md) | Nikea, Greece |
| `pipeline` | A rugged, outdoor environment featuring steeper hills, a river and bridge, a small cave, solar panels, and a pipeline. | [link](docs/pipeline.md) | Northern Alberta, Canada |
| `solar_farm` | An outdoor, agricultural environmentf featuring gentle hills, a barn, rows of solar panels, and fences. | [link](docs/solar_farm.md) | Stonewall MB, Canada |
| `warehouse` (default) | A flat, indoor warehouse environment. Features shelves and people. | [link](docs/warehouse.md) | Rio de Janeiro, Brazil |


## Creating Map Tiles

The `orchard`, `pipeline`, and `solar_farm` worlds include geotagged TIF images in the `geotif`
directory. These images can be used to generate map tiles of the simulation environment, if
desired.

To generate the tiles, first install the `gdal-bin` package:
```bash
sudo apt install gdal-bin
```

Then run the following command to generate the tiles:
```bash
gdal2tiles.py $(ros2 pkg prefix clearpath_gz)/share/clearpath_gz/geotif/WORLD_geo.tif
```
substituting `WORLD` with `orchard`, `pipeline`, or `solar_farm`.

The generated files will be located in the current working directory in a new directory called
`WORLD_geo` (e.g. `pipeline_geo`).

Note that while the simulation worlds' locations have been chosen to be geographically similar to
the envrionments depicted, the simulations are wholly fictional locations; the generated tiles
will not mesh seamlessly into any satellite map of the region depicted.
1 change: 1 addition & 0 deletions clearpath_generator_gz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ find_package(ament_cmake_python REQUIRED)

install(PROGRAMS
${PROJECT_NAME}/launch/generate_launch
${PROJECT_NAME}/nodes/ptz_controller_node
${PROJECT_NAME}/param/generate_param
DESTINATION lib/${PROJECT_NAME}
)
Expand Down
60 changes: 22 additions & 38 deletions clearpath_generator_gz/clearpath_generator_gz/launch/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,19 @@
# Redistribution and use in source and binary forms, with or without
# modification, is not permitted without the express permission
# of Clearpath Robotics.
import os

from clearpath_config.common.types.platform import Platform

from clearpath_generator_common.common import LaunchFile
from clearpath_generator_common.launch.writer import LaunchWriter
from clearpath_generator_common.launch.generator import LaunchGenerator

from clearpath_generator_common.launch.writer import LaunchWriter
from clearpath_generator_gz.launch.sensors import SensorLaunch

import os


class GzLaunchGenerator(LaunchGenerator):
GZ_TO_ROS_TWIST = '@geometry_msgs/msg/Twist[ignition.msgs.Twist'
ROS_TO_GZ_TWIST = '@geometry_msgs/msg/Twist]ignition.msgs.Twist'
GZ_TO_ROS_TF = '@tf2_msgs/msg/TFMessage[ignition.msgs.Pose_V'
GZ_TO_ROS_TWIST = '@geometry_msgs/msg/TwistStamped[gz.msgs.Twist'
ROS_TO_GZ_TWIST = '@geometry_msgs/msg/TwistStamped]gz.msgs.Twist'
GZ_TO_ROS_TF = '@tf2_msgs/msg/TFMessage[gz.msgs.Pose_V'

def __init__(self, setup_path: str = '/etc/clearpath/') -> None:
super().__init__(setup_path)
Expand All @@ -73,7 +70,7 @@ def __init__(self, setup_path: str = '/etc/clearpath/') -> None:
cmd_vel_robot_bridge_arg = '/model/' + self.robot_name + '/cmd_vel' + self.ROS_TO_GZ_TWIST
cmd_vel_robot_bridge_remap = (
'/model/' + self.robot_name + '/cmd_vel',
'platform/cmd_vel_unstamped'
'platform/cmd_vel'
)

self.cmd_vel_node = LaunchFile.Node(
Expand Down Expand Up @@ -152,62 +149,49 @@ def __init__(self, setup_path: str = '/etc/clearpath/') -> None:
}]
)

# Common components for all platforms
self.common_platform_components = [
self.cmd_vel_node,
self.odom_base_node
]

# Components required for each platform
self.platform_components = {
Platform.J100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.J100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
self.gps_0_bridge_node,
],
Platform.A200: [
self.cmd_vel_node,
self.odom_base_node,
],
Platform.DD100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.A200: self.common_platform_components,
Platform.A300: self.common_platform_components,
Platform.DD100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.DD150: [
self.cmd_vel_node,
self.odom_base_node,
Platform.DD150: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.DO100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.DO100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.DO150: [
self.cmd_vel_node,
self.odom_base_node,
Platform.DO150: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.GENERIC: [
self.cmd_vel_node,
self.odom_base_node,
],
Platform.R100: [
self.cmd_vel_node,
self.odom_base_node,
Platform.GENERIC: self.common_platform_components,
Platform.R100: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
],
Platform.W200: [
self.cmd_vel_node,
self.odom_base_node,
Platform.W200: self.common_platform_components + [
self.imu_0_bridge_node,
self.imu_filter_arg,
self.imu_filter_node,
Expand Down
Loading