0
$\begingroup$

As part of my testing, I was using Kuka's arm to test some kinematic controllers. In the picture below, when the arm is spawned in Gazebo, the positions of the joints are zero (i.e. obtained from /joint_states topic). However, this is not the zero configuration (i.e. all joint angles are zero) as per the Norwegian University Robotics course. The arm should be stretched upward.

enter image description here

A posture at zero configuration is expected to be as follows:

enter image description here

If this is a wise thing to do, how can I fix this issue with the URDF? I'm turning off gravity so the robot shouldn't collapse.

Gazebo 9, Melodic ROS, Ubuntu 18.04. The launch file yields the following

SUMMARY
========

PARAMETERS
 * /arm_1/gripper_controller/gains/gripper_finger_joint_l/d: 1.0
 * /arm_1/gripper_controller/gains/gripper_finger_joint_l/p: 1000.0
 * /arm_1/gripper_controller/gains/gripper_finger_joint_r/d: 1.0
 * /arm_1/gripper_controller/gains/gripper_finger_joint_r/p: 1000.0
 * /arm_1/gripper_controller/joints: ['gripper_finger_...
 * /arm_1/gripper_controller/type: effort_controller...
 * /arm_1/joint_1_velocity/joint: arm_joint_1
 * /arm_1/joint_1_velocity/pid/antiwindup: True
 * /arm_1/joint_1_velocity/pid/d: 0.0
 * /arm_1/joint_1_velocity/pid/i: 100.0
 * /arm_1/joint_1_velocity/pid/i_clamp_max: 100.0
 * /arm_1/joint_1_velocity/pid/i_clamp_min: -100.0
 * /arm_1/joint_1_velocity/pid/p: 200.0
 * /arm_1/joint_1_velocity/type: effort_controller...
 * /arm_1/joint_2_velocity/joint: arm_joint_2
 * /arm_1/joint_2_velocity/pid/antiwindup: True
 * /arm_1/joint_2_velocity/pid/d: 0.0
 * /arm_1/joint_2_velocity/pid/i: 100.0
 * /arm_1/joint_2_velocity/pid/i_clamp_max: 100.0
 * /arm_1/joint_2_velocity/pid/i_clamp_min: -100.0
 * /arm_1/joint_2_velocity/pid/p: 100.0
 * /arm_1/joint_2_velocity/type: effort_controller...
 * /arm_1/joint_3_velocity/joint: arm_joint_3
 * /arm_1/joint_3_velocity/pid/antiwindup: True
 * /arm_1/joint_3_velocity/pid/d: 0.0
 * /arm_1/joint_3_velocity/pid/i: 100.0
 * /arm_1/joint_3_velocity/pid/i_clamp_max: 1000.0
 * /arm_1/joint_3_velocity/pid/i_clamp_min: -1000.0
 * /arm_1/joint_3_velocity/pid/p: 100.0
 * /arm_1/joint_3_velocity/type: effort_controller...
 * /arm_1/joint_4_velocity/joint: arm_joint_4
 * /arm_1/joint_4_velocity/pid/antiwindup: True
 * /arm_1/joint_4_velocity/pid/d: 0.0
 * /arm_1/joint_4_velocity/pid/i: 100.0
 * /arm_1/joint_4_velocity/pid/i_clamp_max: 1000.0
 * /arm_1/joint_4_velocity/pid/i_clamp_min: -1000.0
 * /arm_1/joint_4_velocity/pid/p: 100.0
 * /arm_1/joint_4_velocity/type: effort_controller...
 * /arm_1/joint_5_velocity/joint: arm_joint_5
 * /arm_1/joint_5_velocity/pid/antiwindup: True
 * /arm_1/joint_5_velocity/pid/d: 0.0
 * /arm_1/joint_5_velocity/pid/i: 100.0
 * /arm_1/joint_5_velocity/pid/i_clamp_max: 100.0
 * /arm_1/joint_5_velocity/pid/i_clamp_min: -100.0
 * /arm_1/joint_5_velocity/pid/p: 500.0
 * /arm_1/joint_5_velocity/type: effort_controller...
 * /gazebo/enable_ros_network: True
 * /joint_state_controller/publish_rate: 100
 * /joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 30.0
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /use_sim_time: True

NODES
  /
    arm_1_gripper_controller_spawner (controller_manager/spawner)
    arm_1_joint_controller_spawner (controller_manager/spawner)
    arm_1_joint_joint_vel_convertor (youbot_gazebo_control/arm_joint_vel_convertor)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    joint_state_controller_spawner (controller_manager/spawner)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_robot (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [10608]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a7050ac0-8753-11ed-b539-782b4602bfac
process[rosout-1]: started with pid [10620]
started core service [/rosout]
process[gazebo-2]: started with pid [10627]
process[gazebo_gui-3]: started with pid [10632]
process[spawn_robot-4]: started with pid [10637]
process[joint_state_controller_spawner-5]: started with pid [10638]
process[arm_1_joint_controller_spawner-6]: started with pid [10639]
process[arm_1_joint_joint_vel_convertor-7]: started with pid [10640]
process[arm_1_gripper_controller_spawner-8]: started with pid [10641]
process[robot_state_publisher-9]: started with pid [10646]
[INFO] [1672302888.537418, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1672302888.562724669]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1672302888.563895131]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[INFO] [1672302888.591070, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1672302888.594987, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1672302888.605154844]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1672302888.606237426]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1672302888.871914467]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1672302888.886935459]: Physics dynamic reconfigure ready.
[INFO] [1672302888.926367, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1672302888.933339, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1672302888.936714, 0.000000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1672302889.096456, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1672302889.172336448]: Loading gazebo_ros_control plugin
[ INFO] [1672302889.172445700]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1672302889.173204807]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[spawn_robot-4] process has finished cleanly
log file: /home/bandar/.ros/log/a7050ac0-8753-11ed-b539-782b4602bfac/spawn_robot-4*.log
[ INFO] [1672302889.290428615]: Loaded gazebo_ros_control.
[INFO] [1672302889.442121, 0.000000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1672302889.444259, 0.000000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1672302889.446195, 0.000000]: Loading controller: arm_1/joint_1_velocity
[INFO] [1672302889.471425, 0.000000]: Loading controller: arm_1/joint_2_velocity
[INFO] [1672302889.493585, 0.000000]: Loading controller: arm_1/joint_3_velocity
[INFO] [1672302889.496364, 0.000000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1672302889.498697, 0.000000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1672302889.499587, 0.000000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1672302889.502455, 0.000000]: Loading controller: joint_state_controller
[INFO] [1672302889.503163, 0.000000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1672302889.506900, 0.000000]: Loading controller: arm_1/gripper_controller
[INFO] [1672302889.517154, 0.000000]: Loading controller: arm_1/joint_4_velocity
[INFO] [1672302889.520421, 0.000000]: Controller Spawner: Loaded controllers: joint_state_controller
[INFO] [1672302889.571038, 0.000000]: Controller Spawner: Loaded controllers: arm_1/gripper_controller
[INFO] [1672302889.586059, 0.000000]: Loading controller: arm_1/joint_5_velocity
$\endgroup$

1 Answer 1

0
$\begingroup$

Can you share your the Gazebo trace. You can use --verbose to visualize all the errors, warnings and debug traces. If you are using ROS probably you can add to the launch file verbose:=true.

My guess is that the Gazebo ROS controller is not running. Can you also specify the Gazebo and ROS versions.

Thank you

$\endgroup$
3
  • $\begingroup$ Please see the update. The controller has been uploaded successfully and no errors have been reported. $\endgroup$
    – CroCo
    Dec 29, 2022 at 8:37
  • $\begingroup$ The intuition I had was correct. It seems that the urdf file has been set up to not stretch the zero configuration for some reason that I'm not aware of. Everything is now correct after I modified the urdf file. To be more specific, zeroing all rpy. $\endgroup$
    – CroCo
    Dec 30, 2022 at 3:53
  • 1
    $\begingroup$ This should have been a comment on the question instead of an answer since it's a request for more information and not a solution to the problem. $\endgroup$
    – adamconkey
    Jan 31 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.