diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/404.html b/404.html new file mode 100644 index 0000000000..0161b73169 --- /dev/null +++ b/404.html @@ -0,0 +1,714 @@ + + + +
+ + + + + + + + + + + + + + +If you want to use custom message in AWSIM, you need to generate the appropriate files, to do this you have to build ROS2ForUnity
yourself - please follow the steps below. Remember to start with prerequisities though.
ROS2ForUnity role
+For a better understanding of the role of ROS2ForUnity
and the messages used, we encourage you to read this section.
custom_msgs
+In order to simplify this tutorial, the name of the package containing the custom message is assumed to be custom_msgs
- remember to replace it with the name of your package.
ROS2ForUnity
depends on a ros2cs - a C# .NET library for ROS2.
+This library is already included so you don't need to install it, but there are a few prerequisites that must be resolved first.
Please select your system and resolve all prerequisites:
+ros2cs
prerequisites for Ubuntuhumble
and is located in /opt/ros/humble
~/custom_msgs
or is hosted on git repository.bash
shell ros2cs
prerequisites for Windows
Question
+Tests are not working ('charmap'
codec can't decode byte) on Windows - look at troubleshooting here
ROS2 version is humble
and is located in C:\ros2_humble
C:\custom_msgs
or is hosted on git repository.powershell
shellClone ROS2ForUnity
repository by execute command:
git clone https://github.com/RobotecAI/ros2-for-unity ~/
+
Warning
+The cloned ROS 2 For Unity
repository must be located in the home directory ~/
.
git clone https://github.com/RobotecAI/ros2-for-unity /C
+
Warning
+The cloned ROS 2 For Unity
repository must be located in the home directory C:\
.
Pull dependent repositories by execute commands:
+cd ~/ros2-for-unity
+. /opt/ros/humble/setup.bash
+./pull_repositories.sh
+
cd C:\ros2-for-unity
+C:\ros2_humble\local_setup.ps1
+.\pull_repositories.ps1
+
custom_msgs
packageThe method to add a custom package to build depends on where it is located. The package can be on your local machine or just be hosted on a git repository.
+Please, choose the appropriate option and follow the instructions.
Copy the custom_msgs
package with custom message to the folder to src/ros2cs/custom_messages
directory
cp -r ~/custom_msgs ~/ros2-for-unity/src/ros2cs/custom_messages/
+
Copy-Item 'C:\custom_msgs' -Destination 'C:\ros2-for-unity\src\custom_messages'
+
ros2-for-unity/ros2_for_unity_custom_messages.repos
file in editor.Modify the contents of the file shown below, uncomment and set:
+<package_name>
- to your package name - so in this case custom_msgs
,<repo_url>
- to repository address, <repo_branch>
- to desired branch.
+repositories:
+# src/ros2cs/custom_messages/<package_name>:
+# type: git
+# url: <repo_url>
+# version: <repo_branch>
+
Example
+Below is an example of a file configured to pull 2 packages (custom_msgs
,autoware_auto_msgs
) of messages hosted on a git repository.
+
# NOTE: Use this file if you want to build with custom messages that reside in a separate remote repo.
+# NOTE: use the following format
+
+repositories:
+ src/ros2cs/custom_messages/custom_msgs:
+ type: git
+ url: https://github.com/tier4/custom_msgs.git
+ version: main
+ src/ros2cs/custom_messages/autoware_auto_msgs:
+ type: git
+ url: https://github.com/tier4/autoware_auto_msgs.git
+ version: tier4/main
+
Now pull the repositories again (also the custom_msgs
package repository)
cd ~/ros2-for-unity
+./pull_repositories.sh
+
cd C:\ros2-for-unity
+.\pull_repositories.ps1
+
Build ROS2ForUnity
with custom message packages using the following commands:
cd ~/ros2-for-unity
+./build.sh --standalone
+
cd C:\ros2-for-unity
+.\build.ps1 -standalone
+
custom_msgs
to AWSIMNew ROS2ForUnity
build, which you just made in step 3, contains multiple libraries that already exist in the AWSIM.
+To install custom_msgs
and not copy all other unnecessary files, you should get the custom_msgs
related libraries only.
You can find them in following directories and simply copy to the analogous directories in AWSIM/Assets/Ros2ForUnity
folder, or use the script described here.
ros2-for-unity/install/asset/Ros2ForUnity/Plugins
which names matches custom_msgs_*
ros2-for-unity/install/asset/Ros2ForUnity/Plugins/Linux/x86_64/
which names matches libcustom_msgs_*
ros2-for-unity/install/asset/Ros2ForUnity/Plugins
which names matches custom_msgs_*
ros2-for-unity/install/asset/Ros2ForUnity/Plugins/Windows/x86_64/
which names matches custom_msgs_*
To automate the process, you can use a script that copies all files related to your custom_msgs
package.
copy_custom_msgs.sh
in directory ~/ros2-for-unity/
and paste the following content into it.
+#!/bin/bash
+echo "CUSTOM_MSGS_PACKAGE_NAME: $1"
+echo "AWSIM_DIR_PATH: $2"
+find ./install/asset/Ros2ForUnity/Plugins -maxdepth 1 -name "$1*" -type f -exec cp {} $2/Assets/Ros2ForUnity/Plugins \;
+find ./install/asset/Ros2ForUnity/Plugins/Linux/x86_64 -maxdepth 1 -name "lib$1*" -type f -exec cp {} $2/Assets/Ros2ForUnity/Plugins/Linux/x86_64 \;
+
chmod a+x copy_msgs.sh
+
Run the script with two arguments: +
./copy_custom_msgs.sh <CUSTOM_MSGS_PACKAGE_NAME> <AWSIM_DIR_PATH>
+
<CUSTOM_MSGS_PACKAGE_NAME>
- the first one which is the name of the package with messages - in this case custom_msgs
,
<AWSIM_DIR_PATH>
- the second which is the path to the cloned AWSIM repository.Example
+./copy_custom_msgs.sh custom_msgs ~/unity/AWSIM/
+
To automate the process, you can use these commands with changed:
+<CUSTOM_MSGS_PACKAGE_NAME>
- the name of your package with messages - in this case custom_msgs
,<AWSIM_DIR_PATH>
- to path to the cloned AWSIM repository
+Get-ChildItem C:\ros2-for-unity\install\asset\Ros2ForUnity\Plugins\* -Include @('<CUSTOM_MSGS_PACKAGE_NAME>*') | Copy-Item -Destination <AWSIM_DIR_PATH>\Assets\Ros2ForUnity\Plugins
+Get-ChildItem C:\ros2-for-unity\install\asset\Ros2ForUnity\Plugins\Windows\x86_64\* -Include @('<CUSTOM_MSGS_PACKAGE_NAME>*') | Copy-Item -Destination <AWSIM_DIR_PATH>\Assets\Ros2ForUnity\Plugins\Windows\x86_64
+
Example
+Get-ChildItem C:\ros2-for-unity\install\asset\Ros2ForUnity\Plugins\* -Include @('custom_msgs*') | Copy-Item -Destination C:\unity\AWSIM\Assets\Ros2ForUnity\Plugins
+Get-ChildItem C:\ros2-for-unity\install\asset\Ros2ForUnity\Plugins\Windows\x86_64\* -Include @('custom_msgs*') | Copy-Item -Destination C:\unity\AWSIM\Assets\Ros2ForUnity\Plugins\Windows\x86_64
+
Make sure that the package files custom_msgs
have been properly copied to the AWSIM/Assets/Ros2ForUnity
.
+Then try to create a message object as described in this section and check in the console of Unity Editor if it compiles without errors.
Ros2ForUnity(R2FU
)モジュールは、UnityとROS2エコシステムを効果的に接続するコミュニケーションソリューションで、強力な統合を維持します。
+他のソリューションとは異なり、通信をブリッジングに依存せず、むしろROS2ミドルウェアスタック(特にrcl
レイヤーおよびそれ以下)を利用して、Unityシミュレーション内でROS2ノードを含めることができます。
R2FU
は多くの理由でCoRE.SIMで使用されています。
+まず第一に、UnityとROS2間の高性能な統合を提供し、ブリッジングソリューションと比較してスループットが向上し、レイテンシが低くなります。
+Unity内のシミュレーションエンティティに対して実際のROS2機能を提供し、標準およびカスタムメッセージをサポートし、Unityアセットとしてラップされた便利な抽象化とツールを含んでいます。
+詳細な説明については、READMEをご覧ください。
このアセットは、2つの異なるモードで準備できます:
+デフォルトでは、CoRE.SIM のアセット R2FU
は スタンドアロンモード で準備されています。
+これにより、ROS2 のインスタンスをソース化する必要がなく、Unity エディタを実行するだけで済みます。
トピックが表示されない
+エラーは表示されませんが、R2FU
によって発行されたトピックが表示されません。
強制的に停止してみてください(pkill -9 ros2_daemon
) そして再起動してください(ros2 daemon start
)。
「CoRE.SIM」内で「R2FU」の概念を説明する際、以下の点を区別します:
+RuntimeInitializeOnLoadMethod
マークを使用して初期化されます。「SimulatorROS2Node」の実装は、「R2FU」の使用により、任意の Unity コンポーネントに対して ROS2 を介した通信を追加することができます。例えば、他の ROS2 ノードから制御コマンドを受信し、Ego の現在の状態(環境内の位置など)を発行することができます。
+シミュレーション時間
+Unity の時間の代わりにシステム時間(ROS2 時間)を使用したい場合は、SimulatorROS2Node
クラスで UnityTimeSource
の代わりに ROS2TimeSource
を使用してください。
Ros2ForUnity
アセットには以下が含まれています:
*.dll
および *.so
ファイル)。
+必要なライブラリに加えて、ROS2 メッセージの種類を生成した結果として作成されたライブラリも含まれています。これらは通信に使用されます。R2FU
を Unity で使用するためのスクリプト - 詳細は以下の 下記 をご覧ください。R2FU
を CoRE.SIM で使用するためのスクリプト。単一のメイン Node の抽象化とインタフェースの簡略化を提供します - 詳細は以下の 下記 をご覧ください。これらのスクリプトはライブラリ自体ではなく、直接ディレクトリ Assets/CoRE.SIM/Scripts/ROS/**
にあります。ROS2UnityCore
- ROS2 ノードと実行可能なアクションの処理を行うための主要なクラス。専用スレッドで回転し、アクションを実行します(例:クロック、センサーのパブリッシュトリガーなど)。ROS2UnityComponent
- Unity コンポーネントとして動作するように適応された ROS2UnityCore
。ROS2Node
- ROS2 ノードを表すクラスで、ROS2UnityComponent
クラスを介して構築する必要があり、回転もこのクラスで処理されます。ROS2ForUnity
- ROS2 通信の確認、適切な初期化、シャットダウンを処理する内部クラス。ROS2ListenerExample
- 基本的な ROS2->Unity 通信のテスト用に提供される例類クラス。ROS2TalkerExample
- 基本的な Unity->ROS2 通信のテスト用に提供される例類クラス。ROS2PerformanceTest
- ROS2<->Unity 通信のパフォーマンステスト用に提供される例類クラス。Sensor
- ROS2 対応のセンサーの抽象基本クラス。Transformations
- Unity と ROS2 の座標系間の変換関数のセット。PostInstall
- R2FU
メタデータファイルのインストールを処理する内部クラス。Time
スクリプト - 異なる時間源を使用できるようにする一連のクラス:ROS2Clock
- Unity または ROS2 システム時間と ROS2 メッセージ間のインタフェースを提供する ROS2 クロッククラス。ROS2TimeSource
- ROS2 時間を取得します(デフォルトではシステム時間)。UnityTimeSource
- Unity 時間を取得します。DotnetTimeSource
- Stopwatch
を使用して解像度を高めた Unity DateTime
ベースのクロックを取得します。ITimeSource
- 任意のソースからの一般的な時間の取得用のインタフェース。TimeUtils
- 時間変換用のユーティリティ。拡張スクリプト
+さらに、CoRE.SIMをR2FU
の使用に適応させるために、以下のスクリプトが使用されています。
SimulatorROS2Node
- これはCoRE.SIM<->ROS2の通信に直接責任を持つクラスです。ClockPublisher
- SimulatorROS2Nodeで実行されているクロックからのシミュレーション時間の発行を可能にします。
+シーンにコンポーネントとして追加する必要があり、シーンが実行されると現在の時間を発行します。
QoSSettings
- これはCoRE.SIM内のサブスクライバーとパブリッシャーのQoSを指定するROS2の相当です。
+Ros2csライブラリからQualityOfServiceProfile
の実装を使用しています。
ROS2Utility
- これは、例えば、ROS2の座標系からCoRE.SIMの座標系に位置を変換するためのユーティリティを持つクラスです。DiagnosticsManager
- *.yaml
設定ファイルで説明されている要素に対する診断情報を出力します。The basic ROS2 msgs types that are supported in CoRE.SIM by default include:
+std_msgs
.geometry_msgs
,sensor_msgs
,nav_msgs
,diagnostic_msgs
,builtin_interfaces
,action_msgs
,rosgraph_msgs
,test_msgs
.In order for the message package to be used in Unity, its *.dll
and *.so
libraries must be generated using R2FU
.
Custom message
+If you want to generate a custom message to allow it to be used in CoRE.SIM please read this tutorial.
+Each message type is composed of other types - which can also be a complex type.
+All of them are based on built-in C# types.
+The most common built-in types in messages are bool
, int
, double
and string
.
+These types have their communication equivalents using ROS2.
A good example of a complex type that is added to other complex types in order to specify a reference - in the form of a timestamp and a frame - is std_msgs/Header. +This message has the following form:
+builtin_interfaces/msg/Time stamp
+string frame_id
+
ROS2 directive
+In order to work with ROS2 in Unity, remember to add the directive using ROS2;
at the top of the file to import types from this namespace.
The simplest way to create an object of Header
type is:
var header = new std_msgs.msg.Header()
+{
+ Frame_id = "map"
+}
+
It is not required to define the value of each field.
+As you can see, it creates an object, filling only frame_id
field - and left the field of complex builtin_interfaces/msg/Time
type initialized by default.
+Time is an important element of any message, how to fill it is written here.
As you might have noticed in the previous example, a ROS2 message in Unity is just a structure containing the same fields - keep the same names and types. +Access to its fields for reading and filling is the same as for any C# structure.
+var header2 = new std_msgs.msg.Header();
+header2.Frame_id = "map";
+header2.Stamp.sec = "1234567";
+Debug.Log($"StampSec: {header2.Stamp.sec} and Frame: {header2.Frame_id}");
+
Field names
+There is one always-present difference in field names. +The first letter of each message field in Unity is always uppercase - even if the base ROS2 message from which it is generated is lowercase.
+In order to complete the time field of the Header
message, we recommend the following methods in CoRE.SIM:
When the message has no Header
but only the Time
type:
var header2 = new std_msgs.msg.Header();
+header2.Stamp = SimulatorROS2Node.GetCurrentRosTime();
+
When the message has a Header
- like for example autoware_auto_vehicle_msgs/VelocityReport:
velocityReportMsg = new autoware_auto_vehicle_msgs.msg.VelocityReport()
+{
+ Header = new std_msgs.msg.Header()
+ {
+ Frame_id = "map",
+ }
+};
+var velocityReportMsgHeader = velocityReportMsg as MessageWithHeader;
+SimulatorROS2Node.UpdateROSTimestamp(ref velocityReportMsgHeader);
+
These methods allow to fill the Time
field in the message object with the simulation time - from ROS2Clock
Some message types contain an array of some type.
+An example of such a message is nav_msgs/Path
, which has a PoseStamped
array.
+In order to fill such an array, you must first create a List<T>
, fill it and then convert it to a raw array.
var posesList = new List<geometry_msgs.msg.PoseStamped>();
+for(int i=0; i<=5;++i)
+{
+ var poseStampedMsg = new geometry_msgs.msg.PoseStamped();
+ poseStampedMsg.Pose.Position.X = i;
+ poseStampedMsg.Pose.Position.Y = 5-i;
+ var poseStampedMsgHeader = poseStampedMsg as MessageWithHeader;
+ SimulatorROS2Node.UpdateROSTimestamp(ref poseStampedMsgHeader);
+ posesList.Add(poseStampedMsg);
+}
+var pathMsg = new nav_msgs.msg.Path(){Poses=posesList.ToArray()};
+var pathMsgHeader = pathMsg as MessageWithHeader;
+SimulatorROS2Node.UpdateROSTimestamp(ref pathMsgHeader);
+// pathMsg is ready
+
In order to publish messages, a publisher object must be created.
+The static method CreatePublisher
of the SimulatorROS2Node
makes it easy.
+You must specify the type of message, the topic on which it will be published and the QoS profile.
+Below is an example of autoware_auto_vehicle_msgs.msg.VelocityReport
type message publication with a frequency of 30Hz
on /vehicle/status/velocity_status
topic, the QoS profile is (Reliability=Reliable, Durability=Volatile, History=Keep last, Depth=1
):
using UnityEngine;
+using ROS2;
+
+namespace CoRE.SIM
+{
+ public class VehicleReportRos2Publisher : MonoBehaviour
+ {
+ float timer = 0;
+ int publishHz = 30;
+ QoSSettings qosSettings = new QoSSettings()
+ {
+ ReliabilityPolicy = ReliabilityPolicy.QOS_POLICY_RELIABILITY_RELIABLE,
+ DurabilityPolicy = DurabilityPolicy.QOS_POLICY_DURABILITY_VOLATILE,
+ HistoryPolicy = HistoryPolicy.QOS_POLICY_HISTORY_KEEP_LAST,
+ Depth = 1,
+ };
+ string velocityReportTopic = "/vehicle/status/velocity_status";
+ autoware_auto_vehicle_msgs.msg.VelocityReport velocityReportMsg;
+ IPublisher<autoware_auto_vehicle_msgs.msg.VelocityReport> velocityReportPublisher;
+
+ void Start()
+ {
+ // Create a message object and fill in the constant fields
+ velocityReportMsg = new autoware_auto_vehicle_msgs.msg.VelocityReport()
+ {
+ Header = new std_msgs.msg.Header()
+ {
+ Frame_id = "map",
+ }
+ };
+
+ // Create publisher with specific topic and QoS profile
+ velocityReportPublisher = SimulatorROS2Node.CreatePublisher<autoware_auto_vehicle_msgs.msg.VelocityReport>(velocityReportTopic, qosSettings.GetQoSProfile());
+ }
+
+ bool NeedToPublish()
+ {
+ timer += Time.deltaTime;
+ var interval = 1.0f / publishHz;
+ interval -= 0.00001f;
+ if (timer < interval)
+ return false;
+ timer = 0;
+ return true;
+ }
+
+ void FixedUpdate()
+ {
+ // Provide publications with a given frequency
+ if (NeedToPublish())
+ {
+ // Fill in non-constant fields
+ velocityReportMsg.Longitudinal_velocity = 1.00f;
+ velocityReportMsg.Lateral_velocity = 0.00f;
+ velocityReportMsg.Heading_rate = 0.00f;
+
+ // Update Stamp
+ var velocityReportMsgHeader = velocityReportMsg as MessageWithHeader;
+ SimulatorROS2Node.UpdateROSTimestamp(ref velocityReportMsgHeader);
+
+ // Publish
+ velocityReportPublisher.Publish(velocityReportMsg);
+ }
+ }
+ }
+}
+
In order to subscribe messages, a subscriber object must be created.
+The static method CreateSubscription
of the SimulatorROS2Node
makes it easy.
+You must specify the type of message, the topic from which it will be subscribed and the QoS profile.
+In addition, the callback must be defined, which will be called when the message is received - in particular, it can be defined as a lambda expression.
+Below is an example of std_msgs.msg.Bool
type message subscription on /vehicle/is_vehicle_stopped
topic, the QoS profile is “system default”
:
+
using UnityEngine;
+using ROS2;
+
+namespace CoRE.SIM
+{
+ public class VehicleStoppedSubscriber : MonoBehaviour
+ {
+ QoSSettings qosSettings = new QoSSettings();
+ string isVehicleStoppedTopic = "/vehicle/is_vehicle_stopped";
+ bool isVehicleStopped = false;
+ ISubscription<std_msgs.msg.Bool> isVehicleStoppedSubscriber;
+
+ void Start()
+ {
+ isVehicleStoppedSubscriber = SimulatorROS2Node.CreateSubscription<std_msgs.msg.Bool>(isVehicleStoppedTopic, VehicleStoppedCallback, qosSettings.GetQoSProfile());
+ }
+
+ void VehicleStoppedCallback(std_msgs.msg.Bool msg)
+ {
+ isVehicleStopped = msg.Data;
+ }
+
+ void OnDestroy()
+ {
+ SimulatorROS2Node.RemoveSubscription<std_msgs.msg.Bool>(isVehicleStoppedSubscriber);
+ }
+ }
+}
+
The following is a summary of the ROS2 topics that the AWSIM node subscribes to and publishes on.
+Ros2ForUnity
+AWSIM works with ROS2 thanks to the use of Ros2ForUnity
- read the details here.
+If you want to generate a custom message to allow it to be used in AWSIM please read this tutorial.
Category | +Topic | +Message type | +frame_id |
+Hz |
+QoS |
+
---|---|---|---|---|---|
Control |
++ | + | + | + | + |
Ackermann Control | +/control/command/control_cmd |
+autoware_auto_control_msgs/AckermannControlCommand |
+- | +60 |
+Reliable ,TransientLocal ,KeepLast/1 |
+
Gear | +/control/command/gear_cmd |
+autoware_auto_vehicle_msgs/GearCommand |
+- | +10 |
+Reliable ,TransientLocal ,KeepLast/1 |
+
Turn Indicators | +/control/command/turn_indicators_cmd |
+autoware_auto_vehicle_msgs/TurnIndicatorsCommand |
+- | +10 |
+Reliable ,TransientLocal ,KeepLast/1 |
+
Hazard Lights | +/control/command/hazard_lights_cmd |
+autoware_auto_vehicle_msgs/HazardLightsCommand |
+- | +10 |
+Reliable ,TransientLocal ,KeepLast/1 |
+
Emergency | +/control/command/emergency_cmd |
+tier4_vehicle_msgs/msg/VehicleEmergencyStamped |
+- | +60 |
+Reliable ,TransientLocal ,KeepLast/1 |
+
Category | +Topic | +Message type | +frame_id |
+Hz |
+QoS |
+
---|---|---|---|---|---|
Clock |
+/clock |
+rosgraph_msgs/Clock |
+- | +100 |
+Best effort ,Volatile ,Keep last/1 |
+
Sensors |
++ | + | + | + | + |
Camera | +/sensing/camera/traffic_light/camera_info |
+sensor_msgs/CameraInfo |
+traffic_light_left_camera/camera_link |
+10 |
+Best effort ,Volatile ,Keep last/1 |
+
Camera | +/sensing/camera/traffic_light/image_raw |
+sensor_msgs/Image |
+traffic_light_left_camera/camera_link |
+10 |
+Best effort ,Volatile ,Keep last/1 |
+
GNSS | +/sensing/gnss/pose |
+geometry_msgs/Pose |
+gnss_link |
+1 |
+Reliable ,Volatile ,Keep last/1 |
+
GNSS | +/sensing/gnss/pose_with_covariance |
+geometry_msgs/PoseWithCovarianceStamped |
+gnss_link |
+1 |
+Reliable ,Volatile ,Keep last/1 |
+
IMU | +/sensing/imu/tamagawa/imu_raw |
+sensor_msgs/Imu |
+tamagawa/imu_link |
+30 |
+Reliable ,Volatile ,Keep last/1000 |
+
Top LiDAR | +/sensing/lidar/top/pointcloud_raw |
+sensor_msgs/PointCloud2 |
+sensor_kit_base_link |
+10 |
+Best effort ,Volatile ,Keep last/5 |
+
Top LiDAR | +/sensing/lidar/top/pointcloud_raw_ex |
+sensor_msgs/PointCloud2 |
+sensor_kit_base_link |
+10 |
+Best effort ,Volatile ,Keep last/5 |
+
Vehicle Status |
++ | + | + | + | + |
Velocity | +/vehicle/status/velocity_status |
+autoware_auto_vehicle_msgs/VelocityReport |
+base_line |
+30 |
+Reliable ,Volatile ,Keep last/1 |
+
Steering | +/vehicle/status/steering_status |
+autoware_auto_vehicle_msgs/SteeringReport |
+- | +30 |
+Reliable ,Volatile ,Keep last/1 |
+
Control Mode | +/vehicle/status/control_mode |
+autoware_auto_vehicle_msgs/ControlModeReport |
+- | +30 |
+Reliable ,Volatile ,Keep last/1 |
+
Gear | +/vehicle/status/gear_status |
+autoware_auto_vehicle_msgs/GearReport |
+- | +30 |
+Reliable ,Volatile ,Keep last/1 |
+
Turn Indicators | +/vehicle/status/turn_indicators_status |
+autoware_auto_vehicle_msgs/TurnIndicatorsReport |
+- | +30 |
+Reliable ,Volatile ,Keep last/1 |
+
Hazard Lights | +/vehicle/status/hazard_lights_status |
+autoware_auto_vehicle_msgs/HazardLightsReport |
+- | +30 |
+Reliable ,Volatile ,Keep last/1 |
+
Ground Truth |
++ | + | + | + | + |
Pose | +/awsim/ground_truth/vehicle/pose |
+geometry_msgs/PoseStamped |
+base_link |
+100 |
+Reliable ,Volatile ,Keep last/1 |
+
CameraSensor
はRGBカメラをシミュレートするコンポーネントです。
+自動運転車はさまざまな目的で使用される多くのカメラを装備することがあります。
+現在のAWSIMのバージョンでは、カメラは主にAutowareの信号機認識モジュールに画像を提供するために使用されています。
プレハブは以下のパスにあります:
+Assets/AWSIM/Prefabs/Sensors/CameraSensor.prefab
+
言及された単一のCameraSensor
は、そのデータが公開されるフレームtraffic_light_left_camera/camera_link
を持っています。
+センサープレハブはこのフレームに追加されます。
+traffic_light_left_camera/camera_link
リンクは、URDF
内のbase_link
オブジェクトに追加されます。
URDF
構造とプレハブLexus RX450h 2015
に追加されたセンサーの詳細な説明は、このセクションで提供されています。
CameraSensorHolder(スクリプト)は複数のカメラセンサーの順次レンダリングを許可します。
+それを利用するには、各CameraSensor
オブジェクトをCameraSensorHolder
の子オブジェクトとしてアタッチする必要があります。
+
Camere Sensors
- レンダリングに使用されるカメラセンサーのコレクションPublish Hz
- カメラのレンダリング、画像処理、およびコールバックが実行される頻度Render In Queue
- カメラセンサーのレンダリングシーケンスタイプ:キュー内(一つずつ)またはすべて同じフレームでCameraSensor
が正しく機能するためには、スクリプトが追加されたGameObjectにも以下が必要です:
信号機認識
+Autowareで信号機の認識に問題がある場合、AWSIMのカメラの画像解像度と焦点距離を増やすと助けになるかもしれません。
+カメラの設定
+カメラがキャプチャした画像を調整したい場合は、このマニュアルを読むことをお勧めします。
+CameraSensor
の機能は2つのスクリプトに分かれています:
CameraSensor
の出力を特定のROS2トピックでImageとCameraInfoメッセージタイプとしてパブリッシュする機能を提供します。スクリプトは次のパスにあります:
+Assets/AWSIM/Scripts/Sensors/CameraSensor/*
+
同じ場所には、使用されるComputeShader
が含まれている*.compute
ファイルもあります。
カメラセンサー(スクリプト)は、コアのカメラセンサーコンポーネントです。これはOpenCVの歪みとBGR8形式へのエンコードを適用する責任があります。歪みモデルはプラムボブと想定されています。このスクリプトはカメラから画像をTexture2D
にレンダリングし、歪みパラメータを使用して変換します。この画像はGUIに表示され、BGR8形式のバイトリストをスクリプトの出力として取得するためにさらに処理されます。
このスクリプトは2つのComputeShader
を使用します。これらはスクリプトと同じ場所にあります:
CameraDistortion
- カメラの歪みパラメータを使用して画像を修正するためのもの。RosImageShader
- 2つのピクセルカラー(bgr8 - 3バイト)を1つの(uint32 - 4バイト)にエンコードしてROSイメージ BGR8バッファを生成するためのものです。
API | +タイプ | +機能 | +
---|---|---|
DoRender | +void | +Unityカメラをレンダリングし、レンダリングされたイメージにOpenCVの歪みを適用し、出力データを更新します。 | +
以下は、エディターレベルから設定可能な要素です。
+Output Hz
- 出力の計算とコールバックの頻度(デフォルト: 10Hz
)表示
- カメラ画像をGUI上に表示するかどうか(デフォルト: true
)スケール
- カメラからの画像の縮小率、1
は実際のサイズの画像を提供し、2
は2倍小さくなります(デフォルト: 4
)X軸
- 表示される画像の左上隅のX軸での位置、0
は左端です(デフォルト: 0
)Y軸
- 表示される画像の左上隅のY軸での位置、0
は上端です(デフォルト: 0
)幅
- 画像の幅(デフォルト: 1920
)高さ
- 画像の高さ(デフォルト: 1080
)K1, K2, P1, P2, K3
- プラムボブモデルのカメラ歪み係数(デフォルト: 0, 0, 0, 0, 0
)カメラオブジェクト
- 基本的なカメラコンポーネントへの参照(デフォルト: None
)歪みシェーダー
- 歪みシェーダーの機能に関するComputeShaderアセットへの参照(デフォルト: None
)Rosイメージシェーダー
- Rosイメージシェーダーの機能に関するComputeShaderアセットへの参照(デフォルト: None
)センサー計算の出力形式は以下の通りです:
+カテゴリー | +タイプ | +説明 | +
---|---|---|
ImageDataBuffer | +byte[ ] | +画像データのバッファ | +
CameraParameters | +CameraParameters | +カメラパラメータのセット | +
CameraSensor
からのデータ出力をROS2の Image および CameraInfo タイプのメッセージに変換し、それらを公開します。
+変換および公開は、現在の出力のcallback
である Publish(CameraSensor.OutputData outputData)
メソッドを使用して実行されます。
常に全体の画像が公開されるため、メッセージの ROI
フィールドは常にゼロで埋められています。
+スクリプトはまた、binning
がゼロであると仮定し、補正行列が単位行列であることを確認します。
警告
+このスクリプトは CameraSensorスクリプト で設定されたカメラパラメータを使用します - 使用するカメラに応じてそれらを設定することを忘れないでください。
+以下はエディターレベルから設定可能な要素です。
+イメージトピック
- Image
メッセージが公開される ROS2 トピック(デフォルト: "/sensing/camera/traffic_light/image_raw"
)カメラインフォトピック
- CameraInfo
メッセージが公開される ROS2 トピック(デフォルト: "/sensing/camera/traffic_light/camera_info"
)フレームID
- データが公開されるフレーム、Header
で使用されます(デフォルト: "traffic_light_left_camera/camera_link"
)QoS設定
- 公開に使用される品質サービスプロファイル(デフォルト: ベストエフォート
、ボラタイル
、最後の状態を保持
、1
)10Hz
ベストエフォート
、ボラタイル
、最後の状態を保持/1
カテゴリー | +トピック | +メッセージタイプ | +frame_id |
+
---|---|---|---|
カメラ情報 | +/sensing/camera/traffic_light/camera_info |
+sensor_msgs/CameraInfo |
+traffic_light_left_camera/camera_link |
+
カメラ画像 | +/sensing/camera/traffic_light/image_raw |
+sensor_msgs/Image |
+traffic_light_left_camera/camera_link |
+
IMUSensor
is a component that simulates an IMU (Inertial Measurement Unit) sensor.
+Measures acceleration (\({m}/{s^2}\)) and angular velocity (\({rad}/{s}\)) based on the transformation of the GameObject to which this component is attached.
Prefab can be found under the following path:
+Assets/AWSIM/Prefabs/Sensors/IMUSensor.prefab
+
IMUSensor
has its own frame tamagawa/imu_link
in which its data is published.
+The sensor prefab is added to this frame.
+The tamagawa/imu_link
link is added to the sensor_kit_base_link
in the base_link
object located in the URDF
.
A detailed description of the URDF
structure and sensors added to prefab Lexus RX450h 2015
is available in this section.
The IMUSensor
functionality is split into two scripts:
IMUSensor
output as Imu message type published on a specific ROS2 topics.Scripts can be found under the following path:
+Assets/AWSIM/Scripts/Sensors/Imu/*
+
This is the main script in which all calculations are performed:
+Warning
+If the angular velocity about any axis is NaN
(infinite), then angular velocity is published as vector zero.
Output Hz
- frequency of output calculation and callback (default: 30Hz
)Category | +Type | +Description | +
---|---|---|
LinearAcceleration | +Vector3 | +Measured acceleration (m/s^2) | +
AngularVelocity | +Vector3 | +Measured angular velocity (rad/s) | +
Converts the data output from IMUSensor
to ROS2 Imu type message and publishes it.
+The conversion and publication is performed using the Publish(IMUSensor.OutputData outputData)
method, which is the callback
triggered by IMU Sensor (script) for the current output.
Warning
+In each 3x3 covariance matrices the row-major representation is filled with 0
and does not change during the script run.
+In addition, the field orientation
is assumed to be {1,0,0,0}
and also does not change.
Topic
- the ROS2 topic on which the message is published"/sensing/imu/tamagawa/imu_raw"
)Frame id
- frame in which data is published, used in Header
tamagawa/imu_link"
)Qos Settings
- Quality of service profile used in the publicationReliable
, Volatile
, Keep last
, 1000
)30Hz
Reliable
, Volatile
, Keep last/1000
Category | +Topic | +Message type | +frame_id |
+
---|---|---|---|
IMU data | +/sensing/imu/tamagawa/imu_raw |
+sensor_msgs/Imu |
+tamagawa/imu_link |
+
この文書は Material for MkDocs を使用しています。
+MkDocs
用の Material をインストールします。
+
python3 -m pip install mkdocs-material
+
ローカルホスティングを開始します。 +
$ cd CoRE.SIM
+$ python3 -m mkdocs serve
+
+ INFO - Building documentation...
+ INFO - Cleaning site directory
+ INFO - Documentation built in 0.16 seconds
+ INFO - [03:13:22] Watching paths for changes: 'docs', 'mkdocs.yml'
+ INFO - [03:13:22] Serving on http://127.0.0.1:8000/
+
ウェブブラウザで http://127.0.0.1:8000/
にアクセスします。
+
詳細は Material for MkDocs - 入門 を参照してください。
+新しいドキュメンテーションファイルには、次の /docs
ディレクトリと mkdocs.yml
を使用します。
CoRE.SIM
+├─ docs/ // 各ドキュメントのマークダウンと画像ファイル
+└─ mkdocs.yml // MkDocs の設定
+
各ドキュメントごとにディレクトリを作成します。例えば、この "Documentation" ページのディレクトリ構造は次のようになるかもしれません。
+CoRE.SIM
+└─ docs/ // すべてのドキュメントのルート
+ └─ DeveloperGuide // カテゴリ
+ └─ Documentation // 各ドキュメントのルート
+ ├─ index.md // マークダウンファイル
+ └─ image_0.png // マークダウンファイルで使用される画像
+
CoRE.SIMおよびAWSIMライセンスはtier4/AWSIMリポジトリおよびReleasesに含まれるすべてのコンテンツに適用されます。
+*.cs
*.compute
*.xml
)*.fbx
*.pcd
*.osm
*.png
*.anim
*.unitypackage
*.x86_64
)**********************************************************************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2022 TIER IV, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
**********************************************************************************
+
+Attribution-NonCommercial 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-NonCommercial 4.0 International Public
+License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-NonCommercial 4.0 International Public License ("Public
+License"). To the extent this Public License may be interpreted as a
+contract, You are granted the Licensed Rights in consideration of Your
+acceptance of these terms and conditions, and the Licensor grants You
+such rights in consideration of benefits the Licensor receives from
+making the Licensed Material available under these terms and
+conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. NonCommercial means not primarily intended for or directed towards
+ commercial advantage or monetary compensation. For purposes of
+ this Public License, the exchange of the Licensed Material for
+ other material subject to Copyright and Similar Rights by digital
+ file-sharing or similar means is NonCommercial provided there is
+ no payment of monetary compensation in connection with the
+ exchange.
+
+ j. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ k. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ l. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part, for NonCommercial purposes only; and
+
+ b. produce, reproduce, and Share Adapted Material for
+ NonCommercial purposes only.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties, including when
+ the Licensed Material is used other than for NonCommercial
+ purposes.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database for NonCommercial purposes
+ only;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.” The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org
+
Info
+現在、Unityプロジェクトのセットアップのチュートリアルが推奨されています。
+以下に、CoRE.SIMシミュレーションのセットアップ手順があります。この手順はUbuntu OSを使用することを前提としています。
+シミュレーションを正しく実行するために、コンピュータが以下の要件を満たしていることを確認してください:
+必要なPC仕様 | ++ |
---|---|
OS | +Ubuntu 22.04 | +
CPU | +4コアと8スレッド以上 | +
GPU | +GTX 1070以上 | +
NVIDIAドライバー(Ubuntu 22) | +>=515.43.04 | +
シミュレーションは、CoRE.SIMシミュレーションとROS 2ソフトウェアのトラブルフリーな通信を可能にする適切なネットワーク設定に基づいています。
+必要なローカルホスト設定を適用するには、次の行を~/.bashrc
および~/.profile
ファイルに追加してください。
source /opt/ros/humble/setup.bash
+export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
+
シミュレータを実行するには、以下の手順に従ってください。
+sudo apt update
+sudo ubuntu-drivers autoinstall
+
sudo reboot
+
ターミナルを開いて、nvidia-smi
コマンドが利用可能で、以下に示すような要約を出力するか確認します。
+
$ nvidia-smi
+Fri Oct 14 01:41:05 2022
++-----------------------------------------------------------------------------+
+| NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 |
+|-------------------------------+----------------------+----------------------+
+| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
+| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
+| | | MIG M. |
+|===============================+======================+======================|
+| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
+| 37% 31C P8 30W / 250W | 188MiB / 11264MiB | 3% Default |
+| | | N/A |
++-------------------------------+----------------------+----------------------+
+
++-----------------------------------------------------------------------------+
+| Processes: |
+| GPU GI CI PID Type Process name GPU Memory |
+| ID ID Usage |
+|=============================================================================|
+| 0 N/A N/A 1151 G /usr/lib/xorg/Xorg 133MiB |
+| 0 N/A N/A 1470 G /usr/bin/gnome-shell 45MiB |
++-----------------------------------------------------------------------------+
+
Vulkan Graphics Libraryをインストールします(すでにインストールされている場合はスキップ)。
+sudo apt update
+
ライブラリをインストールします。 +
sudo apt install libvulkan1
+
CoRE.SIMデモバイナリをダウンロードして実行します。
+CoRE.SIM.zip
をダウンロードします。
ダウンロードしたファイルを解凍します。
+CoRE.SIM.x86_64
ファイルに実行権限を付与します。
CoRE.SIM.x86_64
ファイルを右クリックし、実行
のチェックボックスをオンにします
または、以下のコマンドを実行します。
+chmod +x <CoRE.SIMフォルダへのパス>/CoRE.SIM.x86_64
+
CoRE.SIM.x86_64
を起動します。
+
./<CoRE.SIMフォルダへのパス>/CoRE.SIM.x86_64
+
!!! 注意
+ アプリケーションが起動するまでに時間がかかる場合があるので、アプリケーションウィンドウに以下に似た画像が表示されるまでお待ちください。
+
+このページは、CoRE.SIM Unityプロジェクトのセットアップに関するチュートリアルです。
+Ubuntu 22.04 & Ubuntu 20.04
+source /opt/ros/humble/setup.bash
+export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
+
このページの指示に従ってください。
+公開署名キーを追加するには、ターミナルで次のコマンドを実行します: +
wget -qO - https://hub.unity3d.com/linux/keys/public | gpg --dearmor | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
+
Unity Hubリポジトリを含めるには、/etc/apt/sources.list.d
にエントリーを作成する必要があります。以下のコマンドを使用してUnity Hubリポジトリを追加します:
+
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
+
パッケージキャッシュを更新し、次のコマンドでUnity Hubをインストールします: +
sudo apt update
+sudo apt install unityhub
+
Unity Hubを起動し、ライセンスを取得します。ほとんどのユーザーにとって、個人用ライセンスが十分でしょう。
+UnityエディターでUnity CoRE.SIMプロジェクトを開くには:
+CoRE.SIMリポジトリをクローンしていることを確認してください +
git clone https://github.com/StrayedCats/CoRE.SIM.git
+
Unity Hubを起動します。
+Unity Hubでプロジェクトを開きます
+Add
ボタンをクリックCoRE.SIMリポジトリがクローンされたディレクトリに移動
+Unityエディターをインストール
+Warning
+UnityEditorを起動する際にセーフモードのダイアログが表示される場合、opensslをインストールする必要があるかもしれません。
+wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
Assets/CoRE/
ディレクトリの下に配置された OutdoorScene.unity
シーンを開きます。Play
ボタンをクリックしてシミュレーションを実行します。
+
+{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Ha=/["'&<>]/;Un.exports=$a;function $a(e){var t=""+e,r=Ha.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i