forked from dignakov/kuka_experimental
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix pre-commit and ros lint #30
Open
muritane
wants to merge
4
commits into
StoglRobotics-forks:ros2_control_support_package_added
Choose a base branch
from
muritane:fix_precommit
base: ros2_control_support_package_added
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
84a7954
[kuka_ros2_control_support] Fix pre-commit
muritane 456d5eb
check ci-ros-lint.yml from ros2_control
muritane 9a74be4
Update license name and text to be correct.
destogl da5a355
Update kuka_eki_hw_interface/src/kuka_eki_hw_interface.cpp
destogl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
linter: [cppcheck, copyright, lint_cmake] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/setup-ros@v0.2 | ||
- uses: ros-tooling/setup-ros@0.6.2 | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: rolling | ||
|
@@ -29,6 +29,10 @@ jobs: | |
kuka_kr5_support | ||
kuka_kr3_support | ||
kuka_experimental | ||
kuka_ros2_control_support | ||
kuka_rsi_hw_interface | ||
kuka_rsi_simulator | ||
kuka_eki_hw_interface | ||
|
||
|
||
ament_lint_100: | ||
|
@@ -40,7 +44,7 @@ jobs: | |
linter: [cpplint] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/setup-ros@v0.2 | ||
- uses: ros-tooling/setup-ros@0.6.2 | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: rolling | ||
|
@@ -58,3 +62,7 @@ jobs: | |
kuka_kr5_support | ||
kuka_kr3_support | ||
kuka_experimental | ||
kuka_ros2_control_support | ||
kuka_rsi_hw_interface | ||
kuka_rsi_simulator | ||
kuka_eki_hw_interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 0 additions & 106 deletions
106
kuka_eki_hw_interface/include/kuka_eki_hw_interface/kuka_eki_hw_interface.h
This file was deleted.
Oops, something went wrong.
107 changes: 107 additions & 0 deletions
107
kuka_eki_hw_interface/include/kuka_eki_hw_interface/kuka_eki_hw_interface.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// Copyright (c) 2018, 3M | ||
// All rights reserved. | ||
// | ||
// Software License Agreement (3-Clause BSD License) | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions | ||
// are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// * Redistributions in binary form must reproduce the above | ||
// copyright notice, this list of conditions and the following | ||
// disclaimer in the documentation and/or other materials provided | ||
// with the distribution. | ||
// * Neither the name of the the copyright holder nor the names of its | ||
// contributors may be used to endorse or promote products derived | ||
// from this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
// | ||
// Author: Brett Hemes (3M) <[email protected]> | ||
|
||
#ifndef KUKA_EKI_HW_INTERFACE__KUKA_EKI_HW_INTERFACE_HPP_ | ||
#define KUKA_EKI_HW_INTERFACE__KUKA_EKI_HW_INTERFACE_HPP_ | ||
|
||
#include <controller_manager/controller_manager.h> | ||
#include <hardware_interface/joint_command_interface.h> | ||
#include <hardware_interface/joint_state_interface.h> | ||
#include <hardware_interface/robot_hw.h> | ||
#include <ros/ros.h> | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
#include <boost/asio.hpp> | ||
|
||
namespace kuka_eki_hw_interface | ||
{ | ||
|
||
class KukaEkiHardwareInterface : public hardware_interface::RobotHW | ||
{ | ||
private: | ||
ros::NodeHandle nh_; | ||
|
||
const unsigned int n_dof_ = 6; | ||
std::vector<std::string> joint_names_; | ||
std::vector<double> joint_position_; | ||
std::vector<double> joint_velocity_; | ||
std::vector<double> joint_effort_; | ||
std::vector<double> joint_position_command_; | ||
|
||
// EKI | ||
std::string eki_server_address_; | ||
std::string eki_server_port_; | ||
int eki_cmd_buff_len_; | ||
int eki_max_cmd_buff_len_ = | ||
5; // by default, limit command buffer to 5 (size of advance run in KRL) | ||
|
||
// Timing | ||
ros::Duration control_period_; | ||
ros::Duration elapsed_time_; | ||
double loop_hz_; | ||
|
||
// Interfaces | ||
hardware_interface::JointStateInterface joint_state_interface_; | ||
hardware_interface::PositionJointInterface position_joint_interface_; | ||
|
||
// EKI socket read/write | ||
int eki_read_state_timeout_ = 5; // [s]; settable by parameter (default = 5) | ||
boost::asio::io_service ios_; | ||
boost::asio::deadline_timer deadline_; | ||
boost::asio::ip::udp::endpoint eki_server_endpoint_; | ||
boost::asio::ip::udp::socket eki_server_socket_; | ||
void eki_check_read_state_deadline(); | ||
static void eki_handle_receive( | ||
const boost::system::error_code & ec, size_t length, boost::system::error_code * out_ec, | ||
size_t * out_length); | ||
bool eki_read_state( | ||
std::vector<double> & joint_position, std::vector<double> & joint_velocity, | ||
std::vector<double> & joint_effort, int & cmd_buff_len); | ||
bool eki_write_command(const std::vector<double> & joint_position); | ||
|
||
public: | ||
KukaEkiHardwareInterface(); | ||
~KukaEkiHardwareInterface(); | ||
|
||
void init(); | ||
void start(); | ||
void read(const ros::Time & time, const ros::Duration & period); | ||
void write(const ros::Time & time, const ros::Duration & period); | ||
}; | ||
|
||
} // namespace kuka_eki_hw_interface | ||
|
||
#endif // KUKA_EKI_HW_INTERFACE__KUKA_EKI_HW_INTERFACE_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
&ACCESS RVO | ||
defdat kuka_eki_hw_interface | ||
ext bas(bas_command :in,real :in ) | ||
enddat | ||
enddat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't rename this file for now. We will work on this when we optimize EKI interface later