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:06] – [Hokuyo LAN Config] s_fuyedcsoftware:tortugabot_ros2 [2025/11/27 11:01] (current) – [Workspace Setup for roscourse user] s_fuyedc
Line 49: Line 49:
 {{:software:hokuyo_w_gateway.png?800|}} {{:software:hokuyo_w_gateway.png?800|}}
  
 +If the Hokuyo is reset to factory defaults, put the IPv4 Address to 192.168.0.1 instead.
 ==== DS3 Controller Bluetooth Setup ==== ==== DS3 Controller Bluetooth Setup ====
  
Line 188: Line 189:
 ===== Hokuyo Lidar ===== ===== Hokuyo Lidar =====
  
-Datasheets: {{ :software:ust-10lx_specification.pdf |Specification}}, and {{ :software:ust-10lx_20lx_scip_specifications_c-42-04076.pdf |Communication}}+Datasheets: {{ :software:ust-10lx_specification.pdf |Specification}}, and {{ :software:ust-10lx_20lx_scip_specifications_c-42-04076.pdf |Communication}}, and {{ :software:ip_discovery_2.1rev.84.zip |IP Discovery tool}} from [[https://www.hokuyo-aut.jp/search/single.php?serial=167#download|Hokuyo]].
  
  
Line 202: 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
 </code> </code>
 +If the Hokuyo is reset to factory defaults (like for Tortugabot 4), change the IP in 'tortugabot_ws/urg_node2/config/params_ether.yaml' to '192.168.0.10'.
  
  
  
-=== Notes ===+===== Workspace Setup for roscourse user ===== 
 + 
 +The students will work on user roscourse with pw 10293847. They do not have sudo rights. Install ROS tools, init rosdep and give sudo user arthur access to roscourse files to install the dependencies for the roscourse user.
  
 <code> <code>
-Install ROS2+user: sudo 
 +sudo apt install ros-dev-tools ros-jazzy-topic-tools 
 +sudo rosdep init 
 +</code>
  
 +Set up workspace on turtle
  
-# ssh to turtle +<code> 
-sudo apt update +# userroscourse 
-sudo apt upgrade +
-sudo apt install vim +
-vim .bashrc +
- +
-into .bashrc +
-source /opt/ros/jazzy/setup.bash +
-export ROS_DOMAIN_ID=6 # for tortuga6 +
- +
-### +
- +
-# Connect joy teleop bluetooth +
-sudo vim /etc/bluetooth/input.conf +
-# and set the parameter ClassicBondedOnly=false +
- +
-# Add user to dialout +
-sudo adduser $USER dialout +
-sudo adduser roscourse dialout +
- +
-#reboot +
- +
-ros2 run joy joy_node +
-# output: Dual Shock Controller recognized +
- +
-ros2 topic echo /joy +
- +
-### +
- +
-# Set up workspace on turtle +
 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
 +sudo rosdep install -i --from-path /home/roscourse/tortugabot_ws/src --rosdistro jazzy
 +</code>
  
-# allow arthur to see roscourse +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 262:
 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.1743667618.txt.gz · Last modified: by s_fuyedc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki