moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.03k stars 508 forks source link

Controller interface component node for servo (htc vive) #927

Open tylerjw opened 2 years ago

tylerjw commented 2 years ago

The xbox controller interface already exists here: https://github.com/ros-planning/moveit2/blob/main/moveit_ros/moveit_servo/src/teleop_demo/joystick_servo_example.cpp

I would like a similar system controller component node for the htc vive controller.

I would like an image like this one showing what each button (and joystick) does: vive_controller

This should go in a tutorial for how you use moveit_servo with this controller. An example launchfile that opens rviz with the panda in simulation using this controller should be included.

AndyZe commented 2 years ago

In ROS1 we used the teleop-tools package rather than creating an executable for each controller type. It lets you set up a new controller very easily, with just a config file.

See https://github.com/ros-planning/moveit/blob/master/moveit_ros/moveit_servo/launch/spacenav_teleop_tools.launch

But, there are some things the teleop-tools package can't do. For the Vive, you might need to integrate the motion. In that case, I guess a custom executable is necessary.

I don't want 8 executables for 8 different controller types -- that would be a lot of maintenance overhead.

Do we really want a launch file for every different controller type? Again, that is a lot of maintenance.

AndyZe commented 2 years ago

Thinking about it more, I'm quite sure there should be one launch file for the different teleop_tools controller types. An argument to switch between them would be great.

tylerjw commented 2 years ago

I am all for not copy-pasted code we have to maintain. If there is a more abstract solution that lets us implement a generic controller interface with a config for each I am all for that. @ParthasarathyBana do you want to look into this?

What I was trying to express with these is it would be really helpful if there was a really straightforward way for users to use many different controllers with good documentation it would be a welcome addition.

tylerjw commented 2 years ago

The launch file for this could exist in the moveit2_tutorials package if necessary but it would be really nice if someone could easily switch between controllers with standardized control interfaces that are well defined.