source /opt/ros/noetic/setup.bash
source ~/z1_ws/devel/setup.bash
roslaunch z1_bringup real_arm.launch rviz:=true
If you aren't using a real robot arm, you can simulate an arm in Gazebo.
roslaunch z1_bringup sim_arm.launch UnitreeGripperYN:=true rviz:=true
MoveIt provides a lot of functionality that can greatly speed up development-time:
- Motion Planning
- Manipulation
- Inverse Kinematics
- Control
- 3D Perception
- Collision Checking
An example MoveIt configuration is included in the z1_moveit_config package.
There are many ways to interact with MoveIt. The most interactive way is to use RVIZ. RVIZ can be started with the above launch scripts using the launch parameter, or can be started after using:
roslaunch z1_rviz view_robot.launch
The gripper is controlled using an action server. To send a gripper position, publish to the goal topic and set the command/position value to the angle you want the gripper to open to. Zero is closed, and negative values are open. You can monitor the status of the action through the feedback or result topics
rosrun z1_examples ros_gripper_ctrl -1
roslaunch z1_bringup real_ctrl.launch
This will open the z1_controller and gazebo.
roslaunch z1_bringup sim_ctrl.launch
Both cpp and python examples are provided here.
rosrun z1_sdk example_joint_ctrl
rosrun z1_sdk example_joint_ctrl.py
The user can also easily control the motors directly.
rosrun z1_sdk example_lowcmd
rosrun z1_sdk example_lowcmd.py