Skip to content

Commit

Permalink
Added docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
  • Loading branch information
delihus committed Dec 20, 2024
1 parent 49a27ab commit 753eaa1
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
69 changes: 69 additions & 0 deletions husarion_ugv_description/CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# husarion_ugv_description

## URDF - Robot Model Configuration

### Configure Components

Create `components.yaml` file with the desired components. Here's a sample configuration:

```yaml
components:
- type: MAN02
parent_link: cover_link
xyz: 0.2 -0.2 0.0
rpy: 0.0 0.0 0.0
device_namespace: ur5
```
In this example:
- `type`: MAN02: Specifies the component type.
- `parent_link`: cover_link: Defines the parent link to attach the component.
- `xyz`: 0.2 -0.2 0.0: Sets the position of the component.
- `rpy`: 0.0 0.0 0.0: Sets the rotation of the component.
- `device_namespace`: ur5: Sets the device namespace.

### Visualize Robot Model Configuration

To use the `ros2 launch` command to launch the `visualize_fake_robot.launch.py` file with a specified robot model and components configuration path, follow these steps:

1. Open a terminal.
2. Source build workspace.
3. Execute the following command:

```bash
ros2 launch husarion_ugv_description visualize_fake_robot.launch.py robot_model:=lynx use_joint_state_publisher:=true components_config_path:=$(pwd)/components.yaml
```

If you want to move the wheels or move the manipulator you can run the launch file with `joint_state_publisher_gui`:

```bash
ros2 launch husarion_ugv_description visualize_fake_robot.launch.py robot_model:=lynx use_joint_state_publisher_gui:=true components_config_path:=$(pwd)/components.yaml
```

### Overwrite Robot Model Configuration

To change the configuration let's add another manipulator to `components.yaml`:

```yaml
components:
- type: MAN02
parent_link: cover_link
xyz: 0.2 -0.2 0.0
rpy: 0.0 0.0 0.0
device_namespace: left_ur5
- type: MAN02
parent_link: cover_link
xyz: 0.2 0.2 0.0
rpy: 0.0 0.0 0.0
device_namespace: right_ur5
```

To use the `ros2 launch` command to launch the `overwrite_robot_description.launch.py` file with the appropriate arguments to overwrite the robot model, follow these steps:

1. Open a terminal.
2. Source workspace.
3. Execute the following command:

```bash
ros2 launch husarion_ugv_description overwrite_robot_description.launch.py robot_model:=lynx components_config_path:=$(pwd)/components.yaml
```
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def generate_launch_description():
use_joint_state_publisher = LaunchConfiguration("use_joint_state_publisher")
declare_use_joint_state_publisher_arg = DeclareLaunchArgument(
"use_joint_state_publisher",
default_value="True",
default_value="False",
description="Flag enabling joint_state_publisher to publish information about joints positions. Should be false when there is a controller that sends this information.",
choices=["True", "true", "False", "false"],
)
Expand Down

0 comments on commit 753eaa1

Please sign in to comment.