Skip to content

Commit c20fca8

Browse files
Fix simulation and rename drive_controller node (#146)
* Launch RViz with simulation * Fix simulation and rename drive_controller node
1 parent 429796a commit c20fca8

File tree

17 files changed

+66
-32
lines changed

17 files changed

+66
-32
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ ros2 launch rosbot_gazebo simulation.launch.py robot_model:=<rosbot/rosbot_xl>
116116
||| `gz_headless_mode` | Run the simulation in headless mode. Useful when a GUI is not needed or to reduce the number of calculations. <br/> **_bool:_** `False` |
117117
||| `gz_log_level` | Adjust the level of console output. <br/> **_int:_** `1` (choices: `0`, `1`, `2`, `3`, `4`) |
118118
||| `gz_world` | Absolute path to SDF world file. <br/> **_string:_** [`husarion_world.sdf`](https://github.com/husarion/husarion_gz_worlds/blob/main/worlds/husarion_world.sdf) |
119+
||| `rviz` | Run RViz simultaneously. <br/> **_bool:_** `True` |
119120
||| `x` | Initial robot position in the global 'x' axis. <br/> **_float:_** `0.0` |
120121
||| `y` | Initial robot position in the global 'y' axis. <br/> **_float:_** `2.0` |
121122
||| `z` | Initial robot position in the global 'z' axis. <br/> **_float:_** `0.0` |

ROS_API.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Detailed information about content of rosbot package for ROS2.
2222
| 🤖 | 🖥️ | NODE | DESCRIPTION |
2323
| --- | --- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2424
||| **`controller_manager`** | Controller Manager performs two main functions. First, it manages controllers and their required interfaces, handling tasks like loading, activating, deactivating, and unloading. Second, it interacts with hardware components, ensuring access to their interfaces. <br /> _[controller_manager/controller_manager]_ |
25+
||| **`drive_controller`** | The controller managing a mobile robot with a differential or omni drive (mecanum wheels). Converts speed commands for the robot body to wheel commands for the base. It also calculates odometry based on hardware feedback and shares it.`DiffDriveController` or `MecanumDriveController` <br /> _[diff_drive_controller/diff_drive_controller]_ |
2526
||| **`ekf_node`** | Used to fuse wheel odometry and IMU data. Parameters are defined in `rosbot_bringup/config/ekf.yaml` <br /> _[robot_localization/ekf_node]_ |
2627
||| **`/gz_bridge`** | Transmits Gazebo simulation data to the ROS layer <br /> _[ros_gz_bridge/parameter_bridge]_ |
2728
||| **`gz_ros_control`** | Responsible for integrating the ros2_control controller architecture with the Gazebo simulator. <br /> _[gz_ros2_control/gz_ros2_control]_ |
@@ -31,7 +32,6 @@ Detailed information about content of rosbot package for ROS2.
3132
||| **`laser_filter`** | This is a filter that removes points in a laser scan inside of a cartesian box <br /> _[laser_filters/scan_to_scan_filter_chain]_ |
3233
||| **`robot_state_publisher`** | Uses the URDF specified by the parameter robot\*description and the joint positions from the topic joint\*states to calculate the forward kinematics of the robot and publish the results using tf <br /> _[robot_state_publisher/robot_state_publisher]_ |
3334
||| **`rosbot_system_node`** | The node communicating with the hardware responsible for receiving and sending data related to engine control <br /> _[rosbot_hardware_interfaces/rosbot_system]_ |
34-
||| **`rosbot_base_controller`** | The controller managing a mobile robot with a differential or omni drive (mecanum wheels). Converts speed commands for the robot body to wheel commands for the base. It also calculates odometry based on hardware feedback and shares it.`DiffDriveController` or `MecanumDriveController` <br /> _[diff_drive_controller/diff_drive_controller]_ |
3535
||| **`rosbot_gz_bridge`** | Transmits data about the robot between the Gazebo simulator and ROS. <br /> _[ros_gz_bridge/parameter_bridge]_ |
3636
||| **`/stm32_node`** | Node responsible for communication with hardware. <br /> _[micro_ros_agent/micro_ros_agent]_ |
3737

@@ -41,7 +41,6 @@ Detailed information about content of rosbot package for ROS2.
4141
[diagnostic_msgs/DiagnosticArray]: https://docs.ros2.org/foxy/api/diagnostic_msgs/msg/DiagnosticArray.html
4242
[geometry_msgs/PoseWithCovarianceStamped]: https://docs.ros2.org/foxy/api/geometry_msgs/msg/PoseWithCovarianceStamped.html
4343
[geometry_msgs/Twist]: https://docs.ros2.org/foxy/api/geometry_msgs/msg/Twist.html
44-
[lifecycle_msgs/TransitionEvent]: https://docs.ros2.org/foxy/api/lifecycle_msgs/msg/TransitionEvent.html
4544
[nav_msgs/Odometry]: https://docs.ros2.org/foxy/api/nav_msgs/msg/Odometry.html
4645
[sensor_msgs/BatteryState]: https://docs.ros2.org/foxy/api/sensor_msgs/msg/BatteryState.html
4746
[sensor_msgs/Imu]: https://docs.ros2.org/foxy/api/sensor_msgs/msg/Imu.html
@@ -58,13 +57,10 @@ Detailed information about content of rosbot package for ROS2.
5857
||| **`diagnostics`** | Contains diagnostic information about the robot's systems. <br /> _[diagnostic_msgs/DiagnosticArray]_ |
5958
||| **`dynamic_joint_states`** | Publishes information about the dynamic state of joints. <br /> _[control_msgs/DynamicJointState]_ |
6059
||| **`imu_broadcaster/imu`** | Broadcasts IMU (Inertial Measurement Unit) data. <br /> _[sensor_msgs/Imu]_ |
61-
||| **`imu_broadcaster/transition_event`** | Signals transition events in the lifecycle of the IMU broadcaster node. <br /> _[lifecycle_msgs/TransitionEvent]_ |
62-
||| **`joint_state_broadcaster/transition_event`** | Indicates transition events in the lifecycle of the joint state broadcaster node. <br /> _[lifecycle_msgs/TransitionEvent]_ |
6360
||| **`joint_states`** | Publishes information about the state of robot joints. <br /> _[sensor_msgs/JointState]_ |
6461
||| **`odometry/filtered`** | Publishes filtered odometry data. <br /> _[nav_msgs/Odometry]_ |
62+
||| **`odometry/wheels`** | Provides odometry data from the base controller of the ROSbot XL. <br /> _[nav_msgs/Odometry]_ |
6563
||| **`robot_description`** | Publishes the robot's description. <br /> _[std_msgs/String]_ |
66-
||| **`rosbot_base_controller/odom`** | Provides odometry data from the base controller of the ROSbot XL. <br /> _[nav_msgs/Odometry]_ |
67-
||| **`rosbot_base_controller/transition_event`** | Indicates transition events in the lifecycle of the ROSbot XL base controller node. <br /> _[lifecycle_msgs/TransitionEvent]_ |
6864
||| **`scan`** | Publishes raw laser scan data. <br /> _[sensor_msgs/LaserScan]_ |
6965
||| **`scan_filtered`** | Publishes filtered laser scan data. <br /> _[sensor_msgs/LaserScan]_ |
7066
||| **`set_pose`** | Sets the robot's pose with covariance. <br /> _[geometry_msgs/PoseWithCovarianceStamped]_ |

rosbot/rosbot_hardware.repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories:
1010
husarion_components_description:
1111
type: git
1212
url: https://github.com/husarion/husarion_components_description.git
13-
version: 3495ff0933cabc1437d85b152af4ffc2c77ef866
13+
version: 5ad18c27f53b129a99bf9df513d16fda5a4bca6f
1414
rosbot_hardware_interfaces:
1515
type: git
1616
url: https://github.com/husarion/rosbot_hardware_interfaces.git

rosbot/rosbot_simulation.repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ repositories:
1010
husarion_components_description:
1111
type: git
1212
url: https://github.com/husarion/husarion_components_description.git
13-
version: 3495ff0933cabc1437d85b152af4ffc2c77ef866
13+
version: 5ad18c27f53b129a99bf9df513d16fda5a4bca6f

rosbot_bringup/test/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_test_subscribers_and_publishers(self):
5656
JointState, "joint_states", self.joint_states_callback, 10
5757
)
5858
self.controller_odom_sub = self.create_subscription(
59-
Odometry, "rosbot_base_controller/odom", self.controller_odometry_callback, 10
59+
Odometry, "odometry/wheels", self.controller_odometry_callback, 10
6060
)
6161
self.imu_sub = self.create_subscription(Imu, "imu_broadcaster/imu", self.imu_callback, 10)
6262
self.ekf_odom_sub = self.create_subscription(

rosbot_controller/config/rosbot/diff_drive_controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
type: joint_state_broadcaster/JointStateBroadcaster
88
imu_broadcaster:
99
type: imu_sensor_broadcaster/IMUSensorBroadcaster
10-
rosbot_base_controller:
10+
drive_controller:
1111
type: diff_drive_controller/DiffDriveController
1212

1313
/**/imu_broadcaster:
@@ -19,7 +19,7 @@
1919
static_covariance_angular_velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0e-3] # Values measured experimentally
2020
static_covariance_linear_acceleration: [6.4e-2, 0.0, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0] # Values measured experimentally
2121

22-
/**/rosbot_base_controller:
22+
/**/drive_controller:
2323
ros__parameters:
2424
tf_frame_prefix_enable: false
2525

rosbot_controller/config/rosbot/mecanum_drive_controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
type: joint_state_broadcaster/JointStateBroadcaster
88
imu_broadcaster:
99
type: imu_sensor_broadcaster/IMUSensorBroadcaster
10-
rosbot_base_controller:
10+
drive_controller:
1111
type: mecanum_drive_controller/MecanumDriveController
1212

1313
/**/imu_broadcaster:
@@ -19,7 +19,7 @@
1919
static_covariance_angular_velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0e-3] # Values measured experimentally
2020
static_covariance_linear_acceleration: [6.4e-2, 0.0, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0] # Values measured experimentally
2121

22-
/**/rosbot_base_controller:
22+
/**/drive_controller:
2323
ros__parameters:
2424
tf_frame_prefix_enable: false
2525

rosbot_controller/config/rosbot_xl/diff_drive_controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
type: joint_state_broadcaster/JointStateBroadcaster
99
imu_broadcaster:
1010
type: imu_sensor_broadcaster/IMUSensorBroadcaster
11-
rosbot_base_controller:
11+
drive_controller:
1212
type: diff_drive_controller/DiffDriveController
1313

1414
/**/imu_broadcaster:
@@ -20,7 +20,7 @@
2020
static_covariance_angular_velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0e-3] # Values measured experimentally
2121
static_covariance_linear_acceleration: [6.4e-2, 0.0, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0] # Values measured experimentally
2222

23-
/**/rosbot_base_controller:
23+
/**/drive_controller:
2424
ros__parameters:
2525
tf_frame_prefix_enable: false
2626
left_wheel_names: [fl_wheel_joint, rl_wheel_joint]

rosbot_controller/config/rosbot_xl/diff_drive_manipulator_controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
type: joint_state_broadcaster/JointStateBroadcaster
99
imu_broadcaster:
1010
type: imu_sensor_broadcaster/IMUSensorBroadcaster
11-
rosbot_base_controller:
11+
drive_controller:
1212
type: diff_drive_controller/DiffDriveController
1313
manipulator_controller:
1414
type: joint_trajectory_controller/JointTrajectoryController
@@ -24,7 +24,7 @@
2424
static_covariance_angular_velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0e-3] # Values measured experimentally
2525
static_covariance_linear_acceleration: [6.4e-2, 0.0, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0] # Values measured experimentally
2626

27-
/**/rosbot_base_controller:
27+
/**/drive_controller:
2828
ros__parameters:
2929
tf_frame_prefix_enable: false
3030
left_wheel_names: [fl_wheel_joint, rl_wheel_joint]

rosbot_controller/config/rosbot_xl/mecanum_drive_controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
type: joint_state_broadcaster/JointStateBroadcaster
99
imu_broadcaster:
1010
type: imu_sensor_broadcaster/IMUSensorBroadcaster
11-
rosbot_base_controller:
11+
drive_controller:
1212
type: mecanum_drive_controller/MecanumDriveController
1313

1414
/**/imu_broadcaster:
@@ -20,7 +20,7 @@
2020
static_covariance_angular_velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0e-3] # Values measured experimentally
2121
static_covariance_linear_acceleration: [6.4e-2, 0.0, 0.0, 0.0, 2.2e-2, 0.0, 0.0, 0.0, 0.0] # Values measured experimentally
2222

23-
/**/rosbot_base_controller:
23+
/**/drive_controller:
2424
ros__parameters:
2525
tf_frame_prefix_enable: false
2626

0 commit comments

Comments
 (0)