The purpose of this package is to make integration of manipulators much simpler. Currently this package only includes Gen3 Lite integrations, but supported manipulators will be expanded over time.
This doc will cover the setup for a single Gen3 Lite Jackal.
Please see http://www.clearpathrobotics.com/assets/guides/melodic/jackal for additional information on configuring Jackal.
To clone this repository and all necessary dependencies:
git clone https://github.com/jackal/jackal_manipulator.git --recursive
In your URDF, make sure to include the jackal_manipulator description that you want. For example, if you are using a single Gen3 Lite, make sure to include the line below in your URDF:
<xacro:include filename="$(find jackal_kinova_description)/urdf/jackal_gen3_lite_description.urdf.xacro" />
You will then want to export your URDF as the URDF_EXTRA for your robot. This will "attach" it to the Jackal. It's convenient to add all of these into a single shell script file that can be sourced later. Make sure to source the initial script as that will make sure to set any other necessary environment variables.
source $(catkin_find jackal_kinova_description)/scripts/setup_jackal_gen3_lite_envar.sh
export JACKAL_URDF_EXTRAS=$(catkin_find your_description_package urdf/your_description.urdf.xacro --first-only)
Following above should make your Jackal with an arm attached to it. They will be attached in the default locations. If you need to change where the arm is mounted, export the necessary variables below.
JACKAL_KINOVA_XYZ
JACKAL_KINOVA_RPY
Example:
export JACKAL_KINOVA_XYZ="-0.3 0.0 0.2"
MoveIt is used to actually plan and move the arm. There are other ways to do this, but this is likely the easiest and most common.
The jackal_manipulator package has moveit configs setup already. That config should work out-of-the-box for your robot, but you may get weird collisions or warnings about missing joints. If your robot is custom, you can use that moveit config as a starting point for yours.
Go into the src folder in your workspace and run the command below:
rosrun jackal_gen3_lite_moveit_config customize_moveit.sh <new_package_name>
That command will make a new moveit package in your src folder that should be ready for customization to your actual platform.
To customize the moveit config, run the command below:
roslaunch <new_package_name> setup_assistant.launch
That command will bring up this window
Click Load Files. This will load the urdf into the configurator. Keep an eye on the terminal. You may see a couple of warnings if your config is very different from the default, but if you see a lot of warnings, something is likely not sourced properly. Cancel this and make sure everything is sourced properly and run this again. Check in the 3D view window on the right and make sure that is what your robot looks like. I have seen issues lately where the 3D window is empty. Not sure how to fix this.
Unless you want things to be very custom, there will likely be only 3 tabs you may need to change:
- Self-Collisions
- Robot Poses
- Passive Joints
Under this, drag the slider all the way to the right and click "Regenerate Default Collision Matrix". This may take a minute to run depending how complicated your model is. Once it is done, take a quick look through the collisions that have been automatically disabled. Take special notice of collisions that have been disabled because of "Collision by Default". This means that when the joints are at zeros, it is hitting something. Un-check any collisions that you do want to see if they happen.
These are saved, named positions that can be recalled later. If you want to add any pre-defined poses or modify the stow position that is already there, you can click "Add Pose" or "Edit Selected" and drag the sliders to set a new position.
Passive joints are joints that MoveIt doesn't need to worry about. These are things like wheel joints or PTUs. Under this menu, select anything that isn't an arm joint and make sure it is in the right list.
When you select Configuration Files, you may get a warning about files changing. That isn't a problem, just click OK.
The next step will show you the list of files that the wizard is responsible for. Make sure that nothing is selected except for:
- config/
- launch/
- config/jackal.srdf
If you modified more than the sections outlined above, you may need to edit other files, but this may have other consequences.
Once those files are selected, click Generate Package, then close down the wizard
There are 2 parts to working with this on the real robot:
Assuming the robot is all started up and the arm is setup, you should be able to run
roslaunch jackal_kinova_bringup jackal_gen3_lite_bringup.launch
If that worked properly, you should see the arm positioned properly in RVIZ or you should see the UR joints being published on the /joint_states topic
MoveIt! is the planning and execution interface for the arm. It runs separately from the driver. Run the MoveIt! configuration you created above with
roslaunch jackal_gen3_lite_moveit_config jackal_gen3_lite_moveit_planning_execution.launch
You should see no errors coming up in the terminal. You should now be able to add the Moveit MotionPlanning plugin in RVIZ and command the arm around!