Skip to content

Commit 8524e5c

Browse files
yuokamotoyuokamototetorea
authored
Doc update (#151)
* update documentation * update dependency --------- Co-authored-by: yuokamoto <[email protected]> Co-authored-by: torea Foissotte <[email protected]>
1 parent b2087e4 commit 8524e5c

File tree

4 files changed

+53
-38
lines changed

4 files changed

+53
-38
lines changed

docs/requirements.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
breathe
2-
myst-parser
2+
myst-parser
3+
sphinxcontrib-video
4+
sphinx-rtd-theme

docs/source/examples/publisher_example.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ Non Loop Publisher
355355
Compared to C++, which uses CreatePublisher(),
356356
in Blueprint, the Publisher is already generated as a Component before BeginPlay.
357357
Therefore, we use
358-
`UROS2NodeComponent::AddPublisher <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a582299af64efaaa34b046c00b1c96828>_`
358+
`UROS2NodeComponent::AddPublisher <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a582299af64efaaa34b046c00b1c96828>`_
359359
to initialize the Publisher instead.
360360
The CreatePublisher function in C++ internally calls AddPublisher.
361361

docs/source/examples/service_client_example.rst

+32-32
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Service Client Example
44
=============================
55

6-
Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project
6+
Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project
77
and open `ROS2ServiceExample.umap <https://github.com/rapyuta-robotics/turtlebot3-UE/blob/devel/Content/Maps/ROS2TopicExamples.umap>`_.
88

99
-----------------------------
@@ -121,10 +121,10 @@ Code
121121
}
122122
123123
^^^^^^^^^^^^^^^^^^
124-
Examin the code
124+
Examining the code
125125
^^^^^^^^^^^^^^^^^^
126126

127-
On an AROS2ServiceClientNode Actor, similar to the AROS2PublisherrNode,
127+
On an AROS2ServiceClientNode Actor, similar to the AROS2PublisherNode,
128128
NodeComponent is created and initialized in the constructor but ROS2 Node is not created here.
129129
Please check :ref:`publisher_examin_code` for the reason.
130130

@@ -140,8 +140,8 @@ Please check :ref:`publisher_examin_code` for the reason.
140140
}
141141

142142

143-
When the simulation starts, BeginPlay is called.
144-
In BeginPlay, firstly create and initialize the ROS2 Node by calling
143+
When the simulation starts, BeginPlay is called.
144+
In BeginPlay, firstly create and initialize the ROS2 Node by calling
145145
`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_
146146
.
147147

@@ -152,9 +152,9 @@ In BeginPlay, firstly create and initialize the ROS2 Node by calling
152152
Super::BeginPlay();
153153
Node->Init();
154154

155-
You can create a service client by using the
156-
`ROS2_CREATE_SERVICE_CLIENT_WITH_QOS <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#afc35f3065562037d23b39eb0baa32f0d>`_
157-
macro, which creates a service client and adds it to the node.
155+
You can create a service client by using the
156+
`ROS2_CREATE_SERVICE_CLIENT_WITH_QOS <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#afc35f3065562037d23b39eb0baa32f0d>`_
157+
macro, which creates a service client and adds it to the node.
158158
When the node receives a service response, AROS2ServiceClientNode::ReceiveResponse is called.
159159

160160

@@ -168,10 +168,10 @@ When the node receives a service response, AROS2ServiceClientNode::ReceiveRespon
168168
&AROS2ServiceClientNode::ReceiveResponse, // Callback for response
169169
UROS2QoS::DynamicBroadcaster,
170170
AddTwoIntsSrvClient)
171-
172-
The implementation of ROS2_CREATE_SERVICE_CLIENT_WITH_QOS is as follows.
173-
It uses Unreal Engine's dynamic delegate to call the bound function
174-
when the node receives the message.
171+
172+
The implementation of ROS2_CREATE_SERVICE_CLIENT_WITH_QOS is as follows.
173+
It uses Unreal Engine's dynamic delegate to call the bound function
174+
when the node receives the message.
175175
You can find more information about Unreal Engine's dynamic delegate .
176176
`here <https://docs.unrealengine.com/5.1/en-US/dynamic-delegates-in-unreal-engine/>`_.
177177

@@ -189,13 +189,13 @@ You can find more information about Unreal Engine's dynamic delegate .
189189
}
190190

191191
In this example, service client is set to send request periodically by create
192-
`UE Timer <https://docs.unrealengine.com/5.1/en-US/quick-start-guide-to-variables-timers-and-events-in-unreal-engine-cpp/>`_
192+
`UE Timer <https://docs.unrealengine.com/5.1/en-US/quick-start-guide-to-variables-timers-and-events-in-unreal-engine-cpp/>`_
193193
.
194194

195-
We create a `FTimerDelegate <https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/FTimerDelegate/>`_
196-
with a lambda function that will be called by the timer.
197-
Inside the lambda function, create the request structure (FROSAddTwoIntsReq)
198-
for the corresponding service (UROS2AddTwoIntsSrv).
195+
We create a FTimerDelegate
196+
with a lambda function that will be called by the timer.
197+
Inside the lambda function, create the request structure (FROSAddTwoIntsReq)
198+
for the corresponding service (UROS2AddTwoIntsSrv).
199199
Set the value of the request structure, and then send the request by calling SendRequest().
200200

201201
.. code-block:: C++
@@ -228,7 +228,7 @@ Then start a timer to call the sendRequest method every 1 second.
228228

229229
When the node receives a service response, AROS2ServiceClientNode::ReceiveResponse is called.
230230

231-
To retrieve the response, you need to create a response structure (FROSAddTwoIntsRes)
231+
To retrieve the response, you need to create a response structure (FROSAddTwoIntsRes)
232232
for the corresponding service (UROS2AddTwoIntsSrv) and retrieve the request by calling GetResponse().
233233

234234
ReceiveResponse method simply prints the received response in this example.
@@ -251,16 +251,16 @@ ReceiveResponse method simply prints the received response in this example.
251251
BP Service Client
252252
-----------------------------
253253

254-
Blueprint implementation of a service client is very similar to a C++ implementation.
254+
Blueprint implementation of a service client is very similar to a C++ implementation.
255255
Blueprints allow you to set logic/processes, parameters, and other details from the editor.
256256

257257
You can add components such as UROS2Publisher from `Components` panel in the editor (left side in the fig below)
258258
and set each component parameters in `Details` panel in the editor (right side in the fig below).
259259

260-
The main difference from the C++ implementation is that it uses
260+
The main difference from the C++ implementation is that it uses
261261
`UROS2ServiceClientComponent <../doxygen_generated/html/d1/db9/class_u_r_o_s2_service_client_component.html>`_
262-
instead of UROS2ServiceClient.
263-
As UROS2ServiceClientComponent is a child class of
262+
instead of UROS2ServiceClient.
263+
As UROS2ServiceClientComponent is a child class of
264264
`UActorComponent <https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/Components/UActorComponent/>`_
265265
and has UROS2ServiceClient as a member variable, you can easily add it to the Actor and set parameters from the editor.
266266

@@ -270,17 +270,17 @@ The Service client component is attached to an Actor, which is displayed in the
270270

271271
.. image:: ../images/service_client_node.png
272272

273-
Initialize the ROS2 Node using the BeginPlay event.
274-
You can set the ROSNode parameters, such as Name and Namespace,
273+
Initialize the ROS2 Node using the BeginPlay event.
274+
You can set the ROSNode parameters, such as Name and Namespace,
275275
from the `Details` panel on the right.
276276

277-
Compared to C++, which uses ROS2_CREATE_SERVICE_CLIENT_WITH_QOS,
278-
in Blueprint, the service client is already generated as a Component before BeginPlay.
279-
Therefore, we use
277+
Compared to C++, which uses ROS2_CREATE_SERVICE_CLIENT_WITH_QOS,
278+
in Blueprint, the service client is already generated as a Component before BeginPlay.
279+
Therefore, we use
280280
`UROS2NodeComponent::AddServiceClient <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a5e52bd6256f3c5db5c0392cee93d7156>`_
281-
to initialize the UROS2ServiceClient and
282-
`UROS2ServiceClient::SetDelegates <../doxygen_generated/html/d7/df5/class_u_r_o_s2_service_client.html#ae965105e696c1662ce1655249b9d864b>`_
283-
to bind callback method instead.
281+
to initialize the UROS2ServiceClient and
282+
`UROS2ServiceClient::SetDelegates <../doxygen_generated/html/d7/df5/class_u_r_o_s2_service_client.html#ae965105e696c1662ce1655249b9d864b>`_
283+
to bind callback method instead.
284284
The ROS2_CREATE_SERVICE_CLIENT_WITH_QOS macro in C++ internally calls CreateServiceClient which calls AddServiceClient and SetDelegates.
285285

286286
We also create a UE Timer to send request every 1 second.
@@ -292,5 +292,5 @@ Then increment the value of A and B and print those.
292292

293293
.. image:: ../images/service_client_res.png
294294

295-
Callback function is bound to a custom event, indicated by the red node on the left.
296-
This callback function is called when the node receives a response.
295+
Callback function is bound to a custom event, indicated by the red node on the left.
296+
This callback function is called when the node receives a response.

docs/source/overview.rst

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Overview of a group of **rclUE** software
2-
=====================================
2+
==========================================
33

44
Features
55
--------
@@ -15,10 +15,11 @@ Above figure shows overview of related repositories. Please reference this struc
1515

1616
`turtlebot3-UE <https://github.com/rapyuta-robotics/turtlebot3-UE>`_
1717
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18-
Example repository of ROS2 UE simulation.
18+
Basic example repository of ROS2 UE simulation.
1919

20-
rclUE(this repository)
21-
^^^^^^^^^^^^^^^^^^^^^^^^^^
20+
21+
`rclUE(this repository) <https://github.com/rapyuta-robotics/rclUE>`_
22+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2223
ROS2 integration features such as creating ROS2 Node, publisher/subscriber and etc.
2324

2425
`RapyutaSimulationPlugins <https://rapyutasimulationplugins.readthedocs.io/en/devel/index.html>`_
@@ -38,3 +39,15 @@ Please follow README to add new msgs to rclUE.
3839
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3940
Includes ROS2 msg/srv/action files. Please use `UE_tools <https://github.com/rapyuta-robotics/UE_tools>`_
4041
to generate necessary C++ files for UE plugins.
42+
43+
44+
Other example repositories
45+
--------------------------
46+
47+
`rclUE-Examples <https://github.com/yuokamoto/rclUE-Examples>`_
48+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49+
Complicated example repository of ROS2 UE simulation including warehouse, human character, etc.
50+
51+
`rclUE_client_example <https://github.com/yuokamoto/rclUE_client_example>`_
52+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53+
ROS2 Client example repository to control rclUE-Example project.

0 commit comments

Comments
 (0)