You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ Pointcloud asset was obtained from [potree](https://github.com/potree/potree).
192
192
193
193
# ROS2PoseControl
194
194
195
-
A utility gem that introduces a way to control robots in simulation as puppets with Pose messages or TFs.
195
+
The utility gem enabling controlling robots in simulation as puppets with Pose messages or TFs. For a more detailed description, check the [PoseControl user guide](./doc/UserGuide/PoseControl.md).
You can use the `ROS2PoseControl` component to control the robot or any arbitrary entity via ROS 2 position or tf messages.
3
+
You can use the `ROS2PoseControl` component to control the robot or any arbitrary entity via ROS 2 position or TF messages.
4
4
5
5
## Adding component
6
-
The ROS2PoseControl can be attached to the entity you wish to control.
6
+
The `ROS2PoseControl` can be attached to the entity you wish to control.
7
7
If you would like to have collisions with a controlled robot, you can add a Rigid Body Component.
8
8
If so, set its mode to Kinematic.
9
9
@@ -19,19 +19,38 @@ You can use this component in the following modes:
19
19
20
20
2. Using the [tf2](https://docs.ros.org/en/humble/Tutorials/Intermediate/Tf2/Introduction-To-Tf2.html) messages - the component will look for the transform frame specified by you and use it to transform the entity.
21
21
22
-
Option | Description
23
-
--------| -----
24
-
Is Tracking | Turns this component on/off
25
-
Tracking Mode | Select the tracking mode
26
-
Topic for goal message | Standard topic configuration (only used in mode PoseMessages)
27
-
Target Frame | Frame of the tractor (only used in mode TF2)
28
-
Reference Frame | Frame of the origin (only used in mode TF2)
29
-
Lock Z Axis | The Z axis will point up, preventing tilting
30
-
Start Offset Tag | If specified, the robot will controlled with the offset of the tagged entity
31
-
Clamp to ground | The controlled entity will follow the collider under the robot.
32
-
Ground offset | The offset to the collider is applied when the `Clamp to ground` option is used.
Topic for goal message | Standard topic configuration (only used in mode PoseMessages) |
27
+
Target Frame | Frame of the controlled entity/prefab (only used in mode TF2) |
28
+
Reference Frame | Frame of the origin (only used in mode TF2) |
29
+
Lock Z Axis | The Z axis will point up, preventing tilting |
30
+
Start Offset Tag | If specified, the robot will be controlled with the offset of the tagged entity |
31
+
Clamp to ground | The controlled entity will follow the collider under the robot. |
32
+
Ground offset | The offset to the collider is applied when the `Clamp to ground` option is used. |
33
33
34
34
35
35
## ImGui live options
36
36
37
-
Using the ~ key, you can pull up ImGui options. There, you will see two toggles using which you can modify the `Is Tracking` and `Tracking mode` settings live.
37
+
Using the `[Home]` key, you can pull up ImGui options. There, you will see two toggles using which you can modify the `Is Tracking` and `Tracking mode` settings live.
38
+
39
+
## Initial pose restoring
40
+
The `ROS2PoseControl` component can manage and restore the local transforms of a controlled entity and all its children. This is useful when working with prefabs. When the component is activated, the initial local transforms are saved, defining the "initial pose," which represents the prefab's state immediately after spawning and before any physics interactions occur.
41
+
The component supports three restoring policies:
42
+
-`Never` - the initial pose will never be restored.
43
+
-`Once` - the initial pose will be restored once after the first goal pose request to the `ROS2PoseControl`.
44
+
-`Everytime` - the initial pose will be restored every time the `ROS2PoseControl` receives a goal pose request.
45
+
46
+
## Usage
47
+
To use the `ROS2PoseControl` add it to an entity, that should be controlled (e.g., the root of the prefab), configure it according to your preferences (see [Configuration](#configuration)) and run GameMode or GameLauncher.
48
+
### Tracking Mode Pose Messages
49
+
If `ROS2PoseControl` component is configured to track `Pose Messages`, use the topic that has been set in the `Topic for control message` to send `geometry_msgs::msg::PoseStamped` messages with the desired pose.
If `ROS2PoseControl` component is configured to track `TF`, ensure that the frames defined in the `Target Frame` and `Reference Frame` fields are present in the scene, rosbag, or other environment to which ROS 2 has access. Additionally, both frames must be part of the same TF tree; otherwise, the component will not be able to calculate a lookup transform.
0 commit comments