User Tools

Site Tools


software:tortugabot_ros2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:tortugabot_ros2 [2025/04/03 08:12] s_fuyedcsoftware:tortugabot_ros2 [2025/04/03 12:01] (current) – [Notes] s_fuyedc
Line 205: Line 205:
  
  
-=== Notes ===+===== Notes =====
  
 <code> <code>
Line 214: Line 214:
 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 229: Line 228:
 # 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 239: Line 239:
  
 ### ###
 +</code>
  
-# Set up workspace on turtle+Install ROS tools, init rosdep and give sudo user arthur access to roscourse files.
  
 +<code>
 +# user: sudo
 +sudo apt install ros-dev-tools ros-jazzy-topic-tools
 +sudo rosdep init
 +</code>
 +
 +Set up workspace on turtle
 +
 +<code>
 +# user: roscourse 
 mkdir -p ~/tortugabot_ws/src mkdir -p ~/tortugabot_ws/src
 cd ~/tortugabot_ws/src cd ~/tortugabot_ws/src
 +</code>
  
-sudo apt install ros-dev-tools+Get repositories
  
-#~/tortugabot_ws/src/tortugabot.repos +<code> 
-repositories+userroscourse 
-  roboclaw_ros: +curl https://raw.githubusercontent.com/code-iai/tortugabot/refs/heads/ros2/tortugabot.repos > tortugabot.repos
-    type: git +
-    url: https://github.com/code-iai/roboclaw_ros.git +
-    version: ros2 +
-  urg_node2: +
-    type: git +
-    url: https://github.com/code-iai/urg_node2.git +
-    version: main +
- +
-# Clone repositories+
 vcs import --recursive < tortugabot.repos vcs import --recursive < tortugabot.repos
 +rosdep update
 +</code>
  
 +Install dependencies
 +<code>
 +# user: sudo
 +rosdep install -i --from-path /home/roscourse/tortugabot_ws/src --rosdistro jazzy
 +</code>
  
-# allow sudo user arthur to see roscourse directories +Build the workspace and source the executables.
-sudo adduser arthur roscourse+
  
-# sudo +<code> 
-sudo rosdep init +user: roscourse 
-rosdep update +cd ~/tortugabot_ws
-rosdep install -i --from-path . --rosdistro jazzy +
- +
-#roscourse +
-cd ..+
 colcon build colcon build
 source install/setup.bash source install/setup.bash
 +echo 'source /home/roscourse/tortugabot_ws/install/setup.bash' >> ~/.bashrc
 +</code>
  
 +Run the nodes in separate terminals
 +
 +<code>
 # roboclaw # roboclaw
 ros2 launch roboclaw_node roboclaw_launch.py ros2 launch roboclaw_node roboclaw_launch.py
Line 284: Line 294:
 ros2 launch urg_node2 urg_node2.launch.py ros2 launch urg_node2 urg_node2.launch.py
  
-# transform odom < laser+# Throttle laser frequency to 10 hz 
 +ros2 run topic_tools throttle messages /scan 10.0 
 + 
 +# transform base_footprint < laser
 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
 </code> </code>
  
software/tortugabot_ros2.1743667977.txt.gz · Last modified: 2025/04/03 08:12 by s_fuyedc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki