How to use staubli_val3_driver/ industrial_robot_simulator with industrial_robot_client and Moveit
Hello,
we have a Staubli tx2_40 industrial robot with a CS8 controller and want to control it using ros. I created the xacro/urdf description, a moveit_config and a _gazebo package.
I use ros melodic on ubuntu 18.04.
Using the val3 driver i can connect to the CS8 controller and read the joint positions. Rviz visualizes the robot state. Following this tutorial (https://industrial-training-master.re...) I created the staubli_tx2_40_planning_execution.launch. When launching this file I get the error that the action client is not connected.
... I read about this problems in other questions. However I was not abl eto fix the rpoblem from that. Using gazebo as robot simulation works. In this configuration I am able to use moveit to plan trajectories and move the simulated robot.
The problem occurs when using indusrtial_robot_simulator or the val3 driver with the industrial_robot_client. This is the launch file:
<launch>
<!-- The planning and execution components of MoveIt! configured to run -->
<!-- using the ROS-Industrial interface. -->
<!-- Non-standard joint names:
- Create a file [robot_moveit_config]/config/joint_names.yaml
controller_joint_names: [joint_1, joint_2, ... joint_N]
- Update with joint names for your robot (in order expected by rbt controller)
- and uncomment the following line: -->
<rosparam command="load" file="$(find staubli_tx2_40_support)/config/joint_names.yaml"/>
<!-- the "sim" argument controls whether we connect to a Simulated or Real robot -->
<!-- - if sim=false, a robot_ip argument is required -->
<arg name="sim" default="true" />
<arg name="robot_ip" unless="$(arg sim)" />
<arg name="use_industrial_robot_simulator" default="false"/>
<!-- load the robot_description parameter before launching ROS-I nodes -->
<include file="$(find staubli_tx2_40_moveit_config)/launch/planning_context.launch" >
<arg name="load_robot_description" value="true" />
</include>
<!-- run the robot simulator and action interface nodes -->
<group if="$(arg sim)">
<group unless="$(arg use_industrial_robot_simulator)">
<include file="$(find staubli_tx2_40_gazebo)/launch/staubli_tx2_40.launch" />
<remap from="/follow_joint_trajectory" to="/arm_controller/follow_joint_trajectory"/>
</group>
<group if="$(arg use_industrial_robot_simulator)">
<include file="$(find industrial_robot_simulator)/launch/robot_interface_simulator.launch" />
<!-- publish the robot state (tf transforms) -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
</group>
</group>
<!-- run the "real robot" interface nodes -->
<!-- - this typically includes: robot_state, motion_interface, and joint_trajectory_action nodes -->
<!-- - replace these calls with appropriate robot-specific calls or launch files -->
<group unless="$(arg sim)">
<remap from="follow_joint_trajectory" to="joint_trajectory_action"/>
<include file="$(find staubli_val3_driver)/launch/robot_interface_streaming.launch" >
<arg name="robot_ip" value="$(arg robot_ip)"/>
</include>
</group>
<include file="$(find staubli_tx2_40_moveit_config)/launch/move_group.launch">
<arg name="publish_monitored_planning_scene" value="true" />
</include>
<!-- Run Rviz and load the default config to see the state of the move_group node -->
<include file="$(find staubli_tx2_40_moveit_config)/launch/moveit_rviz.launch">
<arg name="rviz_config" value="$(find staubli_tx2_40_moveit_config)/launch/moveit.rviz"/>
</include>
</launch>
This ist the output produced:
process[rosout-1]: started with pid [7059]
started core service [/rosout]
process[industrial_robot_simulator-2]: started with pid [7067]
process[joint_trajectory_action-3]: started with pid [7068]
process[robot_state_publisher-4]: started with pid [7069]
process[move_group-5]: started ...