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 for joints in fake_system_hardware #45

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from

Conversation

JensVanhooydonck
Copy link

Add initial_value in the fake_hardware_interface.

@DaniGarciaLopez
Copy link

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
Author

@DaniGarciaLopez This is indeed how I assign these values.

@DaniGarciaLopez
Copy link

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

@destogl
Copy link

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.

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