open manipulator robotic arm controller problem

asked 2020-08-13 16:42:26 -0600

gryhkn gravatar image

Hi, i'm trying to control open manipulator robotic arm. I added controller in .launch file which below and gazeboflaunch file also. Here my controller.yaml and launch file. What could be the problem, i couldn't solve?

image description

My gazebo.launch file is:

<launch>

  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="paused" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="gui" default="true"/>
  <arg name="headless" default="false"/>
  <arg name="debug" default="false"/>

  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
  <arg name="world_name" value="$(find robotic_arm)/worlds/robotic_arm.world"/>
  <arg name="debug" value="$(arg debug)" />
  <arg name="gui" value="$(arg gui)" />
  <arg name="paused" value="$(arg paused)"/>
  <arg name="use_sim_time" value="$(arg use_sim_time)"/>
  <arg name="headless" value="$(arg headless)"/>
  </include>

  <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find robotic_arm)/urdf/robotic_arm.xacro'"/>
  <node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-urdf - 
   model robotic_arm -param robot_description"/>

  <include file="$(find robotic_arm)/launch/last_controller.launch"/>

</launch>

And controller.launch is:

<?xml version="1.0"?>
<launch>
 <rosparam file="$(find robotic_arm)/config/new_controller.yaml" command="load"/>
 <rosparam file="$(find robotic_arm)/config/joint_state_controller.yaml" command="load"/>

 <!-- start_controllers -->
 <node name="joint_state_controller_spawner" pkg="controller_manager" type="spawner" args="joint_state_controller" 
 respawn="false" />
 <node name="arm_controller_spawner" pkg="controller_manager" output="screen" ns="/robotic_arm" type="spawner" 
  args="arm_controller" />

</launch>

And lastly .yaml file is:

robotic_arm:
   joint_names: [joint1, joint2, joint3, joint4 ]
    ## joint trajectory controller
   arm_controller:
     type: position_controllers/JointTrajectoryController
     joints:
       - joint1
       - joint2
       - joint3
       - joint4
     constraints:
        goal_time: 0.6
        stopped_velocity_tolerance: 0.05
        joint1: {trajectory: 0.1, goal: 0.1}
        joint2: {trajectory: 0.1, goal: 0.1}
        joint3: {trajectory: 0.1, goal: 0.1}
        joint4: {trajectory: 0.1, goal: 0.1}

     stop_trajectory_duration: 0.5
     state_publish_rate:  25
     action_monitor_rate: 10

And when i launch gazebo.launch file and then running therosservice list | grep controller_manager i got this output:

/robotic_arm/controller_manager/list_controller_types
/robotic_arm/controller_manager/list_controllers
/robotic_arm/controller_manager/load_controller
/robotic_arm/controller_manager/reload_controller_libraries
/robotic_arm/controller_manager/switch_controller
/robotic_arm/controller_manager/unload_controller
edit retag flag offensive close merge delete