Skip to content

Commit 92d1283

Browse files
committed
Seprate bringup for Rb XL and Rb 3. Fix ros2 control duplicated nodes
1 parent 44b907b commit 92d1283

File tree

17 files changed

+53
-88
lines changed

17 files changed

+53
-88
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
You can connect with the ROSbot hardware on your own computer. To establish a connection, connect your computer to the robot using a USB-B cable. Then build the code locally and specify via the serial_port argument which processor should be used to establish the connection.
66

77
```bash
8-
ros2 launch rosbot_bringup bringup.yaml serial_port:=/dev/ttyUSB0
8+
ros2 launch rosbot_bringup rosbot.yaml serial_port:=/dev/rosbot
99
```
1010

1111
The hardware checks the connection via USB-B only during initialization and when btn1 or btn2 is pressed, so while executing the above command, hold down the reset button together with bnt1/bnt2 and release the reset button. After establishing a connection, you can release bnt1/bnt2.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ ros2 launch rosbot_gazebo simulation.yaml robot_model:=<rosbot/rosbot_xl>
120120
||| `yaw` | Initial robot 'yaw' orientation. <br/> **_float:_** `0.0` |
121121
122122
> [!TIP]
123-
> To read the arguments for individual launch files, add the `-s` flag to the `ros2 launch` command (e.g. `ros2 launch rosbot_bringup bringup.yaml ​​-s`)
123+
> To read the arguments for individual launch files, add the `-s` flag to the `ros2 launch` command (e.g. `ros2 launch <pkg> <launch> ​​-s`)
124124
125125
## 🕹️ Demo
126126

ROS_API.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ The main package responsible for running the physical robot.
8080

8181
**Available Launch Files:**
8282

83-
- `bringup.yaml` - is responsible for communicating with firmware and activating all logic related to the robot's movement and processing of sensory data.
83+
- `rosbot.yaml` - activates all logic related to the ROSbot's movement and processing of sensory data.
84+
- `rosbot_xl.yaml` - activates all logic related to the ROSbot XL's movement and processing of sensory data.
8485
- `microros.launch.py` - establishes connection with the hardware using microROS agent.
8586

8687
### `rosbot_controller`

docker/Dockerfile.hardware

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ RUN apt update && apt upgrade -y && \
2525
# Build
2626
source /opt/ros/$ROS_DISTRO/setup.bash && \
2727
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release && \
28+
cp src/rosbot_ros/rosbot_utils/udev/99-rosbot.rules /etc/udev/rules.d/99-rosbot.rules && \
2829
# Get version
2930
echo $(cat /ros2_ws/src/rosbot_ros/rosbot/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt && \
3031
# Size optimization

docker/compose.rosbot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ services:
1111
devices:
1212
- /dev/ttySERIAL # MCU communication port
1313
- /dev/input:/dev/input:ro # Joystick
14+
- /dev/bus/usb:/dev/bus/usb # FTDI
1415
environment:
1516
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
1617
- FASTRTPS_DEFAULT_PROFILES_FILE=/ros2_ws/src/rosbot_ros/docker/dds-config-udp.xml
1718
command: >
18-
ros2 launch rosbot_bringup bringup.yaml
19-
robot_model:=rosbot
19+
ros2 launch rosbot_bringup rosbot.yaml

docker/compose.rosbot_xl.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ services:
1010
<<: *common-config
1111
devices:
1212
- /dev/input:/dev/input:ro # Joystick
13+
- /dev/rosbot:/dev/rosbot # MCU
14+
- /dev/bus/usb:/dev/bus/usb # FTDI
1315
environment:
1416
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
1517
- FASTRTPS_DEFAULT_PROFILES_FILE=/ros2_ws/src/rosbot_ros/docker/dds-config-udp.xml
1618
command: >
17-
ros2 launch rosbot_bringup bringup.yaml
18-
robot_model:=rosbot_xl
19+
ros2 launch rosbot_bringup rosbot_xl.yaml

rosbot_bringup/launch/bringup.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
launch:
3+
4+
- arg:
5+
name: robot_model
6+
default: $(env ROBOT_MODEL '')
7+
description: Specify robot model
8+
choice:
9+
- value: rosbot
10+
- value: rosbot_xl
11+
12+
- include:
13+
file: $(find-pkg-share rosbot_bringup)/launch/$(var robot_model).yaml

rosbot_bringup/launch/rosbot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ launch:
1616

1717
- arg:
1818
name: robot_model
19-
default: $(env ROBOT_MODEL '')
19+
default: rosbot
2020
description: Specify robot model
2121
choice:
2222
- value: rosbot

rosbot_controller/config/rosbot/controllers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
imu_broadcaster:
1717
ros__parameters:
1818
tf_frame_prefix_enable: false
19-
sensor_name: <namespace>/imu
19+
sensor_name: <namespace>/imu # Bug: Each sensor in gz need have unique name otherwise they will override sensor readings in gz_ros2_control system plugin
2020
frame_id: imu_link
2121
static_covariance_orientation: [1.9e-3, 0.0, 0.0, 0.0, 1.9e-3, 0.0, 0.0, 0.0, 1.9e-3] # Values taken from datasheet
2222
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

rosbot_controller/config/rosbot_xl/controllers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
imu_broadcaster:
2525
ros__parameters:
2626
tf_frame_prefix_enable: false
27-
sensor_name: <namespace>/imu
27+
sensor_name: <namespace>/imu # Bug: Each sensor in gz need have unique name otherwise they will override sensor readings in gz_ros2_control system plugin
2828
frame_id: imu_link
2929
static_covariance_orientation: [1.9e-3, 0.0, 0.0, 0.0, 1.9e-3, 0.0, 0.0, 0.0, 1.9e-3] # Values taken from datasheet
3030
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

0 commit comments

Comments
 (0)