Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test articulations against vehicle dynamics #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Test Goal

- Check if ROS2 Control creates proper topics
- Check if messages are received and processed
- Check Vehicle dynamic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Check Vehicle dynamic
- Check Vehicle dynamics


# Test Perquisite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Test Perquisite
# Test Prerequisites


- Empty default Level
- ROS2 Gem activated
- Physx 5 enabled by : `-DAZ_USE_PHYSX5:BOOL=ON `
- O3DE Editor running


# Steps

## Step 1

Launch the system terminal and run:

```bash
source /opt/ros/humble/setup.bash
ros2 topic list -t
```

Leave the terminal open - it will be needed in the next steps.

> Note: make sure, no ROS services are runing on your computer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Note: make sure, no ROS services are runing on your computer
> Note: make sure, no ROS services are running on your computer


### Expected result

- It should NOT include any messages of type: `geometry_msgs/msg/Twist`
- It should NOT include any messages of type: `ackermann_msgs/msg/AckermannDrive`

## Step 2

Copy the file: [ackermann_robot_articulations.prefab](../Assets/ackermann_robot_articulations.prefab) into the Assets folder of your project and instantiate it. Move the robot to be located above the ground plane.

### Expected result

Your level should look like this:
![](images/control_initial_setup.png)

## Step 3

Press `Ctrl+G` to enter game mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Press `Ctrl+G` to enter game mode.
Press `Ctrl+G` to enter the game mode.


## Step 4

In the terminal run:

```bash
ros2 topic list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ros2 topic list
ros2 topic list -t

```

### Expected result

You should see something like this:

```bash
/base_link/ackermann_vel [ackermann_msgs/msg/AckermannDrive]
/clock [rosgraph_msgs/msg/Clock]
/parameter_events [rcl_interfaces/msg/ParameterEvent]
/rosout [rcl_interfaces/msg/Log]
/tf [tf2_msgs/msg/TFMessage]
/tf_static [tf2_msgs/msg/TFMessage]
```

Detailed list of topics may by different, but:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Detailed list of topics may by different, but:
The detailed list of topics may be different, but:

- It should include `/base_link/ackermann_vel` of type: `ackermann_msgs/msg/AckermannDrive`
- It should NOT include any messages of type: `geometry_msgs/msg/Twist`

## Step 5

In the terminal run:

```bash
ros2 topic pub -r 10 /base_link/ackermann_vel ackermann_msgs/msg/AckermannDrive "{steering_angle: 0.7, steering_angle_velocity: 0.0, speed: 2.0, acceleration: 0.0, jerk: 0.0}"
```

### Expected result

The robot should drive in circles.

![](images/control_result.gif)
Loading