{"id":25833110,"url":"https://github.com/woolfrey/client_serial_link","last_synced_at":"2026-06-04T21:31:24.083Z","repository":{"id":279436317,"uuid":"936162393","full_name":"Woolfrey/client_serial_link","owner":"Woolfrey","description":"ROS2 action clients for communicating with the server_serial_link repository.","archived":false,"fork":false,"pushed_at":"2025-02-25T14:38:56.000Z","size":1795,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T15:36:34.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Woolfrey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-20T16:19:49.000Z","updated_at":"2025-02-25T14:39:00.000Z","dependencies_parsed_at":"2025-02-25T15:36:36.441Z","dependency_job_id":"d0105e69-c45c-4e08-99ac-915166bed5b1","html_url":"https://github.com/Woolfrey/client_serial_link","commit_stats":null,"previous_names":["woolfrey/client_serial_link"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woolfrey%2Fclient_serial_link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woolfrey%2Fclient_serial_link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woolfrey%2Fclient_serial_link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woolfrey%2Fclient_serial_link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Woolfrey","download_url":"https://codeload.github.com/Woolfrey/client_serial_link/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241263695,"owners_count":19936058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-28T22:47:06.798Z","updated_at":"2025-11-24T05:02:40.430Z","avatar_url":"https://github.com/Woolfrey.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :incoming_envelope: Serial Link Action Client\n\nThis package contains [ROS2 action clients](https://design.ros2.org/articles/actions.html) designed to interact with the [serial_link_action_server](http://github.com/Woolfrey/server_serial_link) package. The action and message definitions are defined in the [serial_link_interfaces](https://github.com/Woolfrey/interface_serial_link) package. It is primarily an example of how to write a client and use the action server(s) to control a robot. You may use them as is, modify them to suit your needs, or write your own from scratch.\n\n#### :sparkles: Features:\n- Seemless interaction with the [serial link action client](https://github.com/Woolfrey/client_serial_link) package,\n- Joint space \u0026 Cartesian control,\n- Helper functions to loading pre-defined joint configurations, and endpoint poses for specific robots \u0026 tasks.\n- Templated `ActionClientInterface` \u0026 `ActionClientBase` classes for quick implementation of your own custom action clients.\n\n\u003e [!TIP]\n\u003e Check out [this repository](https://github.com/Woolfrey/control_kuka_velocity) for an example of how to run the action servers \u0026 action clients to control a robot.\n\n#### :compass: Navigation\n- [Requirements](#clipboard-requirements)\n- [Installation](#floppy_disk-installation)\n- [Classes](#card_file_box-classes)\n- [Nodes](#satellite-nodes)\n- [Contributing](#handshake-contributing)\n- [Citing this Repository](#bookmark_tabs-citing-this-repository)\n- [License](#scroll-license)\n\n## :clipboard: Requirements\n\n- [Ubuntu 22.04](https://ubuntu.com/blog/tag/22-04-lts), or later,\n- [ROS2 Humble](https://docs.ros.org/en/humble/index.html), or later, the\n- The [serial link interfaces v1.1.0](https://github.com/Woolfrey/interface_serial_link/releases/tag/v1.1.0) package,\n- The [serial_link_action_server v2.0.0](https://github/com/Woolfrey/server_serial_link](https://github.com/Woolfrey/server_serial_link/releases/tag/v2.0.0)) package (unless using your own).\n\n\u003e [!NOTE]\n\u003e This package was built and tested using Ubuntu 22.04, and ROS2 Humble.\n\n## :floppy_disk: Installation\n\nYour directory structure should end up looking something like this:\n```\nros2_workspace/\n├── build/\n├── install/\n├── log/\n└── src/\n    ├── client_serial_link/\n    ├── interface_serial_link/\n    └── server_serial_link/ (optional)\n```\n\n1. In the `src/` directory of your ROS2 workspace, clone the interfaces repository:\n\n```\ngit clone https://github.com/Woolfrey/interface_serial_link.git\n```\n\n2. Clone the action client repository:\n\n```\ngit clone http://github.com/Woolfrey/client_serial_link.git\n```\n\n3. Navigate back to the root of your ROS2 workspace and build:\n\n```\ncolcon build\n```\n\n4. Source the local directory (if you haven't yet altered your .bashrc file):\n\n```\nsource ./install/setup.bash\n```\n\n5. Check successful installation:\n\n```\nros2 pkg list\n```\n   \nIf you scroll down the list, you should see both `serial_link_action_client`, and `serial_link_interfaces`.\n\n[:top: Back to Top.](#incoming_envelope-serial-link-action-client)\n\n## :card_file_box: Classes\n\nThis package contains several classes that implement the action clients for actions defined in [interface repository](https://github.com/Woolfrey/interface_serial_link). \n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/client_overview.png\" width=\"700\" height=\"auto\"/\u003e\n\u003c/p\u003e\n\n- The `ActionClientInterface` provides polymorphism for interacting with actions of different types.\n- The `ActionClientBase` is a templated class providing a standardised stucture to all action clients.\n- The other classes, e.g. `FollowTwist`, `TrackCartesianTrajectory`, etc. implement the constructors and `result_callback` methods specific to the actions.\n\n[:top: Back to Top.](#incoming_envelope-serial-link-action-client)\n\n## :satellite: Nodes\n\nThis package contains nodes with pre-configured clients that you can use. You may apply them as is, modify them to suit your task, or write your own from scratch. They are executed via `ros2 run`, rather than `ros2 launch`, as the latter doesn't allow you to enter command prompts in the terminal for some reason :shrug:\n\nFor example, in my [Kuka velocity control](https://github.com/Woolfrey/control_kuka_velocity), I would run:\n```\nros2 run serial_link_action_client follow_transform_client --ros-args --params-file \"config/iiwa_joint_configurations.yaml\" --params-file \"config/tolerances.yaml\"\n```\n\nThe client executables use helper functions specified in the `utilities.h` header file to load pre-defined joint configurations:\n```\n/**:\n  ros__parameters:\n    number_of_joints: 7                            # We need this to split up the position arrays\n    joint_config_names: [\"home\", \"ready\", \"multi\"] # We need to declare them here so we can search them by name\n    home:\n        positions: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n        times: [5.0]\n    ready:\n        positions: [1.844, -0.656, -1.782, -1.383, 0.060, 0.0311, -0.705]\n        times: [5.0]\n    multi:\n        positions: [2.570, -0.484, -1.865, -1.495, 1.063, -0.699,  -1.500,\n                    1.844, -0.656, -1.782, -1.383, 0.060,  0.0311, -0.705,\n                    0.000,  0.000,  0.000,  0.000, 0.000,  0.0000,  0.000]\n        times: [4.0, 8.0, 12.0]\n```\nand pre-defined Cartesian poses:\n```\n/**:\n  ros__parameters:\n    pose_names: [\"up\", \"down\", \"left\", \"right\"] # We need to declare them here so we can search them by name\n    up:\n        poses: [0.0, 0.0, 0.2, 0.0, 0.0, 0.0]\n        times: [3.0]\n        reference: \"relative\"\n    down:\n        poses: [0.0, 0.0, -0.2, 0.0, 0.0, 0.0]\n        times: [3.0]\n        reference: \"relative\"\n    left:\n        poses: [0.0, 0.2, 0.0, 0.0, 0.0, 0.0]\n        times: [3.0]\n        reference: \"relative\"\n    right:\n        poses: [0.0, -0.2, 0.0, 0.0, 0.0, 0.0]\n        times: [3.0]\n        reference: \"relative\"\n```\nThese are inserted in to a `std::map\u003cstd::string, std::vector\u003cserial_link_interfaces::JointTrajectoryPoint\u003e\u003e`, and `std::map\u003cstd::string, std::vector\u003cserial_link_interfaces::CartesianTrajectoryPoint\u003e\u003e` so that you can easily search for and add them to the action goal field.\n\nThe `tolerances.yaml` file contains parameters that are used as part of the various goal fields in the different actions:\n```\n/**:\n  ros__parameters:\n    tolerance:\n        timeout: 0.1                               # s                      \n        joint: [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5] # rad\n        pose:\n            position: 0.2                          # m\n            orientation: 0.35                      # rad\n        twist:\n            linear: 0.5                            # m/s\n            angular: 1.0                           # rad/s\n```\n\n### Follow Transform Client\n\nThis client loads both the `TrackJointTrajectory` client and the `FollowTransform` client. The former lets you move the robot in to pre-defined joint configurations. The latter, when activated, will follow a `tf2_ros::Transform` that is somehow broadcast over the ROS2 network. The server is supposed to control the robot so that the endpoint of the robot follows this transform in real time.\n\nTo run this client use something like:\n```\nros2 run serial_link_action_client follow_transform_client --ros-args --params-file \"config/joint_configurations.yaml\" --params-file \"config/tolerances.yaml\"\n```\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/follow_transform.png\" width=\"500\" height=\"auto\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/follow_transform.gif\" width=\"600\" height=\"auto\"\u003e\n\u003c/p\u003e\n\n### Follow Twist Client\n\nThis client loads the `TrackJointTrajectory` and `FollowTwist` clients. You use the former to move the robot in to a pre-defined joint configuration. Then the latter is used to subscribe to a `geometry_msgs::msg::TwistStamped` that is somehow being published over the ROS2 network. The server is supposed to control the endpoint of the robot arm to follow this twist command in real time.\n\nTo run this client use something like:\n```\nros2 run serial_link_action_client follow_twist_client --ros-args --params-file \"config/joint_configurations.yaml\" --params-file \"config/tolerances.yaml\"\n```\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/follow_twist.png\" width=\"600\" height=\"auto\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/follow_twist.gif\" width=\"600\" height=\"auto\"\u003e\n\u003c/p\u003e\n\n### Track Trajectory Client\n\nThis client has both the `TrackJointTrajectory` and `TrackCartesianTrajectory` actions. The first is used to move the robot to different joint configurations. The second specifies `CartesianTrajectoryPoint` waypoints so the corresponding action server will generate and follow a trajectory defined by them.\n\nTo run, use something like:\n```\nros2 run serial_link_action_client trajectory_tracking_client --ros-args --params-file \"$config/endpoint_poses.yaml\" --params-file \"config/joint_configurations.yaml\" --params-file \"config/tolerances.yaml\"\n```\n(Note the extra `endpoint_poses.yaml` argument compared to the previous two).\n\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/track_trajectory.png\" width=\"350\" height=\"auto\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/track_trajectory.gif\" width=\"600\" height=\"auto\"\u003e\n\u003c/p\u003e\n\n[:top: Back to Top.](#incoming_envelope-serial-link-action-client)\n\n## :handshake: Contributing\n\nContributions to this repositore are welcome! Feel free to:\n1. Fork the repository,\n2. Implement your changes / improvements, then\n3. Issue a pull request.\n\nIf you're looking for ideas, you can always check the [Issues tab](https://github.com/Woolfrey/client_serial_link/issues) for those with :raising_hand: [OPEN]. These are things I'd like to implement, but don't have time for. It'd be much appreciated, and you'll be tagged as a contributor :sunglasses:\n\n[:top: Back to Top.](#incoming_envelope-serial-link-action-client)\n\n## :bookmark_tabs: Citing this Repository\n\nIf you find this code useful, spread the word by acknowledging it. Click on `Cite this repository` under the **About** section in the top-right corner of this page :arrow_upper_right:.\n\nHere's a BibTeX reference:\n```\n@software{woolfrey_serial_link_action_client_2025\n     author  = {Woolfrey, Jon},\n     month   = apr,\n     title   = {{S}erial {L}ink {A}ction {C}lient},\n     url     = {https://github.com/Woolfrey/client_serial_link},\n     version = {1.0.0},\n     year    = {2025}\n}\n```\nHere's the automatically generated APA format:\n```\nWoolfrey, J. (2025). Serial Link Action Client (Version 1.0.0). Retrieved from https://github.com/Woolfrey/client_serial_link\n```\n\n[:top: Back to Top.](#incoming_envelope-serial-link-action-client)\n\n## :scroll: License\n\nThis software package is licensed under the [GNU General Public License v3.0 (GPL-3.0)](https://choosealicense.com/licenses/gpl-3.0/). You are free to use, modify, and distribute this package, provided that any modified versions also comply with the GPL-3.0 license. All modified versions must make the source code available and be licensed under GPL-3.0. The license also ensures that the software remains free and prohibits the use of proprietary restrictions such as Digital Rights Management (DRM) and patent claims. For more details, please refer to the [full license text](LICENSE).\n\n[:top: Back to Top.](#incoming_envelope-serial-link-action-client)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoolfrey%2Fclient_serial_link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoolfrey%2Fclient_serial_link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoolfrey%2Fclient_serial_link/lists"}