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

Add more tests #9

Merged
merged 25 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a9f771c
Add tests for the dummy's motion profile
stefanscherzinger Aug 5, 2024
73f2014
Add a test for the driver's topic publishing
stefanscherzinger Aug 6, 2024
7623e29
Use a helper method for calling services
stefanscherzinger Aug 6, 2024
f9bb926
Recompose the driver's test files
stefanscherzinger Aug 7, 2024
ac04bfe
Use pytest's `module` scope for tests
stefanscherzinger Aug 8, 2024
767676c
Add a test for the gripper's _brake test_ service
stefanscherzinger Aug 8, 2024
d318402
Add a test for the gripper's _fast stop_ service
stefanscherzinger Aug 9, 2024
ea45bee
Rename the result field of the trigger-based services
stefanscherzinger Aug 9, 2024
ddaca59
Add a test for the gripper's _stop_ service
stefanscherzinger Aug 9, 2024
948122f
Add a test for the gripper's _manual release_ service
stefanscherzinger Aug 9, 2024
3f0bd28
Drop the changeIP (`reconnect`) service
stefanscherzinger Aug 9, 2024
c8b5a72
Fix the `gripper_info` service
stefanscherzinger Aug 9, 2024
08a2e58
Update the readme
stefanscherzinger Aug 9, 2024
689f750
Add a test for the gripper's _prepare for shutdown_ service
stefanscherzinger Aug 9, 2024
b5e1b1b
Add a test for the gripper's _release workpiece_ action
stefanscherzinger Aug 12, 2024
1b495cd
Use the system uptime for the _softreset_ service
stefanscherzinger Aug 13, 2024
d125267
Fix the computation of actual position and speed
stefanscherzinger Aug 15, 2024
1bbbb90
Implement the dummy's support for relative positioning
stefanscherzinger Aug 16, 2024
0af6ef2
Cleanup background threads after dummy tests finish
stefanscherzinger Aug 16, 2024
67ad2d4
Add a convenience script for starting the dummy
stefanscherzinger Aug 16, 2024
6f28fc1
Add a test for the driver's `/grip` action
stefanscherzinger Aug 23, 2024
0d70a94
Add a test for the driver's `/grip_with_position` action
stefanscherzinger Aug 23, 2024
867751c
Activate the CI pipeline for ROS2 `Jazzy`
stefanscherzinger Aug 26, 2024
2355856
Lower expected accuracy for dummy tests with conversions
stefanscherzinger Aug 26, 2024
75f42ff
Add a test for the gripper's `gripper_control` action
stefanscherzinger Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/industrial_ci_humble_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- {ROS_DISTRO: humble, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
2 changes: 1 addition & 1 deletion .github/workflows/industrial_ci_iron_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- {ROS_DISTRO: iron, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
24 changes: 24 additions & 0 deletions .github/workflows/industrial_ci_jazzy_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Jazzy

on:
push:
pull_request:
schedule:
# Run every Friday at 6:30 am to detect breaking APIs
- cron: '30 6 * * 5'


jobs:
industrial_ci:
env:
BEFORE_BUILD_TARGET_WORKSPACE: '.github/script/install_dependencies.sh'
strategy:
fail-fast: false
matrix:
env:
- {ROS_DISTRO: jazzy, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
2 changes: 1 addition & 1 deletion .github/workflows/industrial_ci_rolling_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- {ROS_DISTRO: rolling, ROS_REPO: main}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<a href="https://github.com/SCHUNK-SE-Co-KG/schunk_egu_egk_gripper/actions">
<img src="https://github.com/SCHUNK-SE-Co-KG/schunk_egu_egk_gripper/actions/workflows/industrial_ci_iron_action.yml/badge.svg" alt="build badge iron">
</a>
<a href="https://github.com/SCHUNK-SE-Co-KG/schunk_egu_egk_gripper/actions">
<img src="https://github.com/SCHUNK-SE-Co-KG/schunk_egu_egk_gripper/actions/workflows/industrial_ci_jazzy_action.yml/badge.svg" alt="build badge jazzy">
</a>
<a href="https://github.com/SCHUNK-SE-Co-KG/schunk_egu_egk_gripper/actions">
<img src="https://github.com/SCHUNK-SE-Co-KG/schunk_egu_egk_gripper/actions/workflows/industrial_ci_rolling_action.yml/badge.svg" alt="build badge rolling">
</a>
Expand Down Expand Up @@ -82,7 +85,7 @@ a) Using a component manager – this process is also outlined in the launch fil

b) Within your custom executable, coupled with a (multithreaded-)executor.

If you prefer starting the node in your main function, ensure that you include `Schunk::schunk_egu_egk_gripper_driver` in CMake's `target_link_libraries()`. Additionally, always specify the IP address, setting the parameter overrides "IP" to your designated IP. Alternatively, create the `SchunkGripperNode`-Component and utilize the `reconnect` service, specifying your IP.
If you prefer starting the node in your main function, ensure that you include `Schunk::schunk_egu_egk_gripper_driver` in CMake's `target_link_libraries()`. Additionally, always specify the IP address, setting the parameter overrides "IP" to your designated IP.

## Actions
All functionalities of the gripper, including movement, are treated as actions. This implies that when gripping, moving, or releasing a workpiece, you need to send a goal and can receive a result or feedback. Releasing a workpiece is the only action where you send an empty goal:
Expand All @@ -108,10 +111,8 @@ Services are functionalities that do not involve movement or occur so rapidly th
- `softreset`
- `parameter_get`
- `parameter_set`
- `reconnect`
- `release_for_manual_movement`
- `prepare_for_shutdown`
- `gripper_info`

**Important:** During a soft reset, no topics will be published. This will last for approximately 7 seconds. Afterward, all publications resume, and you can modify parameters.

Expand All @@ -121,10 +122,6 @@ Services are functionalities that do not involve movement or occur so rapidly th

All other services can be used whenever you like. (**Note:** Fast stop is an abort of movement, so it always provokes an error).

`gripper_info` publishes some information about the gripper on the terminal screen.

`reconnect` is the only method for altering the IP address during runtime. If nothing is connected to the IP address or a gripper is connected, it undergoes a change. If something else is linked to this IP, errors will occur, and the old address will be retained in such cases. Exercise caution when using this service!

With `parameter_get` and `parameter_set` you can read and set all allowed Parameter of the gripper. For getting and setting you need always the parameter instance. After that

## Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include "schunk_egu_egk_gripper_interfaces/action/release_workpiece.hpp"
#include "schunk_egu_egk_gripper_interfaces/srv/release_for_manual_movement.hpp"
#include "schunk_egu_egk_gripper_interfaces/srv/gripper_info.hpp"
#include "schunk_egu_egk_gripper_interfaces/srv/change_ip.hpp"
#include "schunk_egu_egk_gripper_interfaces/action/grip.hpp"
#include "schunk_egu_egk_gripper_interfaces/srv/parameter_get.hpp"
#include "schunk_egu_egk_gripper_interfaces/srv/parameter_set.hpp"
Expand All @@ -70,7 +69,6 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
using Softreset = schunk_egu_egk_gripper_interfaces::srv::Softreset;
using PrepareForShutdown = schunk_egu_egk_gripper_interfaces::srv::PrepareForShutdown;
using GripperInfo= schunk_egu_egk_gripper_interfaces::srv::GripperInfo;
using ChangeIp = schunk_egu_egk_gripper_interfaces::srv::ChangeIp;
using ParameterGet = schunk_egu_egk_gripper_interfaces::srv::ParameterGet;
using ParameterSet = schunk_egu_egk_gripper_interfaces::srv::ParameterSet;

Expand Down Expand Up @@ -145,11 +143,10 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
void fast_stop_srv(const std::shared_ptr<FastStop::Request>, std::shared_ptr<FastStop::Response>);
void parameter_get_srv(const std::shared_ptr<ParameterGet::Request>, std::shared_ptr<ParameterGet::Response>);
void parameter_set_srv(const std::shared_ptr<ParameterSet::Request>, std::shared_ptr<ParameterSet::Response>);
void change_ip_srv(const std::shared_ptr<ChangeIp::Request>, std::shared_ptr<ChangeIp::Response>);
void releaseForManualMov_srv(const std::shared_ptr<ReleaseForManualMovement::Request>, std::shared_ptr<ReleaseForManualMovement::Response>);
void softreset_srv(const std::shared_ptr<Softreset::Request>, std::shared_ptr<Softreset::Response>);
void prepare_for_shutdown_srv(const std::shared_ptr<PrepareForShutdown::Request>, std::shared_ptr<PrepareForShutdown::Response>);
void info_srv(const std::shared_ptr<GripperInfo::Request>, std::shared_ptr<GripperInfo::Response>);
void info_srv(const std::shared_ptr<GripperInfo::Request>, std::shared_ptr<GripperInfo::Response> res);

//Action-basic-functions
template<typename GoalType, typename ResType>
Expand Down Expand Up @@ -198,7 +195,6 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
rclcpp::CallbackGroup::SharedPtr messages_group;
rclcpp::CallbackGroup::SharedPtr services_group;
rclcpp::CallbackGroup::SharedPtr actions_group;
rclcpp::CallbackGroup::SharedPtr rest;

public:

Expand All @@ -224,7 +220,6 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
rclcpp::Service<Softreset>::SharedPtr softreset_service;
rclcpp::Service<PrepareForShutdown>::SharedPtr prepare_for_shutdown_service;
rclcpp::Service<GripperInfo>::SharedPtr info_service;
rclcpp::Service<ChangeIp>::SharedPtr change_ip_service;
};

#endif
Loading
Loading