Kuo-Lun
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • 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
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me 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 No publishing access yet

        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.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        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
      • Save as template
      • 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 Create Help
    Create Create new note Create a note from template
    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
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    # LoCoBot Network Setup and Remote Access ###### tags : `SIS2021` # Hardware and Software Setup ## LoCoBot The LoCoBot is a low-cost mobile manipulator suitable for both navigation and manipulation from Carnegie Mellon University(CMU) and designed to run Facebook AI's PyRobot. PyRobot is an open source, lightweight, high-level interface on top of the robot operating system (ROS). > The default LoCoBot is built on as following - Yujin Robot Kobuki Base (YMR-K01-W1) - Intel NUC NUC8i3BEH core i3 Mini PC - WidowX 200 Mobile Manipulator - Intel® RealSense™ Depth Camera D435 ![](https://i.imgur.com/3pOKess.jpg) \ Fig.1 LoCoBot basic setup The LoCoBot's NUC is no GPU, so we added Xavier-NX to execute perception algorithms or deep learning model, and also used switch let NUC, Xavier-NX and laptop can connect each other. > For the sis2021 course required - Xavier-Nx - Switch ![](https://i.imgur.com/vndu35K.jpg) \ Fig.2 Addition setup ## Network setup Xavier-NX and NUC are connected to switch by RJ45 so that can connect each other and connect wifi to use Internet. The LoCoBot and Xavier-NX password are **locobot** and **111111**, respectively. ![](https://i.imgur.com/K7OEK8j.png) \ Fig.3 LoCoBot network setup > LoCoBot wired fix ip - Xavier-NX is 10.42.0.3 - NUC is 10.42.0.2 > LoCoBot's hostname | LoCoBot | Jetson hostname | NUC hostname | |:--------:|:-----------------:|:--------------:| | 1 | xavier-nx01 | locobot | | 2 | xavier-nx02 | locobot | | 3 | xavier-nx03 | locobot | | 4 | xavier-nx04 | locobot | | 5 | xavier-nx05 | locobot | | 6 | xavier-nx06 | locobot | | 7 | xavier-nx07 | locobot | | 8 | xavier-nx08 | locobot | | 9 | xavier-nx09 | locobot | | 10 | xavier-nx10 | locobot | ## SSH SSH (Secure Shell), can directly connect the remote server execute our commands on the local machine, and use below command. ``` $ ssh remote_hostname@remote_ip ``` If you don't input this command every time, the **sshpass** package and **alias** can achieve this idea. The sshpass can use ssh to execute command so that can directly connect the remote server with one command. ``` $ sudo apt-get install sshpass $ sshpass -p password ssh remote_hostname@remote_ip [command] ``` Although sshpass is convenient approach, the command is so long. The alias can simplify it. You can customize frequently used and long commands as aliases, which will save a lot of time in execution. *Edit bashrc.* ``` $ vim ~/.bashrc ``` *Add command on the below.* ``` alias simplified_name="command" ``` *Source bashrc to refresh it.* ``` $ source ~/.bashrc ``` *Finally, you can input simplified_name to execute command.* ``` $ simplified_name ``` ## ROS connection In order to connect two or above machines under ros connection, the master must to be established on host, and the other machines which want to control need to connect the host. > For LoCoBot - Host set on the NUC, and it ip is 10.42.0.2 *On the host, you need to run this command.* ``` $ export ROS_MASTER_URI=http://10.42.0.2:11311 $ export ROS_IP=10.42.0.2 ``` You can write this commands into script, and source it. We already written this script, you just source this environment. ``` $ source ~/sis2021/environment.sh ``` > For other machine - Slave set on the laptop or Xavier-NX, and it ip is slave_ip *On the slave, you need to run this command.* ``` $ export ROS_MASTER_URI=http://10.42.02:11311 $ export ROS_IP=slave_ip ``` ## laptop setup The laptop can plug in switch to connect by wired, and connect wifi to use Internet, you can see the figure 4. ![](https://i.imgur.com/XLhtMfw.png) \ Fig.4 Network setup ### Network setting Your laptop fix wired ip is 10.42.0.X, X is arbitrary number, but **1, 2 and 3 are used**. The fix wired ip setting can refer manual and command setting. 1. Manual setting Click setting --> network --> edit wired network --> IPV4 \ Change IPV4 method --> manual \ Address --> 10.42.0.X \ Netmask --> 24 \ Related setting can see the figure 5. ![](https://i.imgur.com/AoGPMWZ.png) \ Fig.5 Manual network setting 2. Command setting *Edit network.* ``` $ nmcli connection add con-name wired_name type ethernet ifname eth0 autoconnect yes ip4 10.42.0.X/24 ipv4.method manual ``` *Connection this network.* ``` $ nmcli connection up wired_name ``` 3. Check *After setting, checked by ping.* ``` laptop $ ping 10.42.0.2 laptop $ ping 10.42.0.3 ``` *Connect wifi and check Internet.* ``` $ nmcli device wifi connect SSID-Name password wireless-password $ ping 8.8.8.8 ``` ### SSH *SSH to LoCoBot and Xavier-NX[Num].* ``` $ ssh locobot@10.42.0.2 $ ssh Xavier-NX[Num]@10.42.0.3 ``` ### ROS connection *Setting environment variable to connect ROS.* ``` $ export ROS_IP=l0.42.0.X $ export ROS_MASTER_URI=http://10.42.0.2:11311 ``` ### Remote connection (VNC) If want to use VNC, the VNC server and VNC viewer need to install on robot and laptop respectively, but if use noVNC, the VNC viewer is no need to install. #### VNC viewer on linux You must install VNC viewer on your laptop, and connect VNC server to remote your robot. Take ubnutu 18.04 for example, the other os like Windows or macOS, please refer this website [VNC viewer download](https://www.realvnc.com/en/connect/download/viewer/linux/). *Install VNC viewer.* ``` laptop $ wget https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.20.529-Linux-x86.deb laptop $ sudo dpkg -i VNC-Viewer-6.20.529-Linux-x86.deb ``` *If your laptop cannot install, please fix missing and broken packages, and install again.* ``` laptop $ sudo apt --fix-broken install ``` #### How to use VNC viewer *Open VNC viewer.* ``` laptop $ vncviewer ``` You will see this window. ![](https://i.imgur.com/b5PmO4P.png) \ Fig.6 Vnc viewer window select File --> new connection or press Ctrl+n ![](https://i.imgur.com/yX5LcSN.png) \ Fig.7 Vnc viewer setting Fill VNC Server and Name, and then click it to connect VNC server, if you see this picture. Now you can remote the robot! ![](https://i.imgur.com/FQBAczx.jpg) \ Fig.8 Remote desktop #### VNC viewer on Mac Enter vnc://remote_ip location in Safari to use your Mac as a VNC Viewer. ### byobu This tool is very useful for managing your terminal, whether it is local or remote, it can be accessed by anyone. *Install.* ``` $ sudo apt-get install byobu ``` *Open terminal, and type.* ``` $ byobu ``` *Then you can start use byobu.* The common commands are as following * `F2` create a new window * `F3` and `F4` switch window * `shift`+`F2` create a horizontal terminal * `ctrl`+`F2` create a vertical terminal` * `ctrl`+`D` delete current window * `shift`+ arrow key change window ### How to connect We will introduce three methods to access LoCoBot, make sure you already finished above setting. > X11_Forward First, edit your ssh_config on the laptop, and ssh into LoCoBot, open camera and type rviz on your laptop, then you will see rviz on your laptop. *Edit ssh config.* ``` laptop $ sudo vim /etc/ssh/ssh_config ``` *Modifiy ForwardX11 to yes and uncomment.* \ ![](https://i.imgur.com/zIYR24G.png) \ Fig.9 ssh_config setting *SSH into LoCoBot.* ``` laptop $ ssh locobot@10.42.0.2 ``` *Open D435.* ``` locobot $ roslaunch realsense2_camera rs_rgbd.launch ``` *Open Rviz.* ``` laptop $ rivz ``` > VNC First, ssh into LoCoBot, open vnc server and wait vnc viewer to connect it, then you will see remote desktop on your laptop. *SSH into LoCoBot* ``` laptop $ ssh locobot@10.42.0.2 ``` *For LoCoBot.* ``` locobot $ source ~/sis2021/vnc/vnc_start.sh ``` Use vnc viewer to connect it. > noVNC First, ssh into LoCoBot, open vnc server and novnc, then you can use browser to connect it. *SSH into LoCoBot or Xavier-NX.* ``` laptop $ ssh locobot@10.42.0.2 ``` *For LoCoBot.* ``` locobot $ source ~/sis2021/vnc/vnc_start.sh ``` *Open another terminal.* ``` locobot $ source ~/sis2021/vnc/novnc_start.sh ``` open the browser URL input ==http://remote_IP:6080/vnc.html== you will see login interface, click connect and input password, then you will can remote the robot. ![](https://i.imgur.com/fIlkleG.png) \ Fig.10 noVNC window ![](https://i.imgur.com/Ev8BpqQ.jpg) \ Fig.11 Remote desktop

    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
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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