Skip to content

Initial_value for joints in fake_system_hardware#45

Closed
JensVanhooydonck wants to merge 1 commit intoxArm-Developer:humblefrom
JensVanhooydonck:initial_value_fake_system_hardware
Closed

Initial_value for joints in fake_system_hardware#45
JensVanhooydonck wants to merge 1 commit intoxArm-Developer:humblefrom
JensVanhooydonck:initial_value_fake_system_hardware

Conversation

@JensVanhooydonck
Copy link
Copy Markdown

Add initial_value in the fake_hardware_interface.

@DaniGarciaLopez
Copy link
Copy Markdown
Contributor

I'm interested in this PR. I would also like to set an initial value for the robot using fake hardware.

@JensVanhooydonck , how do you set the initial position? I tried adding the initial_value as follows in .ros2_control.xacro but apparently it doesn't have any effect:

<joint name="${prefix}joint3">
  <command_interface name="position">
    <param name="min">${joint3_lower_limit}</param>
    <param name="max">${joint3_upper_limit}</param>
  </command_interface>
  <command_interface name="velocity">
    <param name="min">-3.14</param>
    <param name="max">3.14</param>
  </command_interface>
  <state_interface name="position">   
    <param name="initial_value">0.5</param>
  </state_interface>
  <state_interface name="velocity"/>
  <!-- <state_interface name="effort"/> -->
</joint>

@JensVanhooydonck
Copy link
Copy Markdown
Author

@DaniGarciaLopez This is indeed how I assign these values.

@DaniGarciaLopez
Copy link
Copy Markdown
Contributor

Okay, yes, it works. I was just sourcing an incorrect file. Thanks, @JensVanhooydonck!

@destogl
Copy link
Copy Markdown

destogl commented Jul 16, 2024

Hi, Dr. Denis here, maintainer of ros2_control. I am wondering, why do you have your implementation of the Fake Hardware? Does the generic implementation of (now renamed!) Mock Hardware is missing something relevant for you? If so, please let me know, and we can extend the generic version, so you don't have to maintain your custom version 😃

From what I have understood, you have just a version cut down to your manipulators - this is the reason of asking.

@JensVanhooydonck JensVanhooydonck closed this by deleting the head repository Feb 5, 2026
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

Successfully merging this pull request may close these issues.

3 participants