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

Controller handling different input types #835

Open
dylan-gonzalez opened this issue Nov 15, 2023 · 3 comments
Open

Controller handling different input types #835

dylan-gonzalez opened this issue Nov 15, 2023 · 3 comments

Comments

@dylan-gonzalez
Copy link

I have a use case where I want to have a four wheel steering controller. I was planning to write a new one and adapt it off of the tricycle steering controller. My problem is that my use case has an autonomous mode which uses nav2 to output a Twist command, and a manual mode which outputs a linear velocity and turning radius. The problem is that I can't think of a clean way for my controller to handle both of these modes (only one mode will be activated at a time) because they each have different topic types.

I've tried thinking about whether I could use a ros service to listen to autonomous mode and switch to listening to a Twist command, or dynamic parameter change. But honestly not too sure.

I've also considered chaining an Ackerman four wheel steering base controller with an Autonomous mode controller and manual mode controller to each handle their different topics.

I contemplated propagating the turning radius from manual mode through a Twist message (but this is ugly), and vice versa for autonomous mode with an Ackerman drive message.

The use case is a four wheel Rover with four drive motors and four pivot motors.

@christophfroehlich
Copy link
Contributor

Why don't you use two different controllers, and switch them depending on your control mode? Like we do it in example_1?

@dylan-gonzalez
Copy link
Author

Can I extend the steering_controllers_library to handle AckermannDrive msg types as well? Right now it seems that it only handles Twist messages

Although I'm a bit confused because in the header file they have a ref_subscriber_ackermann_ but it's of type ControllerTwistReferenceMsg ?

@christophfroehlich
Copy link
Contributor

Can I extend the steering_controllers_library to handle AckermannDrive msg types as well? Right now it seems that it only handles Twist messages

What do @destogl or @bmagyar think about that?

Although I'm a bit confused because in the header file they have a ref_subscriber_ackermann_ but it's of type ControllerTwistReferenceMsg ?

This is a bit misleading and will be fixed with #836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants