Home› Programming
Discussion
Back to discussions page
antbiv
Posts: 2 Recruit
2 Finger Gripper(85) on a Universal Robot 5 |
10.5K views
|
Answered | |
/ Most recent by malwaru
in Programming
|
25 comments |

So far, I haven't seen any custom implementation of the 2 Finger Gripper in Gazebo, and moreover, in the ROS-i repos, I couldn't find and URDF of the new gripper model 2f-85. So I created one that you can find it in our fork&branch: https://github.com/beta-robots/robotiq/tree/new_2_finger_models/robotiq_2f_model (The idea is to contribute it back to the ROS-i repos after I test it more).
If you don't need the adaptivity-mode of the gripper in simulation (which is not easy, btw), then you can use the gazebo_ros_control plugin. The plugin works better with one single instance of an URDF. So my suggestion is for you to assembly one single URDF with UR5+Robotiq 2F-85, and then add the plugin to that. Something like:
Then you need to configure, load and start any compatible ros-controller, as you'd normally do with a real robot or UR5 you say you have. If you need further details on how to do that, let me know.
Best,
Carlos
However, since I am a beginner.... Could you explain more please?
I downloaded robotiq_2f_85 model and tried to assembly it to the wrist_3_link of the UR3....
But, failed....
When i attached precise_collision="false" like the below:
<xacro:ur3_robot prefix="" joint_limited="false" precise_collision="false" />
Invalid parameter "precise_collision"
XacroException('Invalid parameter "precise_collision"',)
THis error came up, and i got this error when i added only simple_arm_ to the name of ur3_robot:
<xacro:ur3_robot prefix="simple_arm_" joint_limited="false" />
Error: Failed to build tree: child link [base_link] of joint [world_joint] not found
at line 226 in /build/urdfdom-UJ3kd6/urdfdom-0.4.1/urdf_parser/src/model.cpp
Error [parser_urdf.cc:3408] Unable to call parseURDF on robot model
Error [parser.cc:340] parse as old deprecated model file failed.
When i added this
I got error about 'can't find simple_arm_tool0'
[ERROR] [1502413570.173243633, 0.306000000]: This robot has a joint named "simple_gripper_right_driver_joint" which is not in the gazebo model.
[FATAL] [1502413570.174087383, 0.306000000]: Could not initialize robot simulation interface
Let me try to answer point by point.
<xacro:ur3_robot prefix="" joint_limited="false" precise_collision="false" />
Invalid parameter "precise_collision"
XacroException('Invalid parameter "precise_collision"',)
Anyway, you can omit this parameter, if time for motion planning is not an issue for you.
<xacro:robotiq_2f_85 name="simple_gripper" parent="simple_arm_tool0" precise_collision="false" adaptive_transmission="false"<span>><br></span>
I got error about 'can't find simple_arm_tool0'[FATAL] [1502413570.174087383, 0.306000000]: Could not initialize robot simulation interface
Since i am real beginner of ROS, I just downloaded your codes(universal robots and robotiq) and tried 'catkin_make'.
However, I got this error:
-- ==> add_subdirectory(robotiq_85_gripper-master/robotiq_85_moveit_config)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
MODBUS_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
used as include directory in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
MODBUS_LIBRARIES (ADVANCED)
linked by target "robotiq_2f_hw_usb_node" in directory /home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_2f_hw_usb
-- Configuring incomplete, errors occurred!
See also "/home/icsl/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/icsl/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:6954: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
[email protected]:~/catkin_ws$
I am doing the same things you mention in your post, but with a different robot. I was able to install the package. I also had the same problem as you. The solution of that problem is here http://dof.robotiq.com/discussion/comment/2838/#Comment_2838
However, i got this error:
/home/icsl/catkin_ws/src/robotiq-new_2_finger_models/robotiq_ethercat/src/ethercat_manager.cpp:10:26: fatal error: ethercattype.h: No such file or directory
compilation terminated.
[ 5%] Built target diagnostic_msgs_generate_messages_cpp
robotiq-new_2_finger_models/robotiq_ethercat/CMakeFiles/robotiq_ethercat.dir/build.make:62: recipe for target 'robotiq-new_2_finger_models/robotiq_ethercat/CMakeFiles/robotiq_ethercat.dir/src/ethercat_manager.cpp.o' failed
make[2]: *** [robotiq-new_2_finger_models/robotiq_ethercat/CMakeFiles/robotiq_ethercat.dir/src/ethercat_manager.cpp.o] Error 1
CMakeFiles/Makefile2:5503: recipe for target 'robotiq-new_2_finger_models/robotiq_ethercat/CMakeFiles/robotiq_ethercat.dir/all' failed
make[1]: *** [robotiq-new_2_finger_models/robotiq_ethercat/CMakeFiles/robotiq_ethercat.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 5%] Built target diagnostic_msgs_generate_messages_nodejs
[ 5%] Built target diagnostic_msgs_generate_messages_py
[ 5%] Built target camera_test
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Even after i installed soem by 'sudo apt-get install ros-kinetic-soem'
I googled it,,, but there was no solution...
Could you help me ???
The solution of that problem is mentioned here
What I did was to make the following modification in this CMakeLists.txt
1. Change ${soem_INCLUDE_DIRS} by ${soem_INCLUDE_DIRS}/soem
With that, the software compiles.
<include file="$(find ur_gazebo)/launch/controller_utils.launch"/>
<rosparam ns="/robot" file="$(find ur_gazebo)/controller/arm_controller_ur10.yaml" command="load"/>
<node pkg="robot_state_publisher" type="state_publisher" name="robotiq_hands_l_hand_robot_state_publisher"><param name="publish_frequency" type="double" value="50.0"/><remap from="joint_states" to="/robotiq_hands/left_hand/joint_states"/></node>
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/robot" args="arm_controller"/>
However from the rqt_graph I can see that gazebo does not subscribe to /robot_state_publisher or /robotiq_hands/left_hand/joint_states
Please can you help
I have one more question.
In robotiq-new-2-finger-models which carlosjoserg shared in github,
there is c, c2, and s_model.... what is difference?????
Also, could you share any example such as how to control the gripper?
Is your repo public anywhere so I can take a look? Usually there is a lot of confusion about namespaces of the controller manager, controller configurations and the gazebo_ros_control plugin.
Best
The launch file currently looks like this:
<?xml version="1.0" encoding="utf-8"?>
<launch>
<arg name="gazebo" default="true"/>
<arg name="limited" default="false"/>
<arg name="paused" default="false"/>
<arg name="gui" default="true"/>
<arg name="use_sim_time" default="true"/>
<arg name="load_robot_description" default="true"/>
<param if="$(arg load_robot_description)" name="robot_description"
command="$(find xacro)/xacro --inorder $(find bin_clearing_simulation_ur)/urdf/ur_test.urdf "/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="worlds/empty.world"/>
<arg name="gui" value="true"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
</include>
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param 'robot_description' -model robot -z 0.1" respawn="false" output="screen" />
<include file="$(find ur_gazebo)/launch/controller_utils.launch"/>
<rosparam ns="/robot" file="$(find ur_gazebo)/controller/arm_controller_ur10.yaml" command="load"/>
<node pkg="robot_state_publisher" type="state_publisher" name="robotiq_hands_l_hand_robot_state_publisher"><param name="publish_frequency" type="double" value="50.0"/><remap from="joint_states" to="/robotiq_hands/left_hand/joint_states"/></node>
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/robot" args="arm_controller"/>
</launch>
--------------------------------------------------ur_test.urdf----------------------------------------
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="assembled_robot">
<!-- THE ROBOT -->
<link name="world" />
<!-- UR from ROS-i repos -->
<xacro:include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
<joint name="world_joint" type="fixed">
<parent link="world" />
<child link = "base_link" />
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
</joint>
<xacro:ur10_robot prefix="" joint_limited="false" />
<!-- Robotiq from Beta Robots fork-->
<xacro:include filename="$(find robotiq_s_model_visualization)/cfg/robotiq_hand_macro.urdf.xacro" />
<xacro:robotiq_hand prefix="simple_gripper" parent="tool0" reflect="" >
<origin xyz="0 0 0" rpy="${pi/2} 0 0" />
</xacro:robotiq_hand>
<!-- Plugin -->
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/robot</robotNamespace>
</plugin>
</gazebo>
</robot>
-----------------------------------------------------
rosservice list | grep controller_manager on terminal gives me this:
/robot/controller_manager/list_controller_types
/robot/controller_manager/list_controllers
/robot/controller_manager/load_controller
/robot/controller_manager/reload_controller_libraries
/robot/controller_manager/switch_controller
/robot/controller_manager/unload_controller
-----------------------------------------------------------
So my arm controller has topic /robot/arm_controller/command, which is subscribed by gazebo. But for the robotiq gripper /robotiq_hands/left_hand/joint_states this topic is not subscibed by gazebo. Main issue is how to control the gripper?
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/robot</robotNamespace>
</plugin>
<plugin name="RobotiqHandPlugin" filename="libRobotiqHandPlugin.so">
</plugin>
</gazebo>
I'm trying to spawn the UR5 with the 85 robotiq_2f_gripper in gazebo.
So far I have not been able to identify the problem. So any help is appreciated, from @carlosjoserg or anyone that has an idea. Maybe you found a solution, @Wonchul ?
This is the myrobot.launch:
And this is the join_macro.xacro
One problem are the inertial elements in robotiq_2f_85.xacro which are commented out. Gazebo needs that information. I commented them in and additionally commented the 'cylinder_inertia' in.
This is how the beginning looks like now with the 'cylinder_inertia' commented in:
It now looks like this in gazebo:
So the gripper body is still missing as far as I can see.
In Gazebo you need to have a collision and inertial paremeters defined, otherwise the spawning does nothing. You need to be careful with that cylinder inertial macro, since it assumes some axes orientation, in general, the smaller value goes along the cylinder axis. You can also double check by visualizing the inertia "cube" in Gazebo, check on the upper menus for that option, it will certainly help debugging good inertia values.
I didn't actually finished the gazeboing part of the model, and in fact, I have received more than one question about it, so I'll try to dedicate some time in the next weeks to finish the model properly. In the meantime, please, let me know your advances, if you have a public github repo, that'd be nice to have at hand as well.
Best,
Carlos
In the meantime: Can you point me to where I need to look to get the body/base of the gripper to show up? I haven't had much time to look at it closely, but the base seems to have the necessary inertial parameters.
Right now I don't have a public repo, but if I make more changes I'll consider it.
I've also created a repo for the gripper now. https://github.com/philwall3/robotiq
The base is not showing up and the joints seems disconected, if a start gazebo and whait a few seconds this is how the end griper is:
I suspect that is something related to the joints, given that if I set all the joints as fixed, instead of revolute, the problem does not happen.
I have no idea about how to make the base appear as well, perhaps @carlosjoserg can help please.
I'm attaching the files for my assembled robot, the modified hand (with uncommented inertial properties) and my gazebo launch.
(I also have the triangle appearing, similar to @philwall3)
Thank you all in advance.
I couldn't solve that problem so I eventually just used the StanleyInnovation URDF model and used it with the ros_control controller from @carlosjoserg for the real gripper.
https://github.com/philwall3/UR5-with-Robotiq-Gripper-and-Kinect