MARS
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Turtlebot integration :::warning This documentation is still under development! ::: # Update Ubuntu to TurtleBots Use [balenaEtcher](https://www.balena.io/etcher/) to flash all SD card to have Ubuntu's update version 20.04. **_Steps to take_** 1. Download balenaEthcher 2. Insert SD card into the computer 3. Flash Ubuntu images to SD cards & USB drives 4. Safely remove SD card from computer and place it into the Raspberry Pi that is connected to the turtlebot # Software ## ROS2 [ROS2](https://docs.ros.org/en/foxy/index.html) is a Robot operating System that has a set of software libraries and tools for applications. ROS2 Foxy must be installed on all raspberry pi's. To learning more about the installation, visit the documentation for [installing ROS2 Foxy](https://docs.ros.org/en/foxy/Installation.html). ## Motive + OptiTrack Using the software Motive, we want to be able to create rigidbodys for each of the turtlebot so that they are track inside of the OptiTrack area. Each turlebot has tracker on then set with different configurations. When setting turltebot rigid bodies, place in the OptiTrack one at a time. You place marker where the marker postion will not change relative to eachother. ** Step to Creating Rigid Bodys ** 1. Place turtlebot in the OptiTrack 2. Click `View` from the menu bar 3. `Assets Plans` 4. Search for marker on in Motive 5. Left click dragging mouse over markers 6. Right click: `Rigit Body` --> `Create From Selected Markers` Learn more about [Motive](https://optitrack.com/software/motive/) ## Unity Download Unity in Ubuntu 1. Go to [Unity](https://unity.com/download) website and download the personal hub. # Files ## Ansible First make sure that ansible is install on Linux: `sudo apt update` `sudo apt install ansible` Note that when creating a YAML file just like Python, that is space sensitive. Therefore, be sure to check that spaces line up. To execute any YAML file is as followed: `ansible-playbook <yaml_file_name> -i <host>` ### 99 Net Confiuation ### Host file Create a name host file that will map a connection between all of the IP address and the domain name. **_Steps to set up host_** [turtlebot] swarmbot1 ansible_ssh_192.168.0.{{ host_number + 1 }} host_number=# [all:vars] ansible_ssh_common_args='-o UserknownHostsFile=/dev/null' ansible_connection=ssh ansible_user=ubuntu ansible_ssh_pass=swarmbots ### Middleware --- - hosts: turtlebots tasks: - name: Change ROS Middleware on Turtlebots become: yes become_method: sudo apt: state: present update_cache: yes name: ros-foxy-rmw-cyclonedds-cpp - name: Echo ROS Middleware become: yes shell: echo "export RWM_IMPLEMENTATION-rmw-cyclonedds-cpp" >>.bashrc ### Pixel Ring LEDs The next file that was worked on was the LED file that turns on all the Neo Pixel Ring that are install on all of the turtlebots. A color for the pixel ring can be set using the value 0 to 255 for -r (red), -g (green), and -b (blue). Set Test LED YAML file up as such: **_Test LED_** --- - hosts: turtlebots tasks: - name: Test LEDs become: yes command: python3 single_color_test.py -r # -g # -b # The set up swarm file will copy all need files, including the DCF, the launch file, Colcon build, then stop then restart ROS (Robot Operating System) on the turtlebot. **_Setup Swarm_** --- - hosts: turtlebots become_user: ubuntu Copies DCF files to the turtlebot tasks: - name: {Title for instruction} synchronize: src: {Path that DCF is located in on your computer} dest: {Path to send to, which is on the turtlebot's raspberry pi} Copy lauch file recursive: yes In order to execute the playbook, the command is: `ansible-playbook <yaml_file_name> -i <host_name>` **_Install Pip_** Creating a Yaml file for pip file will be useful for when it is time to install pip on all of the turlebot. **_Bringup Swarm_** Using the bring up will lauch the turtlebots all at once using the following command: `ansible-playbook bringup_swarm.yaml -i name_host` **_DCF Module_** # Simulation and Real 1. Launch Motive and power on motion cameras in the OptiTrack. Be sure that you are able to track the rigid bodies in Motive 2. On the computer that you are working on, open a terminal and source your workspace and run the node: `ros2 run natnet client --ros-args -p use_timestamps:=false` 3. Launch Unity and project 4. In Unity, assure that you are using the path that will take you the the parameter config file that was created. 5. Press the play button at top of Unity to run If all was done correctly, there should be a turtlebot shown on the plateform where you will see normal color turtlebots and red turtlebots 6. Run the DCF node on the real robot through SSH first, then try ansible 7. Run the DCF node for the fake robot using: `ros2 launch dcf constructive.launch.py` This command should move the real robot in the simulation. Verify by seeing both robots move # Connecting Turtlebots to Wifi **via Turtlebot** - HDMI cable - Keyboard - Turtlebot Charger/Battery - Monitor 1. Connect HDMI, Keyboard and Battery to the Turtlebot 2. Once Turtlebot fjnish loading up, login with *Username*: ubuntu, *Password*: swarmbots (might need to press *Enter* after loading to login) 3. type **sudo emacs /etc/netplan/99-netcfg.yaml** 4. under wlan1 change dhcp4 to no 5. added the following below dhcp6 ''' addresses: - 192.168.0.{turtlebot #}/24 access-points: "swarmweb": password: "APLswarming!" ''' 6. *Ctrl* s and *Ctrl* x to save and exit 7. Sudo netplan apply #also check syntax error 8. Sudo shutdown now 9. Reboot turtlebot 10. **After a few minute**, run **Sudo nmap -sn 192.168.0.0/24** on the computer in the same network (install nmap if needed) - [x] The turtlebot address should pop up in the network **via Flashing SD card** 1. Follow Connecting Turtlebot to Wifi via Turtlebot 2. Download balenaEtcher to a computer 3. Make a copy of the SD card from the turtlebot you previously connected the Wifi to your computer using belenaEtcher 4. Use the copy to flash all other turtlebots SD cards. 5. You will need to turn the turtlebots on one by one and use **Sudo nmap -sn 192.168.0.0/24** to find it IP address 6. SSH into the turtlebot in terminal using **ssh ubuntu@(the ip address of #5) 7. Login with *Username*: ubuntu, *Password*: swarmbots 8. type **sudo emacs /etc/netplan/99-netcfg.yaml** 9. change address IP to the turtlebots correct IP address(ex: if it's turtlebot 2, you would changed it's IP to 192.168.0.2) 10. Follow steps 5-9 till all the turtlbots is connected to the WIFI with their unique IP address. # ROS Node for Xbox Controller - Git Clone this file under foxy branch [link](https://github.com/ros2/teleop_twist_joy) - Every changes to teleop_twist_joy should be made in this directory "opt/ros/foxy/share/teleop_twist_joy" 1. Replace xbox.config.yaml (might be different if you're not using a wired xbox-360 controller) - Use this [link](http://wiki.ros.org/joy) to find the buttons values according to their controller (This will help you find the axis_linear and axis_angular values) ``` teleop_twist_joy_node: ros__parameters: axis_linear: # 1 = Left thumb stick vertical x: 1 scale_linear: #Speed x: 0.22 scale_linear_turbo: x: 1.5 axis_angular: # 3 = right thumb stick horizontal yaw: 3 scale_angular: #Speed yaw: 0.4 require_enable_button: false enable_button: 2 # Left trigger button enable_turbo_button: 5 # Right trigger button ``` 2. Replace teleop-launch.py from the launch folder ``` import os from ament_index_python.packages import get_package_share_directory import launch import launch_ros.actions def generate_launch_description(): joy_config = launch.substitutions.LaunchConfiguration('joy_config') joy_dev = launch.substitutions.LaunchConfiguration('joy_dev') config_filepath = launch.substitutions.LaunchConfiguration('config_filepath') swarmbot = launch.substitutions.LaunchConfiguration('swarmbot') #node_name = launch.substitutions.LaunchCongiguration('node_name') return launch.LaunchDescription([ launch.actions.DeclareLaunchArgument('swarmbot', default_value='swarmbot'), launch.actions.DeclareLaunchArgument('joy_config', default_value='ps3'), launch.actions.DeclareLaunchArgument('joy_dev', default_value='/dev/input/js0'), launch.actions.DeclareLaunchArgument('config_filepath', default_value=[ launch.substitutions.TextSubstitution(text=os.path.join( get_package_share_directory('teleop_twist_joy'), 'config', '')), joy_config, launch.substitutions.TextSubstitution(text='.config.yaml')]), launch_ros.actions.Node( package='joy', executable='joy_node', name='joy_node', parameters=[{ 'dev': joy_dev, 'deadzone': 0.3, 'autorepeat_rate': 20.0, }], remappings=[('/joy',[swarmbot,'/joy'])], ), launch_ros.actions.Node( package='teleop_twist_joy', executable='teleop_node', name='teleop_twist_joy_node', parameters=[config_filepath], remappings=[('/joy',[swarmbot,'/joy']),('/cmd_vel',[swarmbot,'/cmd_vel'])],) ]) ``` 3. You first need to launch the turtlebot 1. Turn on the turtlebot 2. In the terminal on a linux station conntected to swarmweb, Run "sudo nmap -sn 192.168.0.0/24" 3. Identify the turtlebot ip address 4. ssh ubuntu@(turtlebot ip address) 5. You will need to login 6. Run "export ROS_DOMAIN_ID=30" 7. Run "export TURTLEBOT3_MODEL=burger" 8. Run "ros2 launch turtlebot3_bringup robot.launch.py" 4. In a new terminal, # DCF

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully