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

[WIP] Add PS4 controller interface in ExternalFootstepPlannerPlugin #6

Open
wants to merge 27 commits into
base: rebase_stabilizer_ana
Choose a base branch
from

Conversation

TsuruMasato
Copy link

@TsuruMasato TsuruMasato commented Jan 13, 2022

Hello, Dr.Arnaud.
This is Tsuru. This PR is a kind of progress report.

To integrate your large development of LIPM walking controller with AvatarController, I am now working on connection with Joystick.

========== Motivation ==============
I have read a new, your FSM state in AvatarController, "ROSInputState", it was very easy to integrate ROS inputs at once.

The shortest way is assigning some mc_datastore variables from ROSInputState.
But in future, we might want to use LIPM walking controller alone, without Avatar Controller.
So that I, embedded a Joystick Subscriber in LIPM walking controller today.

========== How I made ==============
Originally, there were 3 options, "World SE2", "Local SE2", and "Local Velocity".
So I have added 4th option, "PS4 Controller".

A new ROS subscriber locates in ExternalFootstepPlannerPlugin, and arise when users select "PS4 Walking" mode in a pull-down via RViz control panel.

My callback function receives sensor_msgs::Joy and assigns a new local target (SE2d) immediately.
Therefore, same as before, what any controller have to do is only calling the datastore service "ExternalFootstepPlanner::RequestPlan".

========== Future work ==============
Also, we may develop a new footstep planner and replace OnlineFootstepPlanner.cpp with it in future.
Even that case, we can easily use this joystick input in this PR, without using AvatarController.

About AvatarController, I might use your ROSInputState in the end.
But even at that case, I will call my new datastore service of "ExternalFootstepPlanner::SetJoystickVelocityTarget".
This function may be extended as input_convertor_node, which remaps buttons & keys from several kinds of controllers (Occulus and PS4).

@TsuruMasato
Copy link
Author

I have implemented Input Convertor class in the ExFootstepPlannerPlugin.

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

Successfully merging this pull request may close these issues.

2 participants