Skip to content

Commit

Permalink
updated namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Jul 29, 2023
1 parent 3cd7322 commit eed7a73
Show file tree
Hide file tree
Showing 29 changed files with 123 additions and 121 deletions.
4 changes: 2 additions & 2 deletions lbr_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_bringup</name>
<version>1.0.0</version>
<version>1.2.0</version>
<description>LBR launch files.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -26,4 +26,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
2 changes: 1 addition & 1 deletion lbr_demos/lbr_fri_ros2_advanced_cpp_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2_advanced_cpp_demos</name>
<version>1.0.0</version>
<version>1.2.0</version>
<description>Advanced C++ demos for the lbr_fri_ros2.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class AdmittanceControlNode : public rclcpp::Node {
this->get_parameter("end_effector_link").as_string());

lbr_command_pub_ = create_publisher<lbr_fri_msgs::msg::LBRCommand>(
"/lbr_command", rclcpp::QoS(1)
"/lbr/command", rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)));
lbr_state_sub_ = create_subscription<lbr_fri_msgs::msg::LBRState>(
"/lbr_state",
"/lbr/state",
rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)),
Expand Down Expand Up @@ -73,17 +73,17 @@ class AdmittanceControlNode : public rclcpp::Node {
int main(int argc, char **argv) {
rclcpp::init(argc, argv);

auto executor = std::make_shared<rclcpp::executors::SingleThreadedExecutor>();
auto executor = std::make_shared<rclcpp::executors::StaticSingleThreadedExecutor>();

auto lbr_app_node = std::make_shared<rclcpp::Node>(
"lbr_app", rclcpp::NodeOptions().use_intra_process_comms(true));
auto lbr_node =
std::make_shared<rclcpp::Node>("lbr", rclcpp::NodeOptions().use_intra_process_comms(true));

auto lbr_app = lbr_fri_ros2::LBRApp(lbr_app_node);
auto lbr_app = lbr_fri_ros2::LBRApp(lbr_node);

auto admittance_control_node = std::make_shared<AdmittanceControlNode>(
"admittance_control_node", rclcpp::NodeOptions().use_intra_process_comms(true));

executor->add_node(lbr_app_node);
executor->add_node(lbr_node);
executor->add_node(admittance_control_node);
executor->spin();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, node_name="admittance_control_node") -> None:
# publishers and subscribers
self.lbr_state_sub_ = self.create_subscription(
LBRState,
"/lbr_state",
"/lbr/state",
self.on_lbr_state_,
QoSProfile(
depth=1,
Expand All @@ -40,7 +40,7 @@ def __init__(self, node_name="admittance_control_node") -> None:
)
self.lbr_command_pub_ = self.create_publisher(
LBRCommand,
"/lbr_command",
"/lbr/command",
QoSProfile(
depth=1,
reliability=ReliabilityPolicy.RELIABLE,
Expand Down
4 changes: 2 additions & 2 deletions lbr_demos/lbr_fri_ros2_advanced_python_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2_advanced_python_demos</name>
<version>1.1.0</version>
<version>1.2.0</version>
<description>Advanced Python demos for the lbr_fri_ros2.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -19,4 +19,4 @@
<export>
<build_type>ament_python</build_type>
</export>
</package>
</package>
2 changes: 1 addition & 1 deletion lbr_demos/lbr_fri_ros2_advanced_python_demos/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name=package_name,
version="1.1.0",
version="1.2.0",
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Expand Down
6 changes: 3 additions & 3 deletions lbr_demos/lbr_fri_ros2_cpp_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2_cpp_demos</name>
<version>1.1.0</version>
<version>1.2.0</version>
<description>C++ demos for the lbr_fri_ros2.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -14,11 +14,11 @@
<depend>rclcpp</depend>

<exec_depend>lbr_fri_ros2</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class JointSineOverlayNode : public rclcpp::Node {
JointSineOverlayNode(const std::string &node_name) : Node(node_name), phase_(0.) {
// create publisher to /lbr_command
lbr_command_pub_ = this->create_publisher<lbr_fri_msgs::msg::LBRCommand>(
"/lbr_command", rclcpp::QoS(1)
"/lbr/command", rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)));

// create subscription to /lbr_state
lbr_state_sub_ = this->create_subscription<lbr_fri_msgs::msg::LBRState>(
"/lbr_state",
"/lbr/state",
rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class TorqueSineOverlayNode : public rclcpp::Node {
TorqueSineOverlayNode(const std::string &node_name) : Node(node_name), phase_(0.) {
// create publisher to /lbr_command
lbr_command_pub_ = this->create_publisher<lbr_fri_msgs::msg::LBRCommand>(
"/lbr_command", rclcpp::QoS(1)
"/lbr/command", rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)));

// create subscription to /lbr_state
lbr_state_sub_ = this->create_subscription<lbr_fri_msgs::msg::LBRState>(
"/lbr_state",
"/lbr/state",
rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class WrenchSineOverlayNode : public rclcpp::Node {
: Node(node_name), phase_x_(0.), phase_y_(0.) {
// create publisher to /lbr_command
lbr_command_pub_ = this->create_publisher<lbr_fri_msgs::msg::LBRCommand>(
"/lbr_command", rclcpp::QoS(1)
"/lbr/command", rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)));

// create subscription to /lbr_state
lbr_state_sub_ = this->create_subscription<lbr_fri_msgs::msg::LBRState>(
"/lbr_state",
"/lbr/state",
rclcpp::QoS(1)
.reliability(RMW_QOS_POLICY_RELIABILITY_RELIABLE)
.deadline(std::chrono::milliseconds(10)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, node_name: str) -> None:
# create publisher to /lbr_command
self.lbr_command_pub_ = self.create_publisher(
LBRCommand,
"/lbr_command",
"/lbr/command",
QoSProfile(
depth=1,
reliability=ReliabilityPolicy.RELIABLE,
Expand All @@ -32,7 +32,7 @@ def __init__(self, node_name: str) -> None:
# create subscription to /lbr_state
self.lbr_state_sub_ = self.create_subscription(
LBRState,
"/lbr_state",
"/lbr/state",
self.on_lbr_state_,
QoSProfile(
depth=1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, node_name: str) -> None:
# create publisher to /lbr_command
self.lbr_command_pub_ = self.create_publisher(
LBRCommand,
"/lbr_command",
"/lbr/command",
QoSProfile(
depth=1,
reliability=ReliabilityPolicy.RELIABLE,
Expand All @@ -32,7 +32,7 @@ def __init__(self, node_name: str) -> None:
# create subscription to /lbr_state
self.lbr_state_sub_ = self.create_subscription(
LBRState,
"/lbr_state",
"/lbr/state",
self.on_lbr_state_,
QoSProfile(
depth=1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, node_name: str) -> None:
# create publisher to /lbr_command
self.lbr_command_pub_ = self.create_publisher(
LBRCommand,
"/lbr_command",
"/lbr/command",
QoSProfile(
depth=1,
reliability=ReliabilityPolicy.RELIABLE,
Expand All @@ -32,7 +32,7 @@ def __init__(self, node_name: str) -> None:
# create subscription to /lbr_state
self.lbr_state_sub_ = self.create_subscription(
LBRState,
"/lbr_state",
"/lbr/state",
self.on_lbr_state_,
QoSProfile(
depth=1,
Expand Down
4 changes: 2 additions & 2 deletions lbr_demos/lbr_fri_ros2_python_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2_python_demos</name>
<version>1.1.0</version>
<version>1.2.0</version>
<description>Python demos for the lbr_fri_ros2.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -19,4 +19,4 @@
<export>
<build_type>ament_python</build_type>
</export>
</package>
</package>
2 changes: 1 addition & 1 deletion lbr_demos/lbr_fri_ros2_python_demos/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name=package_name,
version="1.1.0",
version="1.2.0",
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Expand Down
4 changes: 2 additions & 2 deletions lbr_demos/lbr_ros2_control_cpp_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_ros2_control_cpp_demos</name>
<version>1.1.0</version>
<version>1.2.0</version>
<description>C++ demos for the LBR ros2_control integration.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -26,4 +26,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
4 changes: 2 additions & 2 deletions lbr_demos/lbr_ros2_control_python_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_ros2_control_python_demos</name>
<version>1.1.0</version>
<version>1.2.0</version>
<description>Python demos for the LBR ros2_control integration.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -23,4 +23,4 @@
<export>
<build_type>ament_python</build_type>
</export>
</package>
</package>
2 changes: 1 addition & 1 deletion lbr_demos/lbr_ros2_control_python_demos/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name=package_name,
version="1.1.0",
version="1.2.0",
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Expand Down
6 changes: 3 additions & 3 deletions lbr_description/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_description</name>
<version>1.0.0</version>
<version>1.2.0</version>
<description>KUKA LBR description files</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>
Expand All @@ -15,9 +15,9 @@
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>rviz2</exec_depend>

<test_depend>python3-pytest</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
1 change: 1 addition & 0 deletions lbr_description/ros2_control/lbr.ros2_control.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<param name="remote_host">${remote_host}</param>
<param name="port_id">${port_id}</param>
<param name="sample_time">${sample_time}</param>
<param name="robot_name">${robot_name}</param>
</hardware>
</xacro:unless>

Expand Down
6 changes: 3 additions & 3 deletions lbr_fri_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_msgs</name>
<version>1.0.0</version>
<version>1.2.0</version>
<description>ROS 2 message for the Fast Robot Interface (FRI) specific states.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<depend>builtin_interfaces</depend>
<depend>std_msgs</depend>

Expand All @@ -22,4 +22,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
7 changes: 4 additions & 3 deletions lbr_fri_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>lbr_fri_ros2</name>
<version>1.1.0</version>
<description>The lbr_fri_ros2 package provides the Fast Robot Interface (FRI) integration into ROS 2. Robot states can be extracted and commanded.</description>
<version>1.2.0</version>
<description>The lbr_fri_ros2 package provides the Fast Robot Interface (FRI) integration into ROS
2. Robot states can be extracted and commanded.</description>
<maintainer email="[email protected]">mhubii</maintainer>
<license>MIT</license>

Expand All @@ -22,4 +23,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
6 changes: 3 additions & 3 deletions lbr_fri_ros2/src/lbr_app_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace lbr_fri_ros2 {
LBRAppComponent::LBRAppComponent(const rclcpp::NodeOptions &options) {
node_ = std::make_shared<rclcpp::Node>("lbr_component", options);
lbr_app_ = std::make_unique<lbr_fri_ros2::LBRApp>(node_);
lbr_node_ = std::make_shared<rclcpp::Node>("lbr", options);
lbr_app_ = std::make_unique<lbr_fri_ros2::LBRApp>(lbr_node_);
}

rclcpp::node_interfaces::NodeBaseInterface::SharedPtr
LBRAppComponent::get_node_base_interface() const {
return node_->get_node_base_interface();
return lbr_node_->get_node_base_interface();
}
} // end of namespace lbr_fri_ros2

Expand Down
4 changes: 2 additions & 2 deletions lbr_fri_ros2/src/lbr_app_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class LBRAppComponent {

protected:
std::unique_ptr<lbr_fri_ros2::LBRApp>
lbr_app_; /** #LBRApp for communicating with the hardware.<*/
rclcpp::Node::SharedPtr node_; /** Node for communicating with ROS.<*/
lbr_app_; /** #LBRApp for communicating with the hardware.<*/
rclcpp::Node::SharedPtr lbr_node_; /** Node for communicating with ROS.<*/
};
} // end of namespace lbr_fri_ros2
#endif // LBR_FRI_ROS2__LBR_COMPONENT_HPP_
Loading

0 comments on commit eed7a73

Please sign in to comment.