ros2_control
ros2_control copied to clipboard
initial_value params for state interfaces not respected
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.
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 reach0.0
joint value for all its joints. This is despite explicitly specifying theinitial_value
params for each position and velocity state interface in theros_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:
- Which version of JTC/ros2_control are you using?
- 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. - If they are correct, then you are maybe using too old version of JTC. (If you are using Foxy, this can be an issue.)
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.
-
I'm using the latest humble binaries
-
I will double check this by tomorrow and get back to you. I suspect this is what is happening.
@Yadunund and news?
Closing because this does not seem to be related directly to the framework. Feel free to reopen.
Thanks @destogl, I think this is most likely an issue with the implemented hardware_interface.
The issue is indeed with the hardware_interface
implementation. I've documented the problem with the implementation here https://github.com/PickNikRobotics/abb_ros2/issues/44. The initial_value
param in the ros2 control xacro works as expected when the hardware_interface
is working properly 👍🏼