-
Notifications
You must be signed in to change notification settings - Fork 0
Kinova arm operations
The MoveIt! framework enables motion planning, preset arm poses, obstacle avoidance, octomap calculation from depth, moving the arm interactively, etc.
-
Bringup needs to be launched to start the Kinova driver node. Launch MoveIt:
moveit_kinova # Which is aliased to: roslaunch mbot_kinova_arm_moveit kinova_demo.launch -
Visualize MoveIt: (run in local terminal)
moveit_kinova_rviz # Which is aliased to: rosrun rviz rviz -d ~/ros_ws/src/isr_monarch_robot/mbot_manipulation/kinova_vs_manipulation/rviz/moveit.rviz
-
Move to a predefined pose
mbot_class > mbot.kinova_manipulation.go_to_pose('mbot_resting') # resting pose > mbot.kinova_manipulation.move_to_resting() # same as above > mbot.kinova_manipulation.move_to_pose('mbot_walking') # walking pose to avoid arm collisions > mbot.kinova_manipulation.move_to_walking() # same as above -
List available poses
mbot_class > mbot.kinova_manipulation.get_available_poses() -
Control the gripper
open_gripper_kinova (alias) close_gripper_kinova (alias) # In mbot_class: > mbot.kinova_manipulation.open_gripper() > mbot.kinova_manipulation.close_gripper() # Control fingers individually (0 is fully open, 100 is fully closed): > mbot.kinova_manipulation.set_fingers(20, 20, 20)
-
In RViz, the MotionPlanning interface can be used to control the arm by dragging the end-effector and using the "Planning" tab.
-
The octomap of MoveIt's planning scene can also be seen in RViz.
-
To use predefined poses easily within RViz, you can connect to a local database (MoveIt Warehouse): in the MotionPlanning interface, "Context" tab, set the host to the same as $MBOT_IP, or 127.0.0.1 if inside the robot. Then you can use the "Stored States" tab.
-
In the robot, open the Kinova SDK:
/opt/JACO-SDK/GUI/DevelopmentCenter -
Use the "Virtual Joystick" tool to control the joints
- See this tutorial on using the C++ MoveGroupInterface to plan and execute motions, with the goal being either a 3D pose for the end-effector, or 6 joint angles. Most examples online are in C++, since Python bindings seem to have limited functionality. See this tutorial for Python.
-
Arm is in collision: try clearing the octomap, either in RViz ("Planning" tab) or by calling the "/clear_octomap" ROS service.
-
Arm is not controllable / its state is not being published: probably the "kinova_driver" node is down, try restarting it (restart mbot_bringup).
-
kinova_driver keeps failing: turn the arm off and on again, using the button on MBot's back.
-
Add predefined poses: in mbot_kinova_arm_moveit/config/mbot.srdf, the
<group_state>sections describe predefined poses. To add one, place the arm in an appropriate position (through RViz, SDK, or moving the arm when it's off and then turning it on) and runrostopic echo /kinova_driver/out/joint_state. This outputs the angle of each joint, to introduce in the<group_state>. -
About Kinova driver and topics: In our bringup (mbot_bringup/ros/launch/robot.launch) we start kinova's driver with the parameter kinova_robotName = kinova. If you use it without that parameter, it will default to the kinova_robotType, which is j2s6s300 - Jaco v2, 6 degrees-of-freedom, spherical hand. Since we use 'kinova', all arm-related topics will be namespaced with 'kinova...', and you can find them by
rostopic list | grep kinova. For example, a useful topic to see isrostopic echo /kinova_driver/out/joint_state. More info here: github.com/Kinovarobotics/kinova-ros