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

initial_value params for state interfaces not respected #817

Closed
Yadunund opened this issue Sep 23, 2022 · 6 comments
Closed

initial_value params for state interfaces not respected #817

Yadunund opened this issue Sep 23, 2022 · 6 comments

Comments

@Yadunund
Copy link

Yadunund commented Sep 23, 2022

Background

Hi all,

My setup is as follows:

  • Ubuntu 22.04
  • ROS 2 Humble installed via binaries
  • ros2_control and ros2_controllers installed via binaries

I've been using the JointTrajectoryController to command a couple of ABB industrial robots. I'm using this hardware interface implementation. I notice that once the controller starts and the command interfaces are claimed (both position and velocity), the robot always gets commanded to reach 0.0 joint value for all its joints. This is despite explicitly specifying the initial_value params for each position and velocity state interface in the ros_control.xacro file.

        <state_interface name="position">
          <param name="initial_value">-0.512</param>
        </state_interface>

My expectation is that once the interfaces are claimed by the controller, the robot will continue to remain idle in it current joint configuration (as specified by the initial_value param) and not move to 0.0 joint values.

Is this happening due to an error I might have made in my ros2_control.xacro or controllers.yaml files? Or could it be due to the implementation of the hardware_interface itself? Any insights would greatly help me in debugging this problem.

Thanks in advance!

Edit

I should add that once the robot does move to 0.0 joint values, i'm able to execute trajectories without any problems. It's just the initial movement that I would like to avoid.

@destogl
Copy link
Member

destogl commented Oct 1, 2022

I've been using the JointTrajectoryController to command a couple of ABB industrial robots. I'm using this hardware interface implementation. I notice that once the controller starts and the command interfaces are claimed (both position and velocity), the robot always gets commanded to reach 0.0 joint value for all its joints. This is despite explicitly specifying the initial_value params for each position and velocity state interface in the ros_control.xacro file.

This is definitely not the behavior you want to have. So, what happens is that JTC gets the initial values from hardware interface after it is started. If those values are wrong, then this can happen.
Please do the following to debug this:

  1. Which version of JTC/ros2_control are you using?
  2. what are the values on /joint_states topic before you activate JTC? Are they 0? If yes, then HW interface is not reporting correct values.
  3. If they are correct, then you are maybe using too old version of JTC. (If you are using Foxy, this can be an issue.)

@Yadunund
Copy link
Author

Hi @destogl,

Many thanks for the reply and apologies for the late follow up, I wasn't subscribed to repo notifications and just enabled that.

  1. I'm using the latest humble binaries

  2. I will double check this by tomorrow and get back to you. I suspect this is what is happening.

@destogl
Copy link
Member

destogl commented Nov 17, 2022

@Yadunund and news?

@destogl
Copy link
Member

destogl commented Nov 17, 2022

Closing because this does not seem to be related directly to the framework. Feel free to reopen.

@destogl destogl closed this as completed Nov 17, 2022
@Yadunund
Copy link
Author

Thanks @destogl, I think this is most likely an issue with the implemented hardware_interface.

@Yadunund
Copy link
Author

The issue is indeed with the hardware_interface implementation. I've documented the problem with the implementation here PickNikRobotics/abb_ros2#44. The initial_value param in the ros2 control xacro works as expected when the hardware_interface is working properly 👍🏼

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

No branches or pull requests

2 participants