Skip to content

Commit

Permalink
Format trailing whitespaces and newlines for all files
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanscherzinger committed Apr 21, 2024
1 parent e01efd6 commit 1c4a57e
Show file tree
Hide file tree
Showing 33 changed files with 532 additions and 538 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/build/
/install/
/log/
/.vscode
/.vscode
4 changes: 2 additions & 2 deletions LICENSES/license_notice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// under the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://www.gnu.org/licenses/>.
// --------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions LICENSES/license_notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sudo apt update -qq
rosdep update
rosdep install --from-paths ./ --ignore-src -y
cd ..
colcon build --symlink-install --packages-select schunk_egu_egk_gripper_driver schunk_egu_egk_gripper_library schunk_egu_egk_gripper_interfaces
colcon build --symlink-install --packages-select schunk_egu_egk_gripper_driver schunk_egu_egk_gripper_library schunk_egu_egk_gripper_interfaces
```

## Getting started
Expand Down Expand Up @@ -130,7 +130,7 @@ All other services can be used whenever you like. (**Note:** Fast stop is an abo

`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
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 Expand Up @@ -170,7 +170,7 @@ Open:
- Plugins/Services/Service Caller: For calling services.
- Plugins/Topic/Topic Monitor: For viewing all messages.

Additionally, you can refer to 'gripper_example.cpp' for guidance on using this driver in your code. To run the example, start 'schunk.launch.py' (or 'schunk_rqt_launch.py') and then execute the example:
Additionally, you can refer to 'gripper_example.cpp' for guidance on using this driver in your code. To run the example, start 'schunk.launch.py' (or 'schunk_rqt_launch.py') and then execute the example:
**!!!WARNING!!! This will move the gripper jaws**
```
ros2 run schunk_gripper schunk_example
Expand Down
3 changes: 1 addition & 2 deletions schunk_egu_egk_gripper_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ament_target_dependencies(${PROJECT_NAME}
rclcpp_action
rclcpp_components
diagnostic_updater
diagnostic_msgs
diagnostic_msgs
schunk_egu_egk_gripper_interfaces
)
target_link_libraries(${PROJECT_NAME}
Expand Down Expand Up @@ -82,4 +82,3 @@ endif()

# Ament package configuration
ament_package()

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// under the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://www.gnu.org/licenses/>.
// --------------------------------------------------------------------------------
Expand Down Expand Up @@ -56,7 +56,7 @@ extern std::map<std::string, const char*> param_inst;
extern std::map<std::string, std::string> inst_param;

class SchunkGripperNode : public rclcpp::Node, public Gripper
{
{
private:

std::mutex lock_service_post;
Expand Down Expand Up @@ -86,7 +86,7 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
//Flags
bool doing_something;
bool action_active;
bool wrong_version;
bool wrong_version;
//Topic publishing
void publishJointState();
void publishState();
Expand All @@ -102,7 +102,7 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
//Diagnostic updater
std::shared_ptr<diagnostic_updater::Updater> gripper_updater;

std::array<uint8_t,3> old_diagnosis;
std::array<uint8_t,3> old_diagnosis;
std::string error_str;
std::string warn_str;

Expand All @@ -118,10 +118,10 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
void callback_move_parameter(const rclcpp::Parameter &);

double abs_pos_param;
std::string actual_command;
std::string actual_command;
std::shared_ptr<rclcpp::Duration> cycletime;
rclcpp::Time last_time;
rclcpp::Rate limiting_rate;
rclcpp::Rate limiting_rate;
//Basic Functions
void publishStateMsg();
void finishedCommand();
Expand All @@ -137,7 +137,7 @@ class SchunkGripperNode : public rclcpp::Node, public Gripper
rcl_interfaces::msg::ParameterDescriptor parameter_descriptor(const std::string&);
rcl_interfaces::msg::FloatingPointRange FloatingPointRange(double, double, double step = 0.0);
rcl_interfaces::msg::IntegerRange IntegerRange(int64_t, int64_t, uint64_t step = 0);

//Services
void acknowledge_srv(const std::shared_ptr<Acknowledge::Request>, std::shared_ptr<Acknowledge::Response> );
void brake_test_srv(const std::shared_ptr<BrakeTest::Request>, std::shared_ptr<BrakeTest::Response> );
Expand Down
54 changes: 27 additions & 27 deletions schunk_egu_egk_gripper_driver/launch/schunk.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------------
Expand All @@ -21,34 +21,34 @@

def generate_launch_description():
container = Node(
name='gripper_container',
package='rclcpp_components',
executable='component_container_mt',
output='screen',
name="gripper_container",
package="rclcpp_components",
executable="component_container_mt",
output="screen",
emulate_tty=True,
)

load_composable_nodes = LoadComposableNodes(
target_container='gripper_container',
target_container="gripper_container",
composable_node_descriptions=[
ComposableNode(
package='schunk_egu_egk_gripper_driver',
plugin='SchunkGripperNode',
name='schunk_gripper_driver',
namespace='EGK_50_M_B',
parameters=[
{'IP': '10.49.60.86'},
{'state_frq': 60.0},
{'rate': 10.0},
{'use_brk': False},
{'grp_pos_margin': 2.0},
{'grp_prepos_delta': 5.0},
{'zero_pos_ofs': 0.0},
{'grp_prehold_time': 0},
{'wp_release_delta': 5.0},
{'wp_lost_distance': 1.0},
]
)
],
ComposableNode(
package="schunk_egu_egk_gripper_driver",
plugin="SchunkGripperNode",
name="schunk_gripper_driver",
namespace="EGK_50_M_B",
parameters=[
{"IP": "10.49.60.86"},
{"state_frq": 60.0},
{"rate": 10.0},
{"use_brk": False},
{"grp_pos_margin": 2.0},
{"grp_prepos_delta": 5.0},
{"zero_pos_ofs": 0.0},
{"grp_prehold_time": 0},
{"wp_release_delta": 5.0},
{"wp_lost_distance": 1.0},
],
)
],
)
return launch.LaunchDescription([container, load_composable_nodes])
58 changes: 27 additions & 31 deletions schunk_egu_egk_gripper_driver/launch/schunk_rqt.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------------
Expand All @@ -21,39 +21,35 @@

def generate_launch_description():
container = Node(
name='gripper_container',
package='rclcpp_components',
executable='component_container_mt',
output='screen',
name="gripper_container",
package="rclcpp_components",
executable="component_container_mt",
output="screen",
emulate_tty=True,
)
rqt_launch = Node(
package='rqt_gui',
executable='rqt_gui',
name='rqt_gui'
)
rqt_launch = Node(package="rqt_gui", executable="rqt_gui", name="rqt_gui")
load_composable_nodes = LoadComposableNodes(
target_container='gripper_container',
target_container="gripper_container",
composable_node_descriptions=[
ComposableNode(
package='schunk_gripper',
plugin='SchunkGripperNode',
name='schunk_gripper_driver',
namespace='EGK_50_M_B',
parameters=[
{'state_frq': 10.0},
{'rate': 10.0},
{'IP': '10.49.60.86'},
{'Gripper_Parameter.use_brk': False},
{'Gripper_Parameter.grp_pos_margin': 2.0},
{'Gripper_Parameter.grp_prepos_delta': 5.0},
{'Gripper_Parameter.zero_pos_ofs': 0.0},
{'Gripper_Parameter.grp_prehold_time': 0},
{'Gripper_Parameter.wp_release_delta': 5.0},
{'Gripper_Parameter.wp_lost_distance': 1.0}
],
)
],
ComposableNode(
package="schunk_gripper",
plugin="SchunkGripperNode",
name="schunk_gripper_driver",
namespace="EGK_50_M_B",
parameters=[
{"state_frq": 10.0},
{"rate": 10.0},
{"IP": "10.49.60.86"},
{"Gripper_Parameter.use_brk": False},
{"Gripper_Parameter.grp_pos_margin": 2.0},
{"Gripper_Parameter.grp_prepos_delta": 5.0},
{"Gripper_Parameter.zero_pos_ofs": 0.0},
{"Gripper_Parameter.grp_prehold_time": 0},
{"Gripper_Parameter.wp_release_delta": 5.0},
{"Gripper_Parameter.wp_lost_distance": 1.0},
],
)
],
)

return launch.LaunchDescription([container, load_composable_nodes, rqt_launch])
Loading

0 comments on commit 1c4a57e

Please sign in to comment.