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

Vehicle dynamics #162

Merged
merged 30 commits into from
Sep 28, 2022
Merged

Vehicle dynamics #162

merged 30 commits into from
Sep 28, 2022

Conversation

adamdbrw
Copy link
Member

@adamdbrw adamdbrw commented Sep 7, 2022

Vehicle Dynamics, following the design document.

Tested and ready.

@adamdbrw adamdbrw added the enhancement New feature or request label Sep 7, 2022
@adamdbrw adamdbrw added this to the Milestone 2 milestone Sep 7, 2022
@adamdbrw adamdbrw marked this pull request as draft September 7, 2022 14:44
@adamdbrw adamdbrw force-pushed the vehicle_dynamics branch 3 times, most recently from 2c61118 to 2e0239b Compare September 14, 2022 11:15
@adamdbrw
Copy link
Member Author

@michalpelka please review logic (algorithms, correctness) only for now. Primary focus is the SimpleDriveModel

Copy link
Collaborator

@michalpelka michalpelka left a comment

Choose a reason for hiding this comment

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

More or less high level ideas and questions:

  • we probably need to add ramp generator for control values
  • why we need to apply torque everywhere e (consider applying velocity)
  • There is some issue with rotation speed computation.

@adamdbrw
Copy link
Member Author

Quite an important PR - I have added multiple reviewers but please do not feel obliged.

@adamdbrw adamdbrw moved this from In progress to In review in Milestone 2 Sep 22, 2022
Code/Source/RobotControl/Ackermann/AckermannBus.h Outdated Show resolved Hide resolved
Code/Source/VehicleDynamics/Utilities.cpp Outdated Show resolved Hide resolved
Code/Source/VehicleDynamics/Utilities.cpp Outdated Show resolved Hide resolved
Code/Source/VehicleDynamics/VehicleInputsState.h Outdated Show resolved Hide resolved
Code/Source/VehicleDynamics/VehicleModelComponent.cpp Outdated Show resolved Hide resolved
Code/Source/VehicleDynamics/WheelControllerComponent.h Outdated Show resolved Hide resolved
Code/ros2_files.cmake Show resolved Hide resolved
Code/Source/VehicleDynamics/WheelDynamicsData.h Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
* Wheel dynamics improvements:
- removed turning input negative (instead, set axis and input properly)
- wheel radius is now configurable (per axle), defaults to 0.35 meters
- drive wheels and steering elements are now computed on activation, instead of each frame
- some names have been changed to match the naming convention

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
- Added some documentation for interfaces
- Added checks for empty driving and steering elements with warnings
- removed hardcoded limits for speed and steering

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
* Created documentation related to Robot Control and Vehicle Model
- Updated User Guide: added sections for RC and VM
- Updated component lists and links
- Updated class diagrams for the Gem and Vehicle Model design.
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Copy link
Collaborator

@j-rivero j-rivero left a comment

Choose a reason for hiding this comment

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

Did not find a good place to report this: in the class diagram we have "ChassisConfiguration" and in the code I think it is named "VehicleConfiguration".

Left some minor comments and questions. Overall, as far as my understanding reaches, looks great. It is pretty hard to review such a large PR correctly, sorry if I left something behind.

docs/guides/ros2-gem.md Outdated Show resolved Hide resolved
Code/Source/RobotControl/Ackermann/AckermannBus.h Outdated Show resolved Hide resolved
Code/Source/RobotControl/Ackermann/AckermannBus.cpp Outdated Show resolved Hide resolved
docs/guides/ros2-gem.md Outdated Show resolved Hide resolved
Code/Source/VehicleDynamics/Utilities.h Show resolved Hide resolved
Code/Source/VehicleDynamics/VehicleInputControlBus.h Outdated Show resolved Hide resolved
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
- Improved documentation and diagrams
- Removed Buses implementations which were not doing anything

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
@adamdbrw
Copy link
Member Author

I addressed all the comments. I also added some Editor flair (min/max for user inputs on things like steering angle limit etc.) and removed one unnecessary field.
Diagrams have been updated.

@adamdbrw
Copy link
Member Author

@j-rivero everything should be addressed, you are welcome to take a look and comment / approve. We would like to merge it today.

@adamdbrw adamdbrw merged commit e27a3d3 into development Sep 28, 2022
@adamdbrw adamdbrw deleted the vehicle_dynamics branch September 28, 2022 12:05
@adamdbrw adamdbrw moved this from In review to Done in Milestone 2 Sep 28, 2022
@j-rivero
Copy link
Collaborator

@j-rivero everything should be addressed, you are welcome to take a look and comment / approve.

I just read about each of the comments, thanks for taking care Adam. Fixes were just fine. Nice PR.

michalpelka added a commit to michalpelka/o3de-ros2-gem-old that referenced this pull request Nov 22, 2022
* Vehicle dynamics:
- Reworked robot control configurations and buses
- Added additional components for handling Twist and AckermannDrive
- Replaced in-class behavior with a simple RigidBody controller
- Introduced VehicleDynamics classes similar to proposed design
- Some utilities are already implemented

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* formatting

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* added reflections, headers

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* vehicle dynamics. Compiles. Added ackermann_msgs dependency

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* vehicle dynamics fixes

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* fixes + manual control

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* merge fixes

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Drive models based on control_toolbox PID implementations

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Speed manual inputs are fixed, added debugs

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Some small tweaks tested against physic scene

Signed-off-by: Michał Pełka <michalpelka@gmail.com>
Co-authored-by: Pawel Budziszewski <pawel.budziszewski@robotec.ai>

* pid configuration and reflection (RobotecAI#189)

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* fix formating after rebase

* Added axis of steering and drive to wheel controller component

It allows to apply torque for steering and drive in correct direction

* Better handling of vehicle input limits and zeroing (RobotecAI#206)

* Better handling of vehicle input limits and zeroing
* reflect the limits

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Wheel dynamics improvements: (RobotecAI#213)

* Wheel dynamics improvements:
- removed turning input negative (instead, set axis and input properly)
- wheel radius is now configurable (per axle), defaults to 0.35 meters
- drive wheels and steering elements are now computed on activation, instead of each frame
- some names have been changed to match the naming convention

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Improvements to vehicle dynamics
- Added some documentation for interfaces
- Added checks for empty driving and steering elements with warnings
- removed hardcoded limits for speed and steering

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* fixes of fraction input

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* removed extra empty line: clang formatting

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Error messages, clamp, comments

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* review comments

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Created documentation related to Robot Control and Vehicle Model (RobotecAI#222)

* Created documentation related to Robot Control and Vehicle Model
- Updated User Guide: added sections for RC and VM
- Updated component lists and links
- Updated class diagrams for the Gem and Vehicle Model design.

* More checks in utilities

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* categories for vd components

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Resolving wheel and steering entities. Fixes RobotecAI#227 (RobotecAI#229)

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* applied review comments

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* typo

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Input limits, remove unnecessary visual entity

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* diagrams updated

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Applied review comments
- Improved documentation and diagrams
- Removed Buses implementations which were not doing anything

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Michał Pełka <michalpelka@gmail.com>
Co-authored-by: Michał Pełka <michalpelka@gmail.com>
Co-authored-by: Pawel Budziszewski <pawel.budziszewski@robotec.ai>
michalpelka added a commit to michalpelka/o3de-ros2-gem-old that referenced this pull request Nov 30, 2022
* Vehicle dynamics:
- Reworked robot control configurations and buses
- Added additional components for handling Twist and AckermannDrive
- Replaced in-class behavior with a simple RigidBody controller
- Introduced VehicleDynamics classes similar to proposed design
- Some utilities are already implemented

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* formatting

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* added reflections, headers

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* vehicle dynamics. Compiles. Added ackermann_msgs dependency

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* vehicle dynamics fixes

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* fixes + manual control

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* merge fixes

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Drive models based on control_toolbox PID implementations

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Speed manual inputs are fixed, added debugs

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Some small tweaks tested against physic scene

Signed-off-by: Michał Pełka <michalpelka@gmail.com>
Co-authored-by: Pawel Budziszewski <pawel.budziszewski@robotec.ai>

* pid configuration and reflection (RobotecAI#189)

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* fix formating after rebase

* Added axis of steering and drive to wheel controller component

It allows to apply torque for steering and drive in correct direction

* Better handling of vehicle input limits and zeroing (RobotecAI#206)

* Better handling of vehicle input limits and zeroing
* reflect the limits

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Wheel dynamics improvements: (RobotecAI#213)

* Wheel dynamics improvements:
- removed turning input negative (instead, set axis and input properly)
- wheel radius is now configurable (per axle), defaults to 0.35 meters
- drive wheels and steering elements are now computed on activation, instead of each frame
- some names have been changed to match the naming convention

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Improvements to vehicle dynamics
- Added some documentation for interfaces
- Added checks for empty driving and steering elements with warnings
- removed hardcoded limits for speed and steering

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* fixes of fraction input

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* removed extra empty line: clang formatting

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Error messages, clamp, comments

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* review comments

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Created documentation related to Robot Control and Vehicle Model (RobotecAI#222)

* Created documentation related to Robot Control and Vehicle Model
- Updated User Guide: added sections for RC and VM
- Updated component lists and links
- Updated class diagrams for the Gem and Vehicle Model design.

* More checks in utilities

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* categories for vd components

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Resolving wheel and steering entities. Fixes RobotecAI#227 (RobotecAI#229)

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* applied review comments

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* typo

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Input limits, remove unnecessary visual entity

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* diagrams updated

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Applied review comments
- Improved documentation and diagrams
- Removed Buses implementations which were not doing anything

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>
Signed-off-by: Michał Pełka <michalpelka@gmail.com>
Co-authored-by: Michał Pełka <michalpelka@gmail.com>
Co-authored-by: Pawel Budziszewski <pawel.budziszewski@robotec.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

9 participants