Startup regular MoveIt! planning node with Rviz (for example demo.launch)
In the Motion Planning plugin of Rviz, enable “Allow External Comm.” checkbox in the Planning tab.
Now launch the joystick control launch file specific to your robot. If you are missing this file, first re-run the MoveIt! Setup Assistant using the latest version of the Setup Assistant:
roslaunch YOURROBOT_moveit_config joystick_control.launch
This script can read three types of joy sticks:
Command | PS3 Controller | Xbox Controller | ——————— | —————— | —————— | +-x/y | left analog stick | left analog stick | +-z | L2/R2 | LT/RT | +-yaw | L1/R1 | LB/RB | +-roll | left/right | left/right | +-pitch | up/down | up/down | change planning group | select/start | Y/A | change end effector | triangle/cross | back/start | plan | square | X | execute | circle | B |
Add “Pose” to rviz Displays and subscribe to /joy_pose in order to see the output from joystick.
Note that only planning groups that have IK solvers for all their End Effector parent groups will work.