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

Additional demos #170

Merged
merged 47 commits into from
May 5, 2024
Merged

Additional demos #170

merged 47 commits into from
May 5, 2024

Conversation

mhubii
Copy link
Member

@mhubii mhubii commented Apr 22, 2024

Refers to #167

Cartesian pose / velocity demo

  • Replace .pdf by .rst file
  • Format code
  • Composable node

Admittance RCM demo

BoWangFromMars and others added 29 commits April 11, 2024 16:56
 tutorial of KDL installation and demo of Cartesian space movement based on KDL, including forward kinematics and inverse kinematics based on KDL
This demo, based on forward kinematics and inverse kinematics provided by KDL, makes the robot move in z axis in Cartesian space. About how to run this demo, please refer to 'KDL installation and demo.pdf' in the directory './lbr_demos_fri_ros2_cpp/doc/KDL installation and demo.pdf'.
The function of this node is to publish Cartesian Pose state of the robot and receive Cartesian Pose Command from other ros nodes.
This file introduces how to install KDL(kinematics and dynamics library) in our system and a demo based on it is given to make the robot run in z direction in Cartesian space.
This node publishes Cartesian Pose command.
This node, as a demo, publishes Cartesian Pose command to make the robot run in z direction in Cartesian space.
This node publishes Cartesian Pose state of the robot and receives Cartesian Pose command from other ros nodes, and transform it into joint positions based on KDL to send to the robot.
thank you again for the contribution @BoWangFromMars , will merge this into the `dev` branch and update as needed. Please open another PR if you feel like you want to amend changes.
@mhubii mhubii changed the title Cartesian velocity demo Additional demos May 2, 2024
@mhubii
Copy link
Member Author

mhubii commented May 3, 2024

hi @BoWangFromMars , started reformatting your PR. Would it be okay for this node to accept a twist rather than a pose? Think this should be a little safer for use. Or is it important to you to command absolute poses? Let me know

@BoWangFromMars
Copy link
Contributor

Hello, yes, you are right. Controlling the absolute pose by 'pose' requires users to have basic knowledge of the robot, like path planning, interpolation. For example, the values of consecutive pose commands should not differ too much, and users should plan the path and interpolate the trajectory to make it smoother. In my view, even if we replace 'pose' with 'twist', we need to limit the value of 'twist' within the robot's velocity limits. To send absolute 'pose' in Cartesian space, we can calculate the corresponding joint positions based on KDL, and we can estimate the velocity of each joint motor based on (joint_position_{t+delta_t} - joint_position_{t}) / delta_t and further ensure every joint motor does not exceed its velocity limit. However, in terms of 'twist', we users can determine the velocity of robots in Cartesian space directly, we still need to transfer it to joint velocity to judge it exceed the joint motor velocity limit or not. Thus, users should always assume the responsibility of ensuring the robot work safely(within velocity limit of each joint motor) no matter which command types we use. What do you think?

@mhubii
Copy link
Member Author

mhubii commented May 4, 2024

Hello, yes, you are right. Controlling the absolute pose by 'pose' requires users to have basic knowledge of the robot, like path planning, interpolation. For example, the values of consecutive pose commands should not differ too much, and users should plan the path and interpolate the trajectory to make it smoother. In my view, even if we replace 'pose' with 'twist', we need to limit the value of 'twist' within the robot's velocity limits. To send absolute 'pose' in Cartesian space, we can calculate the corresponding joint positions based on KDL, and we can estimate the velocity of each joint motor based on (joint_position_{t+delta_t} - joint_position_{t}) / delta_t and further ensure every joint motor does not exceed its velocity limit. However, in terms of 'twist', we users can determine the velocity of robots in Cartesian space directly, we still need to transfer it to joint velocity to judge it exceed the joint motor velocity limit or not. Thus, users should always assume the responsibility of ensuring the robot work safely(within velocity limit of each joint motor) no matter which command types we use. What do you think?

All valid points! Hadn't thought about twists require limits, too. Will think through

@mhubii
Copy link
Member Author

mhubii commented May 5, 2024

okay @BoWangFromMars , formatting mostly finished. Unfortunately the intended use of this repository is less documented atm, but you can find an explanation for your demo here:

https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/dev-humble-cart-vel-demo/lbr_demos/lbr_demos_fri_ros2_advanced_cpp/doc/lbr_demos_fri_ros2_advanced_cpp.rst#pose-controller

this leaves me with 2 questions:

would you be interested in turning the pose_control into a ros2_controller? I could assist you, otherwise I could do that myself. Let me know. We should open a new PR for that though.

@mhubii mhubii merged commit 7c8121a into humble May 5, 2024
1 check passed
@mhubii mhubii mentioned this pull request May 5, 2024
2 tasks
@mhubii mhubii deleted the dev-humble-cart-vel-demo branch May 5, 2024 17:14
@mhubii mhubii mentioned this pull request May 5, 2024
32 tasks
This was referenced May 13, 2024
@mhubii mhubii mentioned this pull request Jun 11, 2024
36 tasks
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