Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

ABRG-Models/MiRo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 

Repository files navigation

MiRo

For collaborative development of the MiRo-E demo code

Getting started

There's just a few things you'll need to do before using this repo for MiRo development:

  1. Request access to the repo in the Slack and accept the invite
  2. Clone the repo to a suitable location on your local machine
  3. Run the MDK installer (at mdk/bin/deb64/install_mdk.sh) from the download location to set this version of the MDK as the one your MiRo simulator will run -- if you've previously installed the MDK you may have to remove the current symlink at ~/mdk first
  4. That's it! If you're already familiar with Git, feel free to create a branch for your project and dig in; if you've not used Git before then there's a couple of guides linked below, but just ask if you need any help.

Students

The desktop computers in B.09 have a copy of this repo at ~/Documents/MiRo; the first thing you should do is create and checkout a new branch for your project by changing to the repo directory and running git checkout -b <your_project_name>. We're going to store project work in a single cloned repo location on the disk (as this makes running the MDK a lot easier) but in separate branches, so it's probably worth familiarising yourself with how branching works in Git if you've not used Git before. In particular, it's important that you remember to checkout your branch each time you want to do some work, and then commit and push your changes once you're finished.

Please don't push changes to the master branch or make changes to the code on the physical robots; these should be left in a known-good state.

Interacting with MiRo

We use ROS to interface with both physical and virtual MiRos and Gazebo as a simulation environment, so these are the two additional software packages you'll need to test your code on your personal machine. There are two ways to get going:

Native

A native install will allow the Gazebo simulator to run quicker and is likely to be simpler and have fewer issues overall, but because of the software dependencies it will require you to install Ubuntu 16 or an Ubuntu 16 fork such as Linux Mint 'Sylvia' as your OS.

Once you've done that, it's recommended you follow the official MiRo-E documentation for installing ROS Kinetic and Gazebo 7.

Docker

If you don't want to install Ubuntu 16 on your machine, it should be possible to run a virtualised instance of the MiRo simulator through Docker (as long as you're still running some Linux variant). Install Docker CE and then:

  1. Run docker pull tacd/miro_sim to get the MiRo simulator Docker image
  2. Run docker run -it --net host -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix tacd/miro_sim to launch the Docker image

If all goes well, Gazebo should open with a virtual MiRo already loaded.

Connecting to a physical robot

To connect to the ROS core on your MiRo robot you will need to ensure three environment variables are set correctly:

  • ROS_IP must be set to your machine's IP address (of the interface used to communicate with MiRo)
  • ROS_MASTER_URI must be set to http://<MiRo's IP>:11311
  • MIRO_ROBOT_NAME must be set to your MiRo's ROS name - this can easily be viewed in the MiRo app

Useful commands

The following commands all require a running roscore instance for use with a virtual MiRo

Launch the MiRo simulator: ~/mdk/sim/launch_sim.sh

Run the client GUI: ~/mdk/bin/shared/client_gui.py

Run the MiRo demo code: Run the following commands in separate terminal windows:

  • ~/mdk/share/python/miro2/core/client_demo.py - caml (Note the space before and after the dash)
  • ~/mdk/share/python/miro2/core/client_demo.py - camr
  • ~/mdk/share/python/miro2/core/client_demo.py

Troubleshooting

If you can view ROS data but not send commands, this usually indicates that ROS_IP is not set correctly.

About

Collaborative MiRo-E development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •