Giter Site home page Giter Site logo

consai2's Issues

referee GameTypeの修正

#16 の処置に追記する。

game_event内のいくつかのパラメータはoptionalなので、HasFieldで存在をチェックしてから値を取得する。

goalie.pyの整理

goalie.pyの整理

  • コメントの追加
  • 冗長な表現の削除
  • 関数にまとめられる場合はまとめる

referee_receiver.pyにおけるgameEventの代入不備

発生原理

consai2_receiver/scripts/referee_receiver.pyの47行目においてGameEventに関して「protobufによってデシリアライズされたパケット」から「ROSメッセージ」への代入が行われているが両者のもつフィールド名は微妙に違うことからこの代入は失敗し,下に示すようなエラーを生じる.

発生状況

roslaunch consai2_examples visualizer.launch

上記のコマンドを実行した上で公式サイトで公開されている大会ログを再生すると本現象が発生する.
今回使用したログファイルは以下のとおりである.
使用ログファイル
RoboCupSSL2019世界大会決勝戦(ER-Force vs ZJUNlict)
https://tigers-mannheim.de/download/gamelogs/2019/div-a/

なお,PC上でも

  • sslrefbox + grSim
  • ssl-game-controller + grSim

の2通りの環境で試してみたがreferee.protooptional指定されているフィールドgameEventが使われる状況を発生させることができなかったのか,本現象が発生することはなかった.

error

setting /run_id to da047ff2-bd15-11e9-bf6a-88b1119fee3a
process[rosout-1]: started with pid [20031]
started core service [/rosout]
process[vision_receiver-2]: started with pid [20045]
process[referee_receiver-3]: started with pid [20049]
process[vision_wrapper-4]: started with pid [20050]
process[referee_wrapper-5]: started with pid [20051]
process[consai2_visualizer-6]: started with pid [20052]
Traceback (most recent call last):
  File "/home/hans/catkin_ws/src/consai2/consai2_receiver/scripts/referee_receiver.py", line 59, in <module>
    receiver.receive()
  File "/home/hans/catkin_ws/src/consai2/consai2_receiver/scripts/referee_receiver.py", line 27, in receive
    self._publish_referee(buf)
  File "/home/hans/catkin_ws/src/consai2/consai2_receiver/scripts/referee_receiver.py", line 49, in _publish_referee
    self._pub_referee.publish(referee)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 882, in publish
    self.impl.publish(data)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 1066, in publish
    serialize_message(b, self.seq, message)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/msg.py", line 152, in serialize_message
    msg.serialize(b)
  File "/home/hans/catkin_ws/devel/lib/python2.7/dist-packages/consai2_msgs/msg/_Referee.py", line 168, in serialize
    buff.write(_get_struct_4I3d2BI().pack(_x.blue.yellow_cards, _x.blue.timeouts, _x.blue.timeout_time, _x.blue.goalie, _x.designated_position.x, _x.designated_position.y, _x.designated_position.z, _x.game_event.game_event_type, _x.game_event.originator_team, _x.game_event.originator_bot_id))
AttributeError: 'SSL_Referee_Game_Event' object has no attribute 'game_event_type'
================================================================================REQUIRED process [referee_receiver-3] has died!
process has died [pid 20049, exit code 1, cmd /home/hans/catkin_ws/src/consai2/consai2_receiver/scripts/referee_receiver.py __name:=referee_receiver __log:=/home/hans/.ros/log/da047ff2-bd15-11e9-bf6a-88b1119fee3a/referee_receiver-3.log].
log file: /home/hans/.ros/log/da047ff2-bd15-11e9-bf6a-88b1119fee3a/referee_receiver-3*.log
Initiating shutdown!
================================================================================

World ObserverのKalman Filterの出力が不安定

お世話になっております。

World Observerの動作について質問させてください。
以下はGrSim(ホワイトノイズ無し)にて1m/sの等速直線**をした際の出力です。

world_observer

上図のように、推定値が1 〜 1.2m/sあたりを行き来しますが、こちらはバグでしょうか。
私の使用方法が何かしら誤っているのでしょうか。

また、現在はフレームレート60fps決め打ちでの実装となっていますが、フレーム間隔を都度計算してpredictしたほうがより良いと思います。

よろしくおねがいします。

roleの11台対応

8台前提のrole設定となっていたので、11台に対応する
roleは以下を想定

  1. ATK
  2. CB1
  3. CB2
  4. SUB ATK
  5. ZONE1
  6. ZONE2
  7. ZONE3
  8. ZONE4
  9. MAN-MARK1
  10. MAN-MARK2

各パッケージにReadmeを追加する

いくつかのパッケージにREADME.mdファイルが存在しないため追加する。

consai2_controlや、consai2_gameはexampleコードがほとんどであるが、パッケージとしての役割は明記すべきである。

Vision情報のチームサイド反転は、上位層に行わせる

consai2_receiver/vision_receiverでチームサイドの反転をしているが、vision_receiverはできるだか無編集なデータをPublishすべきである。

# FIXME: チームサイドの反転はより上位の vision_wrapperにやらせる
invert_side = False
if self._SIDE != 'left':
invert_side = True

チームサイドの反転は上位層のvision_wrapperに実行させる。

ROS2対応

CON-SAI2はROS 2にも対応させます。ブランチを切り分けて、ROS1とROS2の両方を残します。

詳細な開発方針はこのissueや、別の方法で議論し、決定します。

CON-SAI 2の流用の仕方をreadmeに書く

CON-SAI2には、ユーザにコントリビュート(issue, pullreq)してほしいコードと、ユーザに用意してほしいコード、編集して欲しくないコードがある。

それらがどの部分なのかをReadmeに記載する。

フィールドロボットが0台になったあと、ロボットを配置してもアタッカーにならない

ゴーリー以外のフィールドロボットが0台になったあと
前回アタッカーだったロボットが復活しても
アタッカーにはならず、ディフェンスになってしまう。

原因
マージンを設けて、アタッカーの切り替わりの発振を防ぐ処理によって
切り替え処理が働かない。
自分とボールの距離 < 自分とボールの距離 - MARGIN
という判定になる。

defense.pyの整理・改修

  • コメントの追記
  • 変数名・定数名・関数名の整備
  • 冗長な表現の削除
  • その他気になった点を編集

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.