Skip to content

Commit 33ec22c

Browse files
authored
Repo update (Kinovarobotics#220)
* Creating Gen3 Lite specific instructions and launch file * Updating MoveIt configurations * Updating and restructuring instructions
1 parent cfb5180 commit 33ec22c

File tree

21 files changed

+922
-153
lines changed

21 files changed

+922
-153
lines changed

README.md

Lines changed: 141 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -173,68 +173,167 @@ colcon build --packages-select-regex '.*kortex.*' '.*gen3.*'
173173
```
174174

175175
## Usage
176-
<!-- TODO(moriarty) this section is an information overload -->
177-
178-
To launch and view the robots URDF run:
176+
To launch and view any of the robot's URDF run:
179177

180178
```bash
181179
ros2 launch kortex_description view_robot.launch.py
182180
```
183181

184-
To simulate the 7 DoF Kinova Gen3 robot arm with mock hardware:
182+
The accepted arguments are:
183+
184+
* `robot_type` : Your robot model. Possible values are either `gen3` or `gen3_lite`, the default is `gen3`.
185+
186+
* `gripper` : Gripper to use. Possible values for the Gen3 are either `robotiq_2f_85` or `robotiq_2f_140`. For the Gen3 Lite, the only option is `gen3_lite_2f`. Default value is an empty string, which will display the arm without a gripper.
187+
188+
* `dof` : Degrees of freedom of the arm. Possible values for the Gen3 are either `6` or `7`. For the Gen3 Lite, the only option is `6`. Default value is `7`.
189+
190+
### Gen 3 Robots
191+
192+
The `gen3.launch.py` launch file is designed to be used for Gen3 arms. The typical use case to bringup and visualize the 7 DoF Kinova Gen3 robot arm (default) with mock hardware on Rviz:
185193

186194
```bash
187195
ros2 launch kortex_bringup gen3.launch.py \
188196
robot_ip:=yyy.yyy.yyy.yyy \
189197
use_fake_hardware:=true
190198
```
191199

192-
To generate motion plans and execute them with a simulated 7 DoF Kinova Gen3 arm with mock hardware:
200+
Alternatively, for a physical robot:
193201

194202
```bash
195-
ros2 launch kinova_gen3_7dof_robotiq_2f_85_moveit_config robot.launch.py \
196-
robot_ip:=yyy.yyy.yyy.yyy \
197-
use_fake_hardware:=true
203+
ros2 launch kortex_bringup gen3.launch.py \
204+
robot_ip:=192.168.1.10 \
205+
```
206+
You can specify the following arguments if you wish to change your arm configuration:
207+
208+
* `robot_type`: Your robot model. Default value (and only one) is `gen3`.
209+
210+
* `gripper` : Gripper to use. Possible values for the Gen3 are either `robotiq_2f_85`, `robotiq_2f_140` or `""`. Default is `robotiq_2f_85`. An empty string will not initialise any gripper.
211+
212+
* `gripper_joint_name` : Name of the controlled joint of the gripper attached to the arm. Default value is `robotiq_85_left_knuckle_joint`.
213+
214+
* `use_internal_bus_gripper_comm` : Use internal bus for gripper communication. Default value is `true`.
215+
216+
* `gripper_max_velocity` : Max velocity for gripper commands. Default value is `100.0`.
217+
218+
* `gripper_max_force` : Max force for gripper commands. Default value is `100.0`.
219+
220+
* `dof` : Degrees of freedom of the arm. Possible values are either `6` or `7`.Default value is `7`.
221+
222+
* `robot_ip` : IP address by which the robot can be reached. No default is specified, this is a required argument. All arms are shipped with address `192.168.1.10`, but if you have reassigned your physical arm's robot IP address, then you will need to assign that ip address.
223+
224+
* `use_fake_hardware` : Start robot with fake hardware mirroring command to its states. Default value is `false`.
225+
226+
* `fake_sensor_commands` : Enable fake command interfaces for sensors used for simple simulations. Used only if 'use_fake_hardware' parameter is true. Default value is `false`.
227+
228+
* `robot_controller` : Robot controller to start. Possible values are `twist_controller` and `joint_trajectory_controller`.Default value is `joint_trajectory_controller`.
229+
230+
* `controllers_file` : Ros 2 control configuration file to use. Default value is `ros2_controllers.yaml`
231+
232+
* `launch_rviz` : Start an Rviz window to visualize the robot. Default value is `true`.
233+
234+
#### Robotiq gripper
235+
236+
The Robotiq 2f 85 (or 2f 140) Gripper will be available on the Action topic:
237+
238+
```bash
239+
/robotiq_gripper_controller/gripper_cmd
198240
```
199241

200-
Alternatively, if you wish to use the Kinova Gen3's 6 DoF variant:
242+
You can test the gripper by calling the Action server with the following command and setting the desired `position` of the gripper (`0.0=open`, `0.8=close`)
201243

202244
```bash
203-
ros2 launch kortex_bringup gen3.launch.py \
204-
robot_ip:=yyy.yyy.yyy.yyy \
205-
use_fake_hardware:=true \
206-
dof:=6
245+
ros2 action send_goal /robotiq_gripper_controller/gripper_cmd control_msgs/action/GripperCommand "{command:{position: 0.0, max_effort: 100.0}}"
207246
```
208247

209-
and to bring up the Kinova Gen3 6 DoF with MoveIt:
248+
### Gen 3 Lite Robot
249+
250+
The `gen3_lite.launch.py` launch file is designed to be used for Gen3 Lite arms. The typical use case to bringup the robot arm with mock hardware:
210251

211252
```bash
212-
ros2 launch kinova_gen3_6dof_robotiq_2f_85_moveit_config robot.launch.py \
253+
ros2 launch kortex_bringup gen3_lite.launch.py \
213254
robot_ip:=yyy.yyy.yyy.yyy \
214255
use_fake_hardware:=true
215256
```
216-
217-
Alternatively, if you wish to use the Kinova Gen3_lite's 6 DoF variant:
257+
Alternatively, if you wish to use the physical robot:
218258

219259
```bash
220-
ros2 launch kortex_bringup gen3.launch.py \
221-
robot_ip:=yyy.yyy.yyy.yyy \
222-
use_fake_hardware:=true \
223-
robot_type:=gen3_lite \
224-
gripper:=gen3_lite_2f \
225-
dof:=6
260+
ros2 launch kortex_bringup gen3_lite.launch.py \
261+
robot_ip:=192.168.1.10 \
226262
```
227263

228-
To simulate the 7dof Kinova Gen3 robot with ignition run the following:
264+
You can specify the following arguments if you wish to change your arm configuration:
265+
266+
* `robot_type`: Your robot model. Default value (and only one) is `gen3_lite`.
267+
268+
* `gripper` : Gripper to use. Default value (and only one) is `gen3_lite_2f`.
269+
270+
* `gripper_joint_name` : Name of the controlled joint of the gripper attached to the arm. Default value (and only one) is `right_finger_bottom_joint`.
271+
272+
* `use_internal_bus_gripper_comm` : Use internal bus for gripper communication. Default value is `true`.
273+
274+
* `gripper_max_velocity` : Max velocity for gripper commands. Default value is `100.0`.
275+
276+
* `gripper_max_force` : Max force for gripper commands. Default value is `100.0`.
277+
278+
* `robot_ip` : IP address by which the robot can be reached. No default is specified, this is a required argument. All arms are shipped with address `192.168.1.10`, but if you have reassigned your physical arm's robot IP address, then you will need to assign that ip address. If you're using an USB to Ethernet interface to connect your robot to your machine instead of USB via RNDIS, the ip address will be `192.168.2.10`.
279+
280+
* `use_fake_hardware` : Start robot with fake hardware mirroring command to its states. Default value is `false`.
281+
282+
* `fake_sensor_commands` : Enable fake command interfaces for sensors used for simple simulations. Used only if 'use_fake_hardware' parameter is true. Default value is `false`.
283+
284+
* `robot_controller` : Robot controller to start. Possible values are `twist_controller` and `joint_trajectory_controller`.Default value is `joint_trajectory_controller`.
285+
286+
* `controllers_file` : Ros 2 control configuration file to use. Default value is `ros2_controllers.yaml`
287+
288+
* `description_file` : URDF/XACRO description file with the robot. Default value is `gen3_lite_gen3_lite_2f.xacro`.
289+
290+
* `launch_rviz` : Start an Rviz window to visualize the robot. Default value is `true`.
291+
292+
293+
## Simulation
294+
The `kortex_sim_control.launch.py` launch file is designed to simulate all of our arm models, you just need to specify your configuration through the arguments. By default, the Gen3 7 dof configuration is used :
229295

230296
```bash
231297
ros2 launch kortex_bringup kortex_sim_control.launch.py \
232-
dof:=7 \
233298
use_sim_time:=true \
234299
launch_rviz:=false
235300
```
236301

237-
and to use MoveIt to command the robot:
302+
* `sim_ignition` : Use Ignition for simulation. Default value is `true`.
303+
* `sim_gazebo` : Use Gazebo Classic for simulation. Default value is `false`.
304+
* `robot_type` : Your robot model. Possible values are either `gen3` or `gen3_lite`.Default is `gen3`.
305+
* `robot_name` : Name you would like your robot to have. Default value is `gen3`.
306+
* `dof` : Degrees of freedom of the arm. Possible values are either `6` or `7`.Default value is `7`.
307+
* `vision` : Use arm mounted realsens. Possible values are either `true` or `false`. Default value is `false`. This option does not generate simulated images, it only loads up the robot's URDF that includes the vision link.
308+
* `robot_controller` : Robot joint controller to start. Default value is `joint_trajectory_controller`.
309+
* `robot_pos_controller` : Robot position controller to start. Default value is `twist_controller`.
310+
* `robot_hand_controller` : Robot gripper controller to start. Default value is `robotiq_gripper_controller`.
311+
* `controllers_file` : Ros 2 control configuration file to use. Default value is `ros2_controllers.yaml`
312+
* `description_package` : Description package with robot URDF/XACRO files. Default value is `kortex_description`.
313+
* `description_file` : URDF/XACRO description file with the robot. Default value is `kinova.urdf.xacro`.
314+
* `prefix` : Prefix of the joint names, useful for multi-robot setup. If changed, then also joint names in the controllers' configuration have to be updated. Default value is `""` (none).
315+
* `use_sim_time` : Use simulated clock. Default value is `true`.
316+
* `gripper` : Gripper to use. Possible values for the Gen3 are either `robotiq_2f_85`, `robotiq_2f_140` or `""`. Default is `robotiq_2f_85`. An empty string will not initialise any gripper.
317+
318+
#### MoveIt2
319+
320+
To generate motion plans and execute them with a simulated 7 DoF Kinova Gen3 arm with mock hardware:
321+
322+
```bash
323+
ros2 launch kinova_gen3_7dof_robotiq_2f_85_moveit_config robot.launch.py \
324+
robot_ip:=yyy.yyy.yyy.yyy \
325+
use_fake_hardware:=true
326+
```
327+
328+
and to bring up the Kinova Gen3 6 DoF with MoveIt:
329+
330+
```bash
331+
ros2 launch kinova_gen3_6dof_robotiq_2f_85_moveit_config robot.launch.py \
332+
robot_ip:=yyy.yyy.yyy.yyy \
333+
use_fake_hardware:=true
334+
```
335+
336+
To generate motion plans and execute them with an ignition simulated 7 DoF Kinova Gen3 arm (previously launched with the command at the [simulation](#simulation) section):
238337

239338
```bash
240339
ros2 launch kinova_gen3_7dof_robotiq_2f_85_moveit_config sim.launch.py \
@@ -247,9 +346,13 @@ To work with a physical robot and generate/execute paths with MoveIt run the fol
247346
ros2 launch kinova_gen3_7dof_robotiq_2f_85_moveit_config robot.launch.py \
248347
robot_ip:=192.168.1.10
249348
```
250-
**Note: If you have reassigned your physical arm's robot IP address, then you will need to assign that ip address to `robot_ip`**
251349

350+
**Note: Currently, MoveIt configs are only provided for Gen3 6 and 7 dof configurations. If you wish to use the Gen3 Lite with MoveIt, you can generate it with MoveIt's setup assisstant.**
351+
352+
353+
## Commanding the arm (physically and in simulation)
252354
You can command the arm by publishing Joint Trajectory messages directly to the joint trajectory controller:
355+
253356
```bash
254357
ros2 topic pub /joint_trajectory_controller/joint_trajectory trajectory_msgs/JointTrajectory "{
255358
joint_names: [joint_1, joint_2, joint_3, joint_4, joint_5, joint_6, joint_7],
@@ -259,6 +362,17 @@ ros2 topic pub /joint_trajectory_controller/joint_trajectory trajectory_msgs/Joi
259362
}" -1
260363
```
261364

365+
Depending on your robot type and its DoF, you will need to adapt the `joint_names` and `positions` properties accordingly. For the Gen3 Lite arm, the integrated gripper is considered as a joint, so to command it, it must be included in the `joint_names` array. (`0.0=open`, `1.0=close`):
366+
367+
```bash
368+
ros2 topic pub /joint_trajectory_controller/joint_trajectory trajectory_msgs/JointTrajectory "{
369+
joint_names: [joint_1, joint_2, joint_3, joint_4, joint_5, joint_6, right_finger_bottom_joint],
370+
points: [
371+
{ positions: [0, 0, 0, 0, 0, 0, 1], time_from_start: { sec: 10 } },
372+
]
373+
}" -1
374+
```
375+
262376
You can also command the arm using Twist messages. Before doing so, you must active the `twist_controller` and deactivate the `joint_trajectory_controller`:
263377
```bash
264378
ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController "{
@@ -291,18 +405,6 @@ ros2 service call /controller_manager/switch_controller controller_manager_msgs/
291405
}"
292406
```
293407

294-
The Robotiq 2f 85 Gripper will be available on the Action topic:
295-
296-
```bash
297-
/robotiq_gripper_controller/gripper_cmd
298-
```
299-
300-
You can test the gripper by calling the Action server with the following command and setting the desired `position` of thr gripper (`0.0=open`, `0.8=close`)
301-
302-
```bash
303-
ros2 action send_goal /robotiq_gripper_controller/gripper_cmd control_msgs/action/GripperCommand "{command:{position: 0.0, max_effort: 100.0}}"
304-
```
305-
306408
## Contents
307409

308410
The following is a description of the packages included in this repository.

kortex_bringup/launch/gen3.launch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def generate_launch_description():
2828
"robot_type",
2929
default_value="gen3",
3030
description="Type/series of robot.",
31-
choices=["gen3", "gen3_lite"],
3231
)
3332
)
3433
declared_arguments.append(
@@ -74,7 +73,7 @@ def generate_launch_description():
7473
"gripper",
7574
default_value="robotiq_2f_85",
7675
description="Name of the gripper attached to the arm",
77-
choices=["robotiq_2f_85", "gen3_lite_2f"],
76+
choices=["robotiq_2f_85", "robotiq_2f_140"],
7877
)
7978
)
8079
declared_arguments.append(

0 commit comments

Comments
 (0)