-
Notifications
You must be signed in to change notification settings - Fork 145
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
docs(tutorial): add traffic light in planning simulation: (1) use AutowareStatePanel for engaging the vehicle (2) add traffic light simulation #129
Conversation
9f9ffc2
to
2608685
Compare
…owareStatePanel for engaging the vehicle (2) add traffic light simulation Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
2608685
to
b1e6810
Compare
docs/how-to-guides/how-to-integrate-autoware-with-your-vehicle.md
Outdated
Show resolved
Hide resolved
My construction suggestion. Current version
My suggestionType 1
Type2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Set an initial pose and a goal pose, and engage the ego vehicle. |
I suggest adding
Note that a goal pose should be set in the parking area.
IMO, some people include me mistakenly think that wherever the car can park.
@shmpwk Thanks for sharing your idea. My suggestion is as follows Type 3Tutorial
====
|
Thanks, anyway I'll fix heading level and numbered/bulleted lists first |
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and suggestions added. I also noted the following:
- Since the page is called "Planning simulation" and it is in the tutorial section, I think that the "How to run a planning simulation" title can be removed and all sub-sections moved up in the heading hierarchy
- Most of the images have been reduced to a more appropriate size to make things easier to read (👍🏾), but not the parking simulation images. Will these be redone later on?
|
||
2. Set an initial pose for the ego vehicle. | ||
### Open Autoware State Panel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Open Autoware State Panel | |
### Add Autoware State Panel |
|
||
- a) Click the `2D Pose estimate` button in the toolbar, or hit the `P` key | ||
- b) In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the initial pose. | ||
This panel is useful when we start planning simulation. Click `Panels -> Add new panel`, select `AutowareStatePanel`, and then press `OK`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This panel is useful when we start planning simulation. Click `Panels -> Add new panel`, select `AutowareStatePanel`, and then press `OK`. | |
This panel is useful when running planning simulations. To add the panel, click `Panels -> Add new panel`, select `AutowareStatePanel`, and then click `OK`. |
### Place a dummy object | ||
|
||
You can skip this step. | ||
|
||
To place a dummy car/pedestrian, click the `2D Dummy Car` and/or `2D Dummy Pedestrian` button in the toolbar, and then set its pose by dragging on the map. You can set its velocity in `Tool Properties -> 2D Dummy Car/Pedestrian` panel. In the image the velocity is set to 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is simpler to mark the step as optional in the title. Thoughts or comments?
I also added some explanation about what zero velocity means for dummy objects.
### Place a dummy object | |
You can skip this step. | |
To place a dummy car/pedestrian, click the `2D Dummy Car` and/or `2D Dummy Pedestrian` button in the toolbar, and then set its pose by dragging on the map. You can set its velocity in `Tool Properties -> 2D Dummy Car/Pedestrian` panel. In the image the velocity is set to 0. | |
### Place a dummy object (optional) | |
To place a dummy car or pedestrian, click either the `2D Dummy Car` or the `2D Dummy Pedestrian` button in the toolbar, and then set its pose by dragging on the map. You can set the object's velocity in `Tool Properties -> 2D Dummy Car/Pedestrian` panel. In the image the velocity is set to 0 and so the dummy object will remain stationary. |
|
||
![set-dummy-car](images/planning/lane-following/place-dummy-car.png) | ||
|
||
To delete those objects, click the `Delete All Objects` button in the toolbar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To delete those objects, click the `Delete All Objects` button in the toolbar. | |
To delete any dummy objects placed in the view, click the `Delete All Objects` button in the toolbar. |
### Set traffic light | ||
|
||
You can skip this step. | ||
|
||
To simulate traffic light recognition, go to `Panels -> Add new panel`, select `TrafficLightPublishPanel`, and then press `OK`. Then in the panel you need to set the `ID` and color of the traffic light. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same reasoning as above.
### Set traffic light | |
You can skip this step. | |
To simulate traffic light recognition, go to `Panels -> Add new panel`, select `TrafficLightPublishPanel`, and then press `OK`. Then in the panel you need to set the `ID` and color of the traffic light. | |
### Set traffic light (optional) | |
To simulate traffic light recognition, first go to `Panels -> Add new panel`, select `TrafficLightPublishPanel`, and then click `OK`. Then in the panel, input the id of the traffic light that you want to test, choose the color for the light and then click the `SET` button. |
|
||
![start-driving](images/planning/lane-following/start-driving.png) | ||
Now you can start driving by clicking `Engage` button in `AutowareStatePanel`. Or you can also manually `engage` the vehicle by running this command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now you can start driving by clicking `Engage` button in `AutowareStatePanel`. Or you can also manually `engage` the vehicle by running this command. | |
Now you can start the ego vehicle driving by clicking the `Engage` button in `AutowareStatePanel`. Alteratively, you can manually engage the vehicle by running the following command: |
|
||
7. After that, the vehicle will restart driving and reach the goal. | ||
### Reset traffic light |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Reset traffic light | |
### Reset traffic light (optional) |
|
||
![restart-driving](images/planning/lane-following/restart-driving.png) | ||
You can reset the color of the traffic light and let the vehicle make a turn at the intersection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can reset the color of the traffic light and let the vehicle make a turn at the intersection. | |
If you previously set a traffic light to `RED` or `AMBER`, you can reset the color of the traffic light to `GREEN` and let the ego vehicle make a turn at the intersection. |
|
||
![set-dummy-pedestrian](images/planning/lane-following/set-dummy-pedestrian.png) | ||
1. Click the `2D Nav Goal` button in the toolbar, or hit the `G` key | ||
2. In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the goal pose. Keep in mind to set the goal pose aligned with the lane direction. Otherwise the path will not be planned. Now you will see a planned path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the warning about goal pose alignment to be a warning using the mkdocs admonition code block.
2. In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the goal pose. Keep in mind to set the goal pose aligned with the lane direction. Otherwise the path will not be planned. Now you will see a planned path. | |
2. In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the goal pose. If done correctly, you will see a planned path from initial pose to goal pose. | |
!!! warning | |
Remember to set the goal pose to be aligned with the lane direction, otherwise the path will not be planned! |
- a) Click the `2D Nav Goal` button in the toolbar, or hit the `G` key | ||
- b) In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the goal pose. | ||
1. Click the `2D Pose estimate` button in the toolbar, or hit the `P` key. | ||
2. In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the initial pose. The car should be placed in the right direction according to the lane(you can check the arrow on the lane). Now you will see a car on the Rviz. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the initial pose direction is opposite to that of the lane. Will the vehicle still be displayed? If the vehicle is displayed, will path planning fail after the goal pose is (correctly) set?
2. In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the initial pose. The car should be placed in the right direction according to the lane(you can check the arrow on the lane). Now you will see a car on the Rviz. | |
2. In the 3D View pane, click and hold the left-mouse button, and then drag to set the direction for the initial pose. An image representing the vehicle should now be displayed. | |
!!! warning | |
Remember to set the initial pose of the car in the same direction as the lane. To confirm the direction of the lane, check the arrowheads displayed on the map. |
Regarding the structure of these tutorials, I do not think that traffic light simulation should be separated from the planning simulator tutorial. Perhaps we could divide the tutorial into basic and advanced sections? For example:
|
Sounds good. We can discuss this later after the merge of #124 and autowarefoundation/autoware.universe#1010, which improves traffic light UI (and a bit easier). On the granularity of this page I agree with your idea -- traffic light simulation should be a "basic" one |
|
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
docs(tutorial): add traffic light in planning simulation: (1) use AutowareStatePanel for engaging the vehicle (2) add traffic light simulation
Signed-off-by: Mamoru Sobue mamoru.sobue@tier4.jp
Description
This PR updates the content of planning simulation tutorial.
(1) add description for how to use 'AutowareState panel' when the user engage the vehicle
(2) add description for the usage of traffic light panel, how to set/reset traffic light color during the simulation
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The Reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.