Skip to content

Commit 54b02db

Browse files
Merge branch 'master' into 133_pr_rebase_again
2 parents afe4a2d + d472f5e commit 54b02db

File tree

17 files changed

+49
-64
lines changed

17 files changed

+49
-64
lines changed

.github/workflows/ci-ros-lint.yml

+18-29
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@ name: ROS Lint
22
on:
33
pull_request:
44

5+
env:
6+
package-name:
7+
ros2_control_demo_example_1
8+
ros2_control_demo_example_2
9+
ros2_control_demo_example_3
10+
ros2_control_demo_example_4
11+
ros2_control_demo_example_5
12+
ros2_control_demo_example_6
13+
ros2_control_demo_example_7
14+
ros2_control_demo_example_8
15+
ros2_control_demo_example_9
16+
ros2_control_demo_example_10
17+
ros2_control_demo_example_11
18+
ros2_control_demo_example_12
19+
ros2_control_demo_example_14
20+
521
jobs:
622
ament_lint:
723
name: ament_${{ matrix.linter }}
@@ -19,21 +35,7 @@ jobs:
1935
with:
2036
distribution: rolling
2137
linter: ${{ matrix.linter }}
22-
package-name:
23-
ros2_control_demo_example_1
24-
ros2_control_demo_example_2
25-
ros2_control_demo_example_3
26-
ros2_control_demo_example_4
27-
ros2_control_demo_example_5
28-
ros2_control_demo_example_6
29-
ros2_control_demo_example_7
30-
ros2_control_demo_example_8
31-
ros2_control_demo_example_9
32-
ros2_control_demo_example_10
33-
ros2_control_demo_example_11
34-
ros2_control_demo_example_12
35-
ros2_control_demo_example_13
36-
ros2_control_demo_example_14
38+
package-name: ${{ env.package-name }}
3739

3840
ament_lint_100:
3941
name: ament_${{ matrix.linter }}
@@ -50,17 +52,4 @@ jobs:
5052
distribution: rolling
5153
linter: cpplint
5254
arguments: "--linelength=100 --filter=-whitespace/newline"
53-
package-name:
54-
ros2_control_demo_example_1
55-
ros2_control_demo_example_2
56-
ros2_control_demo_example_3
57-
ros2_control_demo_example_4
58-
ros2_control_demo_example_5
59-
ros2_control_demo_example_6
60-
ros2_control_demo_example_7
61-
ros2_control_demo_example_8
62-
ros2_control_demo_example_9
63-
ros2_control_demo_example_10
64-
ros2_control_demo_example_12
65-
ros2_control_demo_example_13
66-
ros2_control_demo_example_14
55+
package-name: ${{ env.package-name }}

example_1/bringup/launch/rrbot.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def generate_launch_description():
6767
control_node = Node(
6868
package="controller_manager",
6969
executable="ros2_control_node",
70-
parameters=[robot_description, robot_controllers],
70+
parameters=[robot_controllers],
7171
output="both",
7272
)
7373
robot_state_pub_node = Node(

example_10/bringup/launch/rrbot.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def generate_launch_description():
5050
control_node = Node(
5151
package="controller_manager",
5252
executable="ros2_control_node",
53-
parameters=[robot_description, robot_controllers],
53+
parameters=[robot_controllers],
5454
output="both",
5555
)
5656
robot_state_pub_node = Node(

example_11/bringup/launch/carlikebot.launch.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def generate_launch_description():
7878
parameters=[robot_controllers],
7979
output="both",
8080
remappings=[
81-
("~/robot_description", "/robot_description"),
8281
("/bicycle_steering_controller/tf_odometry", "/tf"),
8382
],
8483
condition=IfCondition(remap_odometry_tf),
@@ -88,19 +87,14 @@ def generate_launch_description():
8887
executable="ros2_control_node",
8988
parameters=[robot_controllers],
9089
output="both",
91-
remappings=[
92-
("~/robot_description", "/robot_description"),
93-
],
90+
remappings=[],
9491
condition=UnlessCondition(remap_odometry_tf),
9592
)
9693
robot_state_pub_bicycle_node = Node(
9794
package="robot_state_publisher",
9895
executable="robot_state_publisher",
9996
output="both",
10097
parameters=[robot_description],
101-
remappings=[
102-
("~/robot_description", "/robot_description"),
103-
],
10498
)
10599
rviz_node = Node(
106100
package="rviz2",

example_11/doc/userdoc.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ Files used for this demos
121121
* Controllers yaml: `carlikebot_controllers.yaml <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/bringup/config/carlikebot_controllers.yaml>`__
122122
* URDF file: `carlikebot.urdf.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/description/urdf/carlikebot.urdf.xacro>`__
123123

124-
* Description: `carlikebot_description.urdf.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/description/urdf/carlikebot_description.urdf.xacro>`__
124+
* Description: `carlikebot.urdf.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/description/urdf/carlikebot.urdf.xacro>`__
125125
* ``ros2_control`` tag: `carlikebot.ros2_control.xacro <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/description/ros2_control/carlikebot.ros2_control.xacro>`__
126126

127-
* RViz configuration: `carlikebot.rviz <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/description/rviz/carlikebot.rviz>`__
127+
* RViz configuration: `carlikebot.rviz <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/ros2_control_demo_description/carlikebot/rviz/carlikebot.rviz>`__
128128

129129
* Hardware interface plugin: `carlikebot_system.cpp <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_11/hardware/carlikebot_system.cpp>`__
130130

example_11/hardware/include/ros2_control_demo_example_11/carlikebot_system.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct JointValue
4545

4646
struct Joint
4747
{
48-
Joint(const std::string & name) : joint_name(name)
48+
explicit Joint(const std::string & name) : joint_name(name)
4949
{
5050
state = JointValue();
5151
command = JointValue();

example_12/bringup/launch/rrbot.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def generate_launch_description():
5353
control_node = Node(
5454
package="controller_manager",
5555
executable="ros2_control_node",
56-
parameters=[robot_description, robot_controllers],
56+
parameters=[robot_controllers],
5757
output="both",
5858
)
5959
robot_state_pub_node = Node(

example_14/bringup/launch/rrbot_modular_actuators_without_feedback_sensors_for_position_feedback.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def generate_launch_description():
9696
control_node = Node(
9797
package="controller_manager",
9898
executable="ros2_control_node",
99-
parameters=[robot_description, robot_controllers],
99+
parameters=[robot_controllers],
100100
output="both",
101101
)
102102
robot_state_pub_node = Node(

example_14/hardware/rrbot_actuator_without_feedback.cpp

+15-13
Original file line numberDiff line numberDiff line change
@@ -183,21 +183,23 @@ hardware_interface::return_type RRBotActuatorWithoutFeedback::read(
183183
hardware_interface::return_type ros2_control_demo_example_14::RRBotActuatorWithoutFeedback::write(
184184
const rclcpp::Time & /*time*/, const rclcpp::Duration & /*period*/)
185185
{
186-
// START: This part here is for exemplary purposes - Please do not copy to your production code
187-
RCLCPP_INFO(
188-
rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Writing command: %f", hw_joint_command_);
189-
190-
// Simulate sending commands to the hardware
191-
std::ostringstream data;
192-
data << hw_joint_command_;
193-
RCLCPP_INFO(
194-
rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Sending data command: %s",
195-
data.str().c_str());
196-
send(sock_, data.str().c_str(), strlen(data.str().c_str()), 0);
186+
if (std::isfinite(hw_joint_command_))
187+
{
188+
// START: This part here is for exemplary purposes - Please do not copy to your production code
189+
RCLCPP_INFO(
190+
rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Writing command: %f", hw_joint_command_);
197191

198-
RCLCPP_INFO(rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Joints successfully written!");
199-
// END: This part here is for exemplary purposes - Please do not copy to your production code
192+
// Simulate sending commands to the hardware
193+
std::ostringstream data;
194+
data << hw_joint_command_;
195+
RCLCPP_INFO(
196+
rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Sending data command: %s",
197+
data.str().c_str());
198+
send(sock_, data.str().c_str(), strlen(data.str().c_str()), 0);
200199

200+
RCLCPP_INFO(rclcpp::get_logger("RRBotActuatorWithoutFeedback"), "Joints successfully written!");
201+
// END: This part here is for exemplary purposes - Please do not copy to your production code
202+
}
201203
return hardware_interface::return_type::OK;
202204
}
203205

example_2/bringup/launch/diffbot.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def generate_launch_description():
7373
control_node = Node(
7474
package="controller_manager",
7575
executable="ros2_control_node",
76-
parameters=[robot_description, robot_controllers],
76+
parameters=[robot_controllers],
7777
output="both",
7878
)
7979
robot_state_pub_node = Node(

example_3/bringup/launch/rrbot_system_multi_interface.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def generate_launch_description():
119119
control_node = Node(
120120
package="controller_manager",
121121
executable="ros2_control_node",
122-
parameters=[robot_description, robot_controllers],
122+
parameters=[robot_controllers],
123123
output="both",
124124
)
125125
robot_state_pub_node = Node(

example_4/bringup/launch/rrbot_system_with_sensor.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def generate_launch_description():
111111
control_node = Node(
112112
package="controller_manager",
113113
executable="ros2_control_node",
114-
parameters=[robot_description, robot_controllers],
114+
parameters=[robot_controllers],
115115
output="both",
116116
)
117117
robot_state_pub_node = Node(

example_5/bringup/launch/rrbot_system_with_external_sensor.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def generate_launch_description():
111111
control_node = Node(
112112
package="controller_manager",
113113
executable="ros2_control_node",
114-
parameters=[robot_description, robot_controllers],
114+
parameters=[robot_controllers],
115115
output="both",
116116
)
117117
robot_state_pub_node = Node(

example_6/bringup/launch/rrbot_modular_actuators.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def generate_launch_description():
119119
control_node = Node(
120120
package="controller_manager",
121121
executable="ros2_control_node",
122-
parameters=[robot_description, robot_controllers],
122+
parameters=[robot_controllers],
123123
output="both",
124124
)
125125
robot_state_pub_node = Node(

example_7/bringup/launch/r6bot_controller.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def generate_launch_description():
5252
control_node = Node(
5353
package="controller_manager",
5454
executable="ros2_control_node",
55-
parameters=[robot_description, robot_controllers],
55+
parameters=[robot_controllers],
5656
remappings=[
5757
(
5858
"/forward_position_controller/commands",

example_8/bringup/launch/rrbot_transmissions_system_position_only.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def generate_launch_description():
9696
control_node = Node(
9797
package="controller_manager",
9898
executable="ros2_control_node",
99-
parameters=[robot_description, robot_controllers],
99+
parameters=[robot_controllers],
100100
output="both",
101101
)
102102
robot_state_pub_node = Node(

example_9/bringup/launch/rrbot.launch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def generate_launch_description():
6868
control_node = Node(
6969
package="controller_manager",
7070
executable="ros2_control_node",
71-
parameters=[robot_description, robot_controllers],
71+
parameters=[robot_controllers],
7272
output="both",
7373
)
7474
robot_state_pub_node = Node(

0 commit comments

Comments
 (0)