Skip to content

Commit

Permalink
Merge pull request #9 from SCHUNK-SE-Co-KG/add-more-tests
Browse files Browse the repository at this point in the history
Add more tests
  • Loading branch information
stefanscherzinger committed Aug 26, 2024
2 parents ed4d9ac + 75f42ff commit 3e5ed39
Show file tree
Hide file tree
Showing 40 changed files with 873 additions and 373 deletions.
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

0 comments on commit 3e5ed39

Please sign in to comment.