GithubHelp home page GithubHelp logo

shigeppp / consai_ros2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ssl-roots/consai_ros2

0.0 0.0 0.0 544 KB

ROS 2 packages for RoboCup SSL beginner. / RoboCup SSL初心者のための ROS 2パッケージ

License: Apache License 2.0

Shell 0.12% C++ 34.33% Python 59.46% C 2.05% CMake 3.83% Dockerfile 0.21%

consai_ros2's Introduction

CON-SAI

build_and_lint

CON-SAIはRoboCup SSLに 初めて参加する人でも開発できるサッカーAIです。

CON-SAI stands for CONtribution to Soccer AI.

Requirements

Installation

Docker

$ docker pull ghcr.io/ssl-roots/consai_ros2:main

Dockerを用いたCON-SAIの開発方法については.docker/README.mdを参照してください

Source build

# Setup ROS environment
$ source /opt/ros/foxy/setup.bash

# Create working directory
$ mkdir -p ~/ros2_ws/src
# Download consai_ros2
$ cd ~/ros2_ws/src
$ git clone https://github.com/SSL-Roots/consai_ros2.git
$ git clone https://github.com/SSL-Roots/consai_frootspi_msgs.git

# Install dependencies
$ rosdep install -r -y -i --from-paths .

# Build & Install
$ cd ~/ros2_ws
$ colcon build --symlink-install
# Setup working directory's environment
$ source ~/ros2_ws/install/setup.bash

Quick start

# Start grSim and ssl-game-controller, then
$ source ~/ros2_ws/install/setup.bash
$ ros2 launch consai_examples start.launch.py

# anothor terminal
$ source ~/ros2_ws/install/setup.bash
$ ros2 run consai_examples game.py

CON-SAIの使い方はconsai_examplesのREADMEを参照してください。

Packages

  • consai
    • メタパッケージ
  • consai_examples
    • CON-SAIの各種パッケージを使ったサンプル集です
  • consai_msgs
    • CON-SAIで使用するデータ型を定義するパッケージです
  • consai_observer
    • フィールド情報を解析するパッケージです
  • consai_robot_controller
    • ロボットの走行、キック、ドリブル制御を担うパッケージです
  • consai_vision_tracker
    • ビジョン情報をフィルタリングするパッケージです
  • consai_visualizer
    • ビジョン情報やロボットの走行情報を描画するパッケージです
  • robocup_ssl_comm
    • SSL-Vision、SSL-Game-Controller、grSimのデータパケットをROS 2のトピックに変換するパッケージです
  • robocup_ssl_msgs
    • SSL-Vision、SSL-Game-Controller、grSimのデータプロトコルをROS 2のデータ型に再定義するパッケージです

License

(C) 2021 Roots

各ファイルはファイル内に明記されているライセンスに従います。 ライセンスが明記されていない場合は、Apache License, Version 2.0に従います。 ライセンスの全文はLICENSEから確認できます。

Development

CON-SAIを開発する際にこの項目を読んでください。

開発方針について

  • 本ソフトウェアはオープンソースですが、開発はオープンではありません
  • チームの開発方針を優先するため、外部からのIssue、Pull Requestには対応できない場合があります

Lint

コードの見た目を整えるためにlintでチェックしています。

下記コマンドを実行して、チェックを実行してください。

$ cd ~/ros2_ws
# 全てのパッケージのテストを実行
$ colcon test
# あるいは、パッケージ名指定でテストを実行
$ colcon test --packages-select robocup_ssl_comm 
# テスト結果を表示
$ colcon test-result --verbose

C++のコードはament_uncrustifyを使って、自動で整形できます。

# フォーマットのチェック
$ ament_uncrustify robocup_ssl_comm/src/vision_component.cpp
# --reformat オプションで自動整形
$ ament_uncrustify --reformat robocup_ssl_comm/src/vision_component.cpp

Pythonのコードはament_flake8を使って、フォーマットとチェックできます。 自動整形はできません。

$ ament_flake8 consai_examples/consai_examples/control.py

外部ツール(例:autopep8)を使えば自動整形できます。 ROS 2のPythonコードスタイル に沿うようにパラメータを設定してください。

$ sudo apt install python3-autopep8

# 1行の100文字に制限
# -i オプションで自動整形
$ autopep8 --max-line-length 99 -i consai_examples/consai_examples/control.py

consai_ros2's People

Contributors

shotaak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.