generated from Alpaca-zip/ros1-pkg-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Alpaca-zip/feature/create_vgraph
Feature/create vgraph
- Loading branch information
Showing
17 changed files
with
193 additions
and
367 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,23 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
project(template) | ||
project(vgraph_planner) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
# find dependencies | ||
find_package(catkin REQUIRED COMPONENTS roscpp rospy) | ||
find_package(catkin REQUIRED COMPONENTS rospy) | ||
|
||
# Declare a catkin package | ||
catkin_package(CATKIN_DEPENDS roscpp rospy) | ||
|
||
# Specify additional locations of header files | ||
include_directories(include ${catkin_INCLUDE_DIRS}) | ||
|
||
# Create Cpp executable | ||
add_executable(cpp_template src/cpp_template.cpp) | ||
target_link_libraries(cpp_template ${catkin_LIBRARIES}) | ||
|
||
# Install Cpp executable | ||
install(TARGETS cpp_template RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) | ||
catkin_package(CATKIN_DEPENDS rospy) | ||
|
||
# Install Python executables | ||
install(PROGRAMS scripts/py_template.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) | ||
install(PROGRAMS scripts/vgraph_planner.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) |
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 |
---|---|---|
@@ -1,79 +1 @@ | ||
# ros1-pkg-template | ||
This is the template repository for the ROS1 package with [Industrial CI](https://github.com/ros-industrial/industrial_ci). | ||
## Before use | ||
Adjust the `ROS_DISTRO` tag in [ci.yml](https://github.com/Alpaca-zip/ros1-pkg-template/blob/main/.github/workflows/ci.yml) to suit your ROS environment: | ||
```yaml | ||
jobs: | ||
clang_format_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: run industrial_ci | ||
uses: 'ros-industrial/industrial_ci@master' | ||
env: | ||
ROS_DISTRO: noetic # Replace noetic for your chosen distro. | ||
CLANG_FORMAT_CHECK: file | ||
CLANG_FORMAT_VERSION: "10" | ||
``` | ||
## Industrial CI | ||
This template provides a comprehensive CI pipeline for ROS project using GitHub Actions and the ros-industrial/industrial_ci action. | ||
- `Clang Format Check` : Ensures code formatting adheres to defined standards using [clang-format](https://clang.llvm.org/docs/ClangFormat.html). | ||
- `Clang Tidy Check` : Validates code for potential issues and adherence to coding standards using [Clang-Tidy](https://clang.llvm.org/extra/clang-tidy/). | ||
- `Black Check` : Ensures code formatting adheres to PEP standards using [Black](https://black.readthedocs.io/en/stable/). | ||
- `Pylint Check` : Runs [Pylint](https://pylint.readthedocs.io/en/stable/) for static code analysis on Python code. | ||
- `Catkin Lint Check` : Validates our ROS package structure and dependencies with [catkin_lint](https://fkie.github.io/catkin_lint/). | ||
- `Build Check` : Performs a build for both main and testing ROS repositories to ensure the codebase builds correctly. | ||
## To pass all checks... | ||
### clang-format | ||
**1. install** | ||
``` | ||
$ sudo apt-get install clang-format | ||
``` | ||
**2. Format with clang-format** | ||
``` | ||
$ roscd <this_package> | ||
$ find . -type f \( -name "*.cpp" -or -name "*.hpp" -or -name "*.h" \) -exec clang-format -i -style=file {} \; | ||
``` | ||
### Clang-Tidy | ||
**1. install** | ||
``` | ||
$ sudo apt-get install clang clang-tidy | ||
``` | ||
**2. Format with Clang-Tidy** | ||
``` | ||
$ cd <path_to_your_workspace> && catkin build <this_package> --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=1 | ||
$ clang-tidy -p build/<this_package>/ <path_to_this_package>/src/<your_cpp> -fix | ||
``` | ||
Recommended tool : [catkin_tidy](https://github.com/nyxrobotics/catkin_tidy) | ||
### Black | ||
**1. install** | ||
``` | ||
$ pip install black | ||
``` | ||
**2. Format with Black** | ||
``` | ||
$ roscd <this_package> | ||
$ find . -type f -name "*.py" -exec black {} \; | ||
``` | ||
### Pylint | ||
**1. install** | ||
``` | ||
$ pip install pylint | ||
``` | ||
**2. Run Pylint** | ||
``` | ||
$ roscd <this_package> | ||
$ find . -type f -name "*.py" -exec pylint {} \; | ||
``` | ||
### catkin_lint | ||
**1. install** | ||
``` | ||
$ sudo apt-get install catkin-lint | ||
``` | ||
**2. Run catkin_lint** | ||
``` | ||
$ catkin_lint --pkg <this_package> | ||
``` | ||
# vgraph_planner |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<launch> | ||
<arg name="pgm_file" default="$(find vgraph_planner)/map/map.pgm"/> | ||
<arg name="save_graph_file" default="$(find vgraph_planner)/map/vgraph.png"/> | ||
<arg name="resolution" default="0.1"/> | ||
|
||
<node name="vgraph_planner_node" pkg="vgraph_planner" type="vgraph_planner.py" output="screen"> | ||
<param name="~pgm_file" value="$(arg pgm_file)"/> | ||
<param name="~save_graph_file" value="$(arg save_graph_file)"/> | ||
<param name="~resolution" value="$(arg resolution)"/> | ||
</node> | ||
</launch> |
Binary file not shown.
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,7 @@ | ||
image: map.pgm | ||
mode: trinary | ||
resolution: 0.05 | ||
origin: [-9.84, -9.23, 0] | ||
negate: 0 | ||
occupied_thresh: 0.65 | ||
free_thresh: 0.25 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,22 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>template</name> | ||
<name>vgraph_planner</name> | ||
<version>0.0.0</version> | ||
<description>The template package</description> | ||
<maintainer email="template@todo.todo">template</maintainer> | ||
<description>The vgraph_planner package</description> | ||
<maintainer email="zip@todo.todo">Alpaca-zip</maintainer> | ||
<license>Apache 2.0</license> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<build_depend>roscpp</build_depend> | ||
<build_depend>rospy</build_depend> | ||
|
||
<build_export_depend>roscpp</build_export_depend> | ||
<build_export_depend>rospy</build_export_depend> | ||
|
||
<exec_depend>roscpp</exec_depend> | ||
<exec_depend>rospy</exec_depend> | ||
|
||
<export> | ||
</export> | ||
</package> |
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 @@ | ||
Pillow |
Oops, something went wrong.