Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LBR iiwa with gripper robotiq_2f_85 #169

Open
antonio1matos opened this issue Apr 15, 2024 · 31 comments
Open

LBR iiwa with gripper robotiq_2f_85 #169

antonio1matos opened this issue Apr 15, 2024 · 31 comments
Assignees
Labels
enhancement New feature or request

Comments

@antonio1matos
Copy link

Recently, I started using the lbr iiwa14 arm. I used the launch file code: sim.launch.py from the lbr_bringup package. I wanted to add a gripper to the arm to start performing pick and place operations in the future, and the gripper I used was the robotiq_2f_85 found in https://github.com/PickNikRobotics/ros2_robotiq_gripper.
To add the gripper to the end-effector of the iiwa14 arm, I went to the iiwa14 urdf and added the following line:
<xacro:include filename="$(find robotiq_description)/urdf/robotiq_2f_85_gripper.urdf.xacro" />
So the iiwa14 urdf became:

<!-- include the lbr iiwa macro -->
<xacro:include filename="$(find lbr_description)/urdf/iiwa14/iiwa14_description.urdf.xacro" />

<xacro:arg name="robot_name" default="lbr" />
<xacro:arg name="port_id" default="30200" />
<xacro:arg name="sim" default="true" />

<!-- fixed to world, see http://classic.gazebosim.org/tutorials?tut=ros_urdf&cat=connect_ros -->
<link name="world" />

<!--joint
    between world and link_0-->
<joint name="world_joint" type="fixed">
    <parent link="world" />
    <child link="link_0" />
</joint>

<!-- iiwa -->
<xacro:iiwa14 robot_name="$(arg robot_name)" port_id="$(arg port_id)" sim="$(arg sim)" />

<!-- gripper -->
<xacro:include filename="$(find robotiq_description)/urdf/robotiq_2f_85_gripper.urdf.xacro" />
----------------------------------------- In the gripper urdf, I set the parent as link_ee so that the gripper would be fixed to the end-effector of the arm, making the gripper urdf: ----------------------------------------------
<!-- Import macros -->
<xacro:include filename="$(find robotiq_description)/urdf/robotiq_2f_85_macro.urdf.xacro" />

<xacro:robotiq_gripper name="RobotiqGripperHardwareInterface" prefix="" parent="link_ee" use_fake_hardware="$(arg use_fake_hardware)">
    <origin xyz="0 0 0" rpy="0 0 0" />
</xacro:robotiq_gripper>
--------------------------------------------------------- Then, from the iiwa14 urdf, which calls both the iiwa14 description and the gripper, I generate a new iiwa14_moveit_config using the setup assistant, which already includes the gripper. For example, in this new package (iiwa14_moveit_config), the moveit_controllers.yaml file already includes the gripper as follows: ----------------------------------------------- # MoveIt uses this configuration for controller management

moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager

moveit_simple_controller_manager:
controller_names:
- joint_trajectory_controller
- arm_controller
- hand_controller

joint_trajectory_controller:
type: FollowJointTrajectory
action_ns: follow_joint_trajectory
default: true
joints:
- A1
- A2
- A3
- A4
- A5
- A6
- A7
action_ns: follow_joint_trajectory
default: true
arm_controller:
type: FollowJointTrajectory
action_ns: follow_joint_trajectory
default: true
joints:
- A1
- A2
- A3
- A4
- A5
- A6
- A7
hand_controller:
type: FollowJointTrajectory
action_ns: follow_joint_trajectory
default: true
joints:
- robotiq_85_left_knuckle_joint

Finally, when I try to run the sim.launch.py launch file again, the arm already appears with the gripper, and it is possible to plan a movement, as shown in the attached image
Screenshot from 2024-04-15 12-07-32
However, when I use the execute command, it fails. I cannot execute the movement. I believe this is due to the fact that the terminal shows this:

[move_group-8] [WARN] [1713220742.262760755] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint

It is not able to detect the robotiq_85_left_knuckle_joint joint. I believe this may be due to the fact that in the sim.launch.py launch file, functions like LBRDescriptionMixin, LBRROS2ControlMixin are called, where in the launch files where I use these classes, I do not define the gripper, such as in LBRROS2ControlMixin I only define the controllers related to the arm and not the gripper. Therefore, I would like to know if anyone could tell me if my addition process to the arm is correct, and if so, what I should edit in the launch files present in the lbr-stack so that I can already execute the trajectory of the arm+gripper.

@mhubii
Copy link
Member

mhubii commented Apr 16, 2024

wow! This is awesome progress @antonio1matos , love it!

Would you be able to create a pull request, I can create a dev-branch for you. I can also add PRs to your fork, so we debug this together. Please if you could share your fork with me, that would be awesome!

Please also feel free to tag me (@mhubii) if you need quicker responses.

@mhubii mhubii self-assigned this Apr 16, 2024
@mhubii mhubii added the enhancement New feature or request label Apr 16, 2024
@antonio1matos
Copy link
Author

Ok, I'll try to do that. I'll let you know once it's done.

@antonio1matos
Copy link
Author

@mhubii do i have the rights to push the package i have on my pc?
antonio@antonio-HP-Pavilion-Laptop-15-cs1xxx:~/lbr-stack/src/lbr_fri_ros2_stack$ git push origin iiwa14_gripper
ERROR: Permission to lbr-stack/lbr_fri_ros2_stack.git denied to antonio1matos.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@mhubii
Copy link
Member

mhubii commented Apr 16, 2024

so you'd have to create a fork, see below

fork

you can then make changes to your fork and create a pull request. In turn, I can request changes to your fork. Once we are happy with everything, we can merge your fork back into this repository.

@antonio1matos
Copy link
Author

Hi @mhubii
Sorry to bother. I'm having difficulty adding the lbr-stack package with my changes to include the gripper on my GitHub. Do you think it's possible for me to send you the package in a zip file and for you to add it to GitHub so that both you and I have access?

@mhubii
Copy link
Member

mhubii commented Apr 16, 2024

that would be quite cumbersome, and I would prefer not to do it that way

@antonio1matos
Copy link
Author

OK, one question. After forking your repository, do I need to clone the forked repository again? Or since I already have the package on my PC with the changes made, do I just need to push it to GitHub?

@antonio1matos
Copy link
Author

Hi @mhubii
I think i already created the fork with my changes. You can see in this link: https://github.com/antonio1matos/lbr_fri_ros2_stack

@mhubii
Copy link
Member

mhubii commented Apr 16, 2024

Oh yes, true. That is something we can work on

@antonio1matos
Copy link
Author

antonio1matos commented Apr 16, 2024

Ok nice. If you then run: ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true you will see that the robot will appear with the gripper and you will be able to plan a trajetory. To do that you need to put in MOtion Planning -> Interactive Marker Size 0.2 to be able to move the arm the way you want in the rviz as you can see the in the following picture.
image
Btw you will also have to have the package from the github as you mentioned before: https://github.com/PickNikRobotics/ros2_robotiq_gripper

Btw in the robotiq_gripper package in the package robotiq_description -> folder urdf -> file 2f_85.ros2_control.xacro i added the link_ee in:

            <param name="link_ee">false</param> 

Instead of being:

            <!-- Set use_dummy to true to connect to a dummy driver for testing purposes. -->
            <param name="use_dummy">false</param> 

I put:

<xacro:macro name="robotiq_gripper_ros2_control" params="
    name
    prefix
    sim_ignition:=false
    sim_isaac:=false
    isaac_joint_commands:=/isaac_joint_commands
    isaac_joint_states:=/isaac_joint_states
    use_fake_hardware:=false
    fake_sensor_commands:=false
    com_port:=/dev/ttyUSB0">

    <ros2_control name="${name}" type="system">
        <!-- Plugins -->
        <hardware>

            <!-- Set use_dummy to true to connect to a dummy driver for testing purposes. -->
            <param name="link_ee">false</param>

After that if you run: ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true you will that problem that was showing in the terminal that was:
[move_group-8] [WARN] [1713220742.262760755] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
I think this is a simple problem, but as i said earlier i dont know what i need to change to be able to also execute the robot movement in the rviz.
Thank you for trying to help me

@mhubii
Copy link
Member

mhubii commented Apr 16, 2024

do you think it would be possible to put these changes into a new package under lbr_demos

@antonio1matos
Copy link
Author

antonio1matos commented Apr 16, 2024

Yes, i think so.
You want me to put the package of the gripper robotiq inside the package lbr_demo of from lbr_fri_ros2_stack?

@mhubii
Copy link
Member

mhubii commented Apr 16, 2024

maybe just a quick install instructions, or in case the package is on the ros index, might put it into package.xml

@antonio1matos
Copy link
Author

@mhubii
I dont know very well how to do that.
Can i put the roboiq package inside lbr_demos?
In that case you have all the packages needed to run the ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true correctly.

@antonio1matos
Copy link
Author

@mhubii do you want me to add you as collaborator in the repository: antonio1matos/lbr_fri_ros2_stack?

@mhubii
Copy link
Member

mhubii commented Apr 17, 2024

I can attempt to give you some high level suggestions, but you might need to work on some details yourself

@antonio1matos
Copy link
Author

Ok, sure. Any suggestion is always welcome.
I already was able to put the robot to execute the trajectory. The robot with the gripper is able to plan aand execute the trajectpry to the point that i want. However in the terminal it still always appears the following warninng:

[move_group-8] [WARN] [1713220742.262760755] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint

@antonio1matos
Copy link
Author

antonio1matos commented Apr 18, 2024

Hi @mhubii
AS you can see in this picture the robot is able to execute a certain trajectory:
image
However a problem that i have that im not understanding is the fact that some links of the gripper: robotiq_85_left_inner_knuckle_link, robotiq_85_right_inner_knuckle_link, robotiq_85_left_finger_tip_link and robotiq_85_right_finger_tip_link are not fixed in the rest of the gripper. This gripper links are loose and shaking in the gazebo. Do you know what could be the reason? In the rviz they are alright, but in the gazebo simulation they aren´t. This how this links look in gazebo.
image

@mhubii
Copy link
Member

mhubii commented Apr 18, 2024

it could be that they are uncontrolled, but unsure. Could you put your terminal output here?

@antonio1matos
Copy link
Author

antonio@antonio-HP-Pavilion-Laptop-15-cs1xxx:~$ ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true
[INFO] [launch]: All log files can be found below /home/antonio/.ros/log/2024-04-18-12-15-45-866222-antonio-HP-Pavilion-Laptop-15-cs1xxx-3996
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [3998]
[INFO] [gzclient-2]: process started with pid [4000]
[INFO] [spawn_entity.py-3]: process started with pid [4002]
[INFO] [spawner-4]: process started with pid [4004]
[INFO] [robot_state_publisher-5]: process started with pid [4006]
[INFO] [spawner-6]: process started with pid [4008]
[INFO] [static_transform_publisher-7]: process started with pid [4010]
[INFO] [move_group-8]: process started with pid [4012]
[static_transform_publisher-7] [INFO] [1713438947.622829782] [static_transform_publisher_1Dbz6kiJ4JkcRTD7]: Spinning until stopped - publishing transform
[static_transform_publisher-7] translation: ('0.000000', '0.000000', '0.000000')
[static_transform_publisher-7] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-7] from 'world' to 'lbr/world'
[robot_state_publisher-5] [INFO] [1713438947.638512117] [lbr.robot_state_publisher]: got segment link_0
[robot_state_publisher-5] [INFO] [1713438947.638683118] [lbr.robot_state_publisher]: got segment link_1
[robot_state_publisher-5] [INFO] [1713438947.638716110] [lbr.robot_state_publisher]: got segment link_2
[robot_state_publisher-5] [INFO] [1713438947.638741566] [lbr.robot_state_publisher]: got segment link_3
[robot_state_publisher-5] [INFO] [1713438947.638765657] [lbr.robot_state_publisher]: got segment link_4
[robot_state_publisher-5] [INFO] [1713438947.638789088] [lbr.robot_state_publisher]: got segment link_5
[robot_state_publisher-5] [INFO] [1713438947.638813234] [lbr.robot_state_publisher]: got segment link_6
[robot_state_publisher-5] [INFO] [1713438947.638837248] [lbr.robot_state_publisher]: got segment link_7
[robot_state_publisher-5] [INFO] [1713438947.638860677] [lbr.robot_state_publisher]: got segment link_ee
[robot_state_publisher-5] [INFO] [1713438947.638881733] [lbr.robot_state_publisher]: got segment robotiq_85_base_link
[robot_state_publisher-5] [INFO] [1713438947.638906532] [lbr.robot_state_publisher]: got segment robotiq_85_left_finger_link
[robot_state_publisher-5] [INFO] [1713438947.638930628] [lbr.robot_state_publisher]: got segment robotiq_85_left_finger_tip_link
[robot_state_publisher-5] [INFO] [1713438947.638954146] [lbr.robot_state_publisher]: got segment robotiq_85_left_inner_knuckle_link
[robot_state_publisher-5] [INFO] [1713438947.638967238] [lbr.robot_state_publisher]: got segment robotiq_85_left_knuckle_link
[robot_state_publisher-5] [INFO] [1713438947.638980072] [lbr.robot_state_publisher]: got segment robotiq_85_right_finger_link
[robot_state_publisher-5] [INFO] [1713438947.638999874] [lbr.robot_state_publisher]: got segment robotiq_85_right_finger_tip_link
[robot_state_publisher-5] [INFO] [1713438947.639024434] [lbr.robot_state_publisher]: got segment robotiq_85_right_inner_knuckle_link
[robot_state_publisher-5] [INFO] [1713438947.639047695] [lbr.robot_state_publisher]: got segment robotiq_85_right_knuckle_link
[robot_state_publisher-5] [INFO] [1713438947.639071715] [lbr.robot_state_publisher]: got segment world
[move_group-8] [INFO] [1713438947.714738343] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0 seconds
[move_group-8] [INFO] [1713438947.715144539] [moveit_robot_model.robot_model]: Loading robot model 'iiwa14'...
[spawn_entity.py-3] [INFO] [1713438948.221822485] [lbr.spawn_entity]: Spawn Entity started
[spawn_entity.py-3] [INFO] [1713438948.222283691] [lbr.spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-3] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[spawn_entity.py-3] warnings.warn(
[spawn_entity.py-3] [INFO] [1713438948.224545853] [lbr.spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-3] [INFO] [1713438948.226879103] [lbr.spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-3] [INFO] [1713438948.227275256] [lbr.spawn_entity]: Waiting for service /spawn_entity
[spawn_entity.py-3] [INFO] [1713438948.732115218] [lbr.spawn_entity]: Calling service /spawn_entity
[spawn_entity.py-3] [INFO] [1713438949.129035349] [lbr.spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [lbr]
[gzserver-1] [INFO] [1713438949.270125702] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-1] [INFO] [1713438949.274652822] [lbr.gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /lbr
[gzserver-1] [INFO] [1713438949.274880558] [lbr.gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-1] [INFO] [1713438949.278217544] [lbr.gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-1] [INFO] [1713438949.280370042] [lbr.gazebo_ros2_control]: Received urdf from param server, parsing...
[gzserver-1] [INFO] [1713438949.280457858] [lbr.gazebo_ros2_control]: Loading parameter files /home/antonio/lbr-stack/install/lbr_ros2_control/share/lbr_ros2_control/config/lbr_controllers.yaml
[gzserver-1] [INFO] [1713438949.297255995] [lbr.gazebo_ros2_control]: Loading joint: A1
[gzserver-1] [INFO] [1713438949.297313608] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.297331233] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297345517] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.297359408] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297372498] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.297384516] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297456277] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297496887] [lbr.gazebo_ros2_control]: Loading joint: A2
[gzserver-1] [INFO] [1713438949.297512675] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.297538762] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297551175] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.297563351] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297575214] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.297587253] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297622103] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297637888] [lbr.gazebo_ros2_control]: Loading joint: A3
[gzserver-1] [INFO] [1713438949.297650577] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.297662649] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297674780] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.297685797] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297698953] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.297712791] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297772061] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297803222] [lbr.gazebo_ros2_control]: Loading joint: A4
[gzserver-1] [INFO] [1713438949.297817304] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.297847098] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297862161] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.297889595] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297902769] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.297915727] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.297951496] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.297968188] [lbr.gazebo_ros2_control]: Loading joint: A5
[gzserver-1] [INFO] [1713438949.297980834] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.297992706] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.298004358] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.298016616] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.298028778] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.298041666] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.298075012] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.298107629] [lbr.gazebo_ros2_control]: Loading joint: A6
[gzserver-1] [INFO] [1713438949.298123116] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.298137959] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.298166186] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.298182221] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.298198055] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.298212651] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.298251235] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.298273723] [lbr.gazebo_ros2_control]: Loading joint: A7
[gzserver-1] [INFO] [1713438949.298301383] [lbr.gazebo_ros2_control]: State:
[gzserver-1] [INFO] [1713438949.298363715] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.298385664] [lbr.gazebo_ros2_control]: velocity
[gzserver-1] [INFO] [1713438949.298402438] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.298420479] [lbr.gazebo_ros2_control]: Command:
[gzserver-1] [INFO] [1713438949.298436348] [lbr.gazebo_ros2_control]: position
[gzserver-1] [INFO] [1713438949.298473864] [lbr.gazebo_ros2_control]: effort
[gzserver-1] [INFO] [1713438949.298600010] [resource_manager]: Initialize hardware 'lbr_system_interface'
[gzserver-1] [INFO] [1713438949.298876347] [resource_manager]: Successful initialization of hardware 'lbr_system_interface'
[gzserver-1] [INFO] [1713438949.299061213] [resource_manager]: 'configure' hardware 'lbr_system_interface'
[gzserver-1] [INFO] [1713438949.299080107] [resource_manager]: Successful 'configure' of hardware 'lbr_system_interface'
[gzserver-1] [INFO] [1713438949.299097133] [resource_manager]: 'activate' hardware 'lbr_system_interface'
[gzserver-1] [INFO] [1713438949.299107040] [resource_manager]: Successful 'activate' of hardware 'lbr_system_interface'
[gzserver-1] [ERROR] [1713438949.299166307] [lbr.gazebo_ros2_control]: The plugin failed to load for some reason. Error: According to the loaded plugin descriptions the class mock_components/GenericSystem with base class type gazebo_ros2_control::GazeboSystemInterface does not exist. Declared types are gazebo_ros2_control/GazeboSystem
[gzserver-1]
[gzserver-1] [INFO] [1713438949.299296343] [lbr.gazebo_ros2_control]: Loading controller_manager
[gzserver-1] [WARN] [1713438949.337095159] [lbr.gazebo_ros2_control]: Desired controller update period (0.01 s) is slower than the gazebo simulation period (0.001 s).
[gzserver-1] [INFO] [1713438949.337325299] [lbr.gazebo_ros2_control]: Loaded gazebo_ros2_control.
[INFO] [spawn_entity.py-3]: process has finished cleanly [pid 4002]
[gzserver-1] [INFO] [1713438949.376212353] [lbr.controller_manager]: Loading controller 'joint_trajectory_controller'
[gzserver-1] [WARN] [1713438949.409897839] [lbr.joint_trajectory_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[gzserver-1] [INFO] [1713438949.421269386] [lbr.controller_manager]: Loading controller 'joint_state_broadcaster'
[spawner-6] [INFO] [1713438949.420688287] [lbr.spawner_joint_trajectory_controller]: Loaded joint_trajectory_controller
[INFO] [rviz2-9]: process started with pid [4192]
[gzserver-1] [INFO] [1713438949.439848532] [lbr.controller_manager]: Configuring controller 'joint_trajectory_controller'
[gzserver-1] [INFO] [1713438949.440390437] [lbr.joint_trajectory_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[gzserver-1] [INFO] [1713438949.440448731] [lbr.joint_trajectory_controller]: Command interfaces are [position] and state interfaces are [position velocity].
[gzserver-1] [INFO] [1713438949.440475533] [lbr.joint_trajectory_controller]: Using 'splines' interpolation method.
[spawner-4] [INFO] [1713438949.440711605] [lbr.spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[gzserver-1] [INFO] [1713438949.442474255] [lbr.joint_trajectory_controller]: Controller state will be published at 50.00 Hz.
[gzserver-1] [INFO] [1713438949.453866060] [lbr.joint_trajectory_controller]: Action status changes will be monitored at 20.00 Hz.
[gzserver-1] [INFO] [1713438949.460609364] [lbr.controller_manager]: Configuring controller 'joint_state_broadcaster'
[gzserver-1] [INFO] [1713438949.460742099] [lbr.joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[rviz2-9] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[spawner-4] [INFO] [1713438949.491498057] [lbr.spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[spawner-6] [INFO] [1713438949.512298962] [lbr.spawner_joint_trajectory_controller]: Configured and activated joint_trajectory_controller
[INFO] [spawner-4]: process has finished cleanly [pid 4004]
[INFO] [spawner-6]: process has finished cleanly [pid 4008]
[rviz2-9] [INFO] [1713438949.905129196] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-9] [INFO] [1713438949.905324249] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-9] [INFO] [1713438949.929344400] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-9] Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occurred with plugin factory for class rviz_default_plugins::displays::InteractiveMarkerDisplay. New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.
[rviz2-9] at line 253 in /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp
[rviz2-9] [ERROR] [1713438953.155641322] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
[rviz2-9] [INFO] [1713438953.182066596] [moveit_ros_visualization.motion_planning_frame]: MoveGroup namespace changed: / -> . Reloading params.
[rviz2-9] [INFO] [1713438953.191173374] [moveit_ros_visualization.motion_planning_frame]: MoveGroup namespace changed: / -> lbr. Reloading params.
[rviz2-9] [WARN] [1713438953.258462256] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[move_group-8] [INFO] [1713438953.313704541] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Publishing maintained planning scene on 'monitored_planning_scene'
[move_group-8] [INFO] [1713438953.315615058] [moveit.ros_planning_interface.moveit_cpp]: Listening to 'joint_states' for joint states
[move_group-8] [INFO] [1713438953.319755399] [moveit_ros.current_state_monitor]: Listening to joint states on topic 'joint_states'
[move_group-8] [INFO] [1713438953.322097790] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/lbr/attached_collision_object' for attached collision objects
[move_group-8] [INFO] [1713438953.322147922] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor
[move_group-8] [INFO] [1713438953.325556714] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/lbr/planning_scene'
[move_group-8] [INFO] [1713438953.325606359] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting world geometry update monitor for collision objects, attached objects, octomap updates.
[move_group-8] [INFO] [1713438953.327588214] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to 'collision_object'
[move_group-8] [INFO] [1713438953.330255682] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to 'planning_scene_world' for planning scene world geometry
[move_group-8] [WARN] [1713438953.333592684] [moveit.ros.occupancy_map_monitor.middleware_handle]: Resolution not specified for Octomap. Assuming resolution = 0.1 instead
[rviz2-9] [INFO] [1713438953.701462992] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.395 seconds
[rviz2-9] [INFO] [1713438953.702683991] [moveit_robot_model.robot_model]: Loading robot model 'iiwa14'...
[move_group-8] [INFO] [1713438954.172768022] [moveit.ros_planning_interface.moveit_cpp]: Loading planning pipeline 'ompl'
[move_group-8] [INFO] [1713438954.244094606] [moveit.ros_planning.planning_pipeline]: Using planning interface 'OMPL'
[move_group-8] [INFO] [1713438954.261405799] [moveit_ros.add_time_optimal_parameterization]: Param 'ompl.path_tolerance' was not set. Using default value: 0.100000
[move_group-8] [INFO] [1713438954.261445875] [moveit_ros.add_time_optimal_parameterization]: Param 'ompl.resample_dt' was not set. Using default value: 0.100000
[move_group-8] [INFO] [1713438954.261463736] [moveit_ros.add_time_optimal_parameterization]: Param 'ompl.min_angle_change' was not set. Using default value: 0.001000
[move_group-8] [INFO] [1713438954.261750531] [moveit_ros.fix_workspace_bounds]: Param 'ompl.default_workspace_bounds' was not set. Using default value: 10.000000
[move_group-8] [INFO] [1713438954.261869329] [moveit_ros.fix_start_state_bounds]: Param 'ompl.start_state_max_bounds_error' was set to 0.100000
[move_group-8] [INFO] [1713438954.261886997] [moveit_ros.fix_start_state_bounds]: Param 'ompl.start_state_max_dt' was not set. Using default value: 0.500000
[move_group-8] [INFO] [1713438954.261978291] [moveit_ros.fix_start_state_collision]: Param 'ompl.start_state_max_dt' was not set. Using default value: 0.500000
[move_group-8] [INFO] [1713438954.262004332] [moveit_ros.fix_start_state_collision]: Param 'ompl.jiggle_fraction' was not set. Using default value: 0.020000
[move_group-8] [INFO] [1713438954.262094490] [moveit_ros.fix_start_state_collision]: Param 'ompl.max_sampling_attempts' was not set. Using default value: 100
[move_group-8] [INFO] [1713438954.262292614] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Add Time Optimal Parameterization'
[move_group-8] [INFO] [1713438954.262346030] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Resolve constraint frames to robot links'
[move_group-8] [INFO] [1713438954.262364718] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Workspace Bounds'
[move_group-8] [INFO] [1713438954.262381328] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Start State Bounds'
[move_group-8] [INFO] [1713438954.262394571] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Start State In Collision'
[move_group-8] [INFO] [1713438954.262410854] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Start State Path Constraints'
[move_group-8] [INFO] [1713438954.401154686] [moveit.plugins.moveit_simple_controller_manager]: Added FollowJointTrajectory controller for joint_trajectory_controller
[move_group-8] [INFO] [1713438954.402297270] [moveit.plugins.moveit_simple_controller_manager]: Returned 1 controllers in list
[move_group-8] [INFO] [1713438954.402677320] [moveit.plugins.moveit_simple_controller_manager]: Returned 1 controllers in list
[move_group-8] [INFO] [1713438954.404785910] [moveit_ros.trajectory_execution_manager]: Trajectory execution is managing controllers
[move_group-8] [INFO] [1713438954.404869006] [move_group.move_group]: MoveGroup debug mode is ON
[move_group-8] [INFO] [1713438954.487500043] [move_group.move_group]:
[move_group-8]
[move_group-8] ********************************************************
[move_group-8] * MoveGroup using:
[move_group-8] * - ApplyPlanningSceneService
[move_group-8] * - ClearOctomapService
[move_group-8] * - CartesianPathService
[move_group-8] * - ExecuteTrajectoryAction
[move_group-8] * - GetPlanningSceneService
[move_group-8] * - KinematicsService
[move_group-8] * - MoveAction
[move_group-8] * - MotionPlanService
[move_group-8] * - QueryPlannersService
[move_group-8] * - StateValidationService
[move_group-8] ********************************************************
[move_group-8]
[move_group-8] [INFO] [1713438954.487633738] [moveit_move_group_capabilities_base.move_group_context]: MoveGroup context using planning plugin ompl_interface/OMPLPlanner
[move_group-8] [INFO] [1713438954.487656990] [moveit_move_group_capabilities_base.move_group_context]: MoveGroup context initialization complete
[move_group-8] Loading 'move_group/ApplyPlanningSceneService'...
[move_group-8] Loading 'move_group/ClearOctomapService'...
[move_group-8] Loading 'move_group/MoveGroupCartesianPathService'...
[move_group-8] Loading 'move_group/MoveGroupExecuteTrajectoryAction'...
[move_group-8] Loading 'move_group/MoveGroupGetPlanningSceneService'...
[move_group-8] Loading 'move_group/MoveGroupKinematicsService'...
[move_group-8] Loading 'move_group/MoveGroupMoveAction'...
[move_group-8] Loading 'move_group/MoveGroupPlanService'...
[move_group-8] Loading 'move_group/MoveGroupQueryPlannersService'...
[move_group-8] Loading 'move_group/MoveGroupStateValidationService'...
[move_group-8]
[move_group-8] You can start planning now!
[move_group-8]
[move_group-8] [WARN] [1713438954.670461951] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438955.682569746] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438956.685536964] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438957.699826928] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438958.701264195] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438959.722193844] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438960.750070040] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[rviz2-9] [INFO] [1713438961.746135312] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor
[rviz2-9] [INFO] [1713438961.750999870] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/lbr/monitored_planning_scene'
[move_group-8] [WARN] [1713438961.752605834] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[rviz2-9] [INFO] [1713438962.237141084] [interactive_marker_display_99536845822784]: Connected on namespace: lbr/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic
[rviz2-9] [INFO] [1713438962.292558800] [interactive_marker_display_99536845822784]: Sending request for interactive markers
[rviz2-9] [INFO] [1713438962.299772428] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Stopping planning scene monitor
[rviz2-9] [WARN] [1713438962.329149851] [interactive_marker_display_99536845822784]: Server not available during initialization, resetting
[rviz2-9] [INFO] [1713438962.744579780] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.385 seconds
[rviz2-9] [INFO] [1713438962.744750664] [moveit_robot_model.robot_model]: Loading robot model 'iiwa14'...
[move_group-8] [WARN] [1713438962.772983301] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438963.802846365] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438964.821929209] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438965.830667532] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438966.838970862] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438967.857049238] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438968.886886783] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[rviz2-9] [INFO] [1713438969.846764544] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor
[rviz2-9] [INFO] [1713438969.851931886] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/lbr/monitored_planning_scene'
[move_group-8] [WARN] [1713438969.901450401] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438969.937886010] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_left_finger_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_left_finger_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[move_group-8] [WARN] [1713438969.938041356] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_left_knuckle_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_left_knuckle_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[move_group-8] [WARN] [1713438969.938092888] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_right_finger_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_right_finger_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[move_group-8] [WARN] [1713438969.938876227] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_right_knuckle_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_right_knuckle_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[rviz2-9] [INFO] [1713438969.944557551] [interactive_marker_display_99536845822784]: Sending request for interactive markers
[rviz2-9] [INFO] [1713438969.970263118] [moveit_ros_visualization.motion_planning_frame]: group arm
[rviz2-9] [INFO] [1713438969.971783334] [moveit_ros_visualization.motion_planning_frame]: Constructing new MoveGroup connection for group 'arm' in namespace 'lbr'
[rviz2-9] [INFO] [1713438969.982726778] [interactive_marker_display_99536845822784]: Service response received for initialization
[rviz2-9] [INFO] [1713438970.015764824] [move_group_interface]: Ready to take commands for planning group arm.
[move_group-8] [WARN] [1713438970.053929646] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_left_finger_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_left_finger_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[move_group-8] [WARN] [1713438970.053997445] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_left_knuckle_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_left_knuckle_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[move_group-8] [WARN] [1713438970.054028786] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_right_finger_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_right_finger_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[move_group-8] [WARN] [1713438970.054055826] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Unable to transform object from frame 'lbr/robotiq_85_right_knuckle_link' to planning frame'world' (Could not find a connection between 'world' and 'lbr/robotiq_85_right_knuckle_link' because they are not part of the same tree.Tf has two or more unconnected trees.)
[rviz2-9] [INFO] [1713438970.074881082] [moveit_ros_visualization.motion_planning_frame]: group arm
[move_group-8] [WARN] [1713438970.929999037] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438971.951567070] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438972.962452921] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint
[move_group-8] [WARN] [1713438973.967562591] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: The complete state of the robot is not yet known. Missing robotiq_85_left_knuckle_joint

@mhubii
Copy link
Member

mhubii commented Apr 18, 2024

this could be a relevant error

[gzserver-1] [ERROR] [1713438949.299166307] [lbr.gazebo_ros2_control]: The plugin failed to load for some reason. Error: According to the loaded plugin descriptions the class mock_components/GenericSystem with base class type gazebo_ros2_control::GazeboSystemInterface does not exist. Declared types are gazebo_ros2_control/GazeboSystem

@Miftahur92
Copy link

@antonio1matos hi, were you able to solve this problem?
I am trying to use robotiq hand-e gripper with kuka. I can see the kuka+gripper in the custom moveit config package and execute motion plan. However, similar to yours, I get an error for missing gripper joint.

@antonio1matos
Copy link
Author

antonio1matos commented Aug 1, 2024

Yes. At the time the problem was solved. Right now i'm using another gripper with the robot iiwa14. Now im a little busy but i had to change some parts in the urdf files to solve that problem.

@Miftahur92
Copy link

Yes. At the time the problem was solved. Right now i'm using another gripper with the robot iiwa14. Now im a little busy but i had to change some parts in the urdf files to solve that problem.

Will it be possible to share the solution in your free time? Thanks in advance.

@antonio1matos
Copy link
Author

antonio1matos commented Aug 1, 2024

Sure. Do you have already the package of the arm with the gripper as presented in the pictures above?
Are you using the launch file: sim.launch.py from lbr-stack/src/lbr_fri_ros2_stack/lbr_bringup/launch to show the robot+gripper in rviz and gazebo? Or you created your own launch file?

@Miftahur92
Copy link

Hi @antonio1matos I am using the real.launch.py as I am using real robot. I have the URDF file with arm+gripper (picture attached).
Screenshot from 2024-08-02 10-42-10

@antonio1matos
Copy link
Author

Hi @Miftahur92 . Until now I have never used communication with the real robot so I don't know if I will be of much help, because the package I made was intended to only be used with a physical simulator, in this case the gazebo. But I can tell you some things I did:

@antonio1matos
Copy link
Author

In my case, as I was using the gazebo, I added the ld.action of the arm controller to the sim.lunch.py file. In your case, since you will use real.launch.py i think you will have to do the same.
image
The same was also added in the file lbr_ros2_control/lbr_ros2_control/launch_mixin.py in LBRROS2ControlMixin:
image
In the iiwa14_moveit_config/config/moveit_controllers.yaml file I put the hand_controller like this:
image
And in the ros2_controllers.yaml file I have this:
image

However, in this case this file is not very important because since you are using the sim.launch.py or real.launch.py launch files you are not using the ros2_controllers.yaml file that is in the iiwa14_moveit_config/config package, but the lbr_controllers.yaml file in lbr_ros2_control/config . It should be noted that I have in hand_controller /**/.
image

@antonio1matos
Copy link
Author

antonio1matos commented Aug 5, 2024

If you are using the file sim.launch.py or real.launch.py you are reading the urdf: iiwa14.urdf.xacro, which is reading the file iiwa14_description.urdf.xacro and which this one is reading the file lbr_system_interface.xacro in lbr_ros2_control/config. From what I understand, this last file is responsible for sending the controllers to the plugin hardware you want. For example, if you wanted the gazebo you would define in the launch file that sim= True, which is the case for the sim.launch.py file. yes=False uses the real robot's plugin hardware (lbr_ros2_control::SystemInterface) which is the case with the real robot.
image
The same logic applies to the gripper. In the gripper package, this file corresponds to 2f_85.ros2_control.xacro, where depending on the value, I define whether I want the fake_hardware plugin, real robot…

In your case, if you want to control the opening of the gripper through this package, you may have to add a condition to the launch file real.launch.py that indicates that the variables sim_isaac, sim_ignition or use_fake_hardware are not active to control the gripper.
image
As in my case I wanted to use the gazebo software and didn't know how to define the conditions for this, I ended up going to the robotiq_2f_85_macro.urdf.xacro file and commented on the line that includes the 2f_85.ros2_control.xacro file. This way, this file that is in the gripper package is no longer used.
image
Instead, I went to the lbr_system_interface.xacro file and included a new file that I created equivalent to gripper's ros2_control.xacro that I called robotiq_ros2_control_joints.xacro.
image
The robotiq_ros2_control_joints.xacro file (created ros2_control file) was placed also in lbr_ros2_control/config, that has this:
image
image


<xacro:property name="prefix" value="" />
<!-- Joint interfaces -->
<!-- With Ignition or Hardware, they handle mimic joints, so we only need this command interface activated -->
<joint name="${prefix}robotiq_85_left_knuckle_joint">
    <command_interface name="position" />
    <state_interface name="position">
        <param name="initial_value">0.7929</param>
    </state_interface>
    <state_interface name="velocity"/>
</joint>

<joint name="${prefix}robotiq_85_right_knuckle_joint">
    <param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
    <param name="multiplier">-1</param>

    <command_interface name="position"/>
    <!--  state_interface name="position"/>  -->
    <!--  <state_interface name="velocity"/> -->

</joint>
<joint name="${prefix}robotiq_85_left_inner_knuckle_joint">
    <param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
    <param name="multiplier">1</param>

    <command_interface name="position"/>
    <!-- <state_interface name="position"/>  -->
    <!--  <state_interface name="velocity"/> -->

</joint>
<joint name="${prefix}robotiq_85_right_inner_knuckle_joint">
    <param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
    <param name="multiplier">-1</param>

    <command_interface name="position"/>
     <!--  state_interface name="position"/>  -->
    <!--  <state_interface name="velocity"/> -->

</joint>
<joint name="${prefix}robotiq_85_left_finger_tip_joint">
    <param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
    <param name="multiplier">-1</param>

    <command_interface name="position"/>
    <!--  state_interface name="position"/>  -->
    <!--  <state_interface name="velocity"/> -->

</joint>
<joint name="${prefix}robotiq_85_right_finger_tip_joint">
    <param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
    <param name="multiplier">1</param>

    <command_interface name="position"/>
    <!--  state_interface name="position"/>  -->
    <!--  <state_interface name="velocity"/> -->

</joint>

I did it this way, which means, I didn't use the original file 2f_85.ros2_control.xacro because I think I would have to define in the launch file the value to choose which hardware plugin for the gripper I should use and I didn't know very well how to define this in the code so I created the robotiq_ros2_control_joints.xacro file. But in your case if you want to use the hardware plugin related to the real gripper: robotiq_driver/RobotiqGripperHardwareInterface this way I don't think it will work. So as I said it might not be much help in your case. Anyway, you can always try to do what I did and see if you get better results. I advise you to back up the package you have (ex: save the one you have now in a zip file in case you have any problems later). In my case, when I wanted to open the gripper or close it in moveit, i did this:

ros2 action list -t

and the following action should appear:

/lbr/hand_controller/gripper_cmd control_msgs/action/GripperCommand

If you want to control the gripper through the terminal, I would do, for example:

ros2 action send_goal /lbr/hand_controller/gripper_cmd control_msgs/action/GripperCommand "command:
position: 0.0
max_effort: 0.0"

where in position I defined how much I wanted to open/close.

I hope I have helped in something.

@Miftahur92
Copy link

Hi @antonio1matos thank you for your detail instruction. Certainly this will be helpful.

@mhubii
Copy link
Member

mhubii commented Sep 10, 2024

okay so #193 is now supported, hence a gripper demo is now needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants