software:tortugabot_ros2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:tortugabot_ros2 [2025/04/03 08:04] – [Hokuyo LAN Config] s_fuyedc | software:tortugabot_ros2 [2025/05/27 10:14] (current) – [Hokuyo Lidar] s_fuyedc | ||
---|---|---|---|
Line 45: | Line 45: | ||
==== Hokuyo LAN Config ==== | ==== Hokuyo LAN Config ==== | ||
- | When connecting the Hokuyo laser sensor via LAN, the connection must be configured manually. This way, the laptop can directly communicate with the LIDAR. Connect the Battery to the Tortugabot to give power to the Hokuyo LIDAR, then connect it via LAN to this laptop. Open Wired Settings and configure the profile. Set IPv4 to Manual and give it an IP and Submask. | + | When connecting the Hokuyo laser sensor via LAN, the connection must be configured manually. This way, the laptop can directly communicate with the LIDAR. Connect the Battery to the Tortugabot to give power to the Hokuyo LIDAR, then connect it via LAN to this laptop. Open Wired Settings and configure the profile. Set IPv4 to Manual and give it an IP and Submask. Without the Gateway the connection is dropped after a while. |
{{: | {{: | ||
- | Dropped connection after a while can be solved by giving a Gateway with 192.168.0.1 | + | If the Hokuyo is reset to factory defaults, put the IPv4 Address to 192.168.0.1 |
==== DS3 Controller Bluetooth Setup ==== | ==== DS3 Controller Bluetooth Setup ==== | ||
Line 203: | Line 203: | ||
ros2 run tf2_ros static_transform_publisher --frame-id base_footprint --child-frame-id laser | ros2 run tf2_ros static_transform_publisher --frame-id base_footprint --child-frame-id laser | ||
</ | </ | ||
+ | If the Hokuyo is reset to factory defaults, change the IP in ' | ||
- | === Notes === | + | ===== Notes ===== |
< | < | ||
Line 215: | Line 216: | ||
sudo apt update | sudo apt update | ||
sudo apt upgrade | sudo apt upgrade | ||
- | sudo apt install vim | + | nano .bashrc |
- | vim .bashrc | + | |
# into .bashrc | # into .bashrc | ||
Line 230: | Line 230: | ||
# Add user to dialout | # Add user to dialout | ||
sudo adduser $USER dialout | sudo adduser $USER dialout | ||
+ | sudo adduser $USER roscourse | ||
sudo adduser roscourse dialout | sudo adduser roscourse dialout | ||
Line 240: | Line 241: | ||
### | ### | ||
+ | </ | ||
- | # Set up workspace on turtle | + | Install ROS tools, init rosdep and give sudo user arthur access to roscourse files. |
+ | < | ||
+ | # user: sudo | ||
+ | sudo apt install ros-dev-tools ros-jazzy-topic-tools | ||
+ | sudo rosdep init | ||
+ | </ | ||
+ | |||
+ | Set up workspace on turtle | ||
+ | |||
+ | < | ||
+ | # user: roscourse | ||
mkdir -p ~/ | mkdir -p ~/ | ||
cd ~/ | cd ~/ | ||
+ | </ | ||
- | sudo apt install ros-dev-tools | + | Get repositories |
- | + | ||
- | # | + | |
- | repositories: | + | |
- | roboclaw_ros: | + | |
- | type: git | + | |
- | url: https:// | + | |
- | version: ros2 | + | |
- | urg_node2: | + | |
- | type: git | + | |
- | url: https:// | + | |
- | version: main | + | |
- | # Clone repositories | + | < |
+ | # user: roscourse | ||
+ | curl https:// | ||
vcs import --recursive < tortugabot.repos | vcs import --recursive < tortugabot.repos | ||
+ | rosdep update | ||
+ | </ | ||
+ | Install dependencies | ||
+ | < | ||
+ | # user: sudo | ||
+ | rosdep install -i --from-path / | ||
+ | </ | ||
- | # allow arthur to see roscourse | + | Build the workspace and source the executables. |
- | sudo adduser arthur roscourse | + | |
- | # sudo | + | < |
- | sudo rosdep init | + | # user: roscourse |
- | rosdep update | + | cd ~/ |
- | rosdep install -i --from-path . --rosdistro jazzy | + | |
- | + | ||
- | # | + | |
- | cd .. | + | |
colcon build | colcon build | ||
source install/ | source install/ | ||
+ | echo ' | ||
+ | </ | ||
+ | Run the nodes in separate terminals | ||
+ | |||
+ | < | ||
# roboclaw | # roboclaw | ||
ros2 launch roboclaw_node roboclaw_launch.py | ros2 launch roboclaw_node roboclaw_launch.py | ||
Line 285: | Line 296: | ||
ros2 launch urg_node2 urg_node2.launch.py | ros2 launch urg_node2 urg_node2.launch.py | ||
- | # transform | + | # Throttle laser frequency to 10 hz |
+ | ros2 run topic_tools throttle messages /scan 10.0 | ||
+ | |||
+ | # transform | ||
ros2 run tf2_ros static_transform_publisher --frame-id base_footprint --child-frame-id laser | ros2 run tf2_ros static_transform_publisher --frame-id base_footprint --child-frame-id laser | ||
</ | </ | ||
software/tortugabot_ros2.1743667464.txt.gz · Last modified: 2025/04/03 08:04 by s_fuyedc