Git Product home page Git Product logo

freewalk's Introduction

Hardware requirements

Known to work with Arduino Mega. Microcontrollers with less memory may not work, given the overhead of the ROS Arduino library.

Dependencies

tom-f-oconnell/rosserial

tom-f-oconnell/multi_tracker

tom-f-oconnell/stimuli

tom-f-oconnell/metatools

Install these dependencies as you would install any ROS package from source, i.e.

  • Make a catkin workspace
  • Clone each repository to <workspace>/src
  • cd <workspace> && catkin_make
  • source <workspace>/devel/setup.bash
    • You can put this line in your ~/.bashrc file, towards the bottom. If you do, make sure to put it AFTER the other line that sources some setup.bash file ROS uses.

TODO make a file to install all of these with wstool.

To compile and install the Arduino code on the Arduino MEGA (on Ubuntu)

  • Run catkin_make from your catkin workspace and source the <workspace>/devel/setup.bash file.

    1. cd <workspace> (I generally put my workspace at ~/catkin)
    2. catkin_make
    3. source <workspace>/devel/setup.bash
  • Make sure your user is in the dialout group, so it can use the USB ports to upload code (and other USB communication?)

    • To check, run groups as the same user you plan to run the experiment from, and look for the dialout in the list that prints.
    • If dialout is not there, run sudo usermod -aG dialout <username>.
      • You will need to log out and back in for this change to take effect.
  • cd to the libraries directory under wherever you installed Arduino. If you installed it with the zip file on the Arduino website, this will be something like <place-you-unzipped>/arduino-1.8.3/libraries. Run

rosrun rosserial_arduino make_libraries.py .

This will setup the ROS libraries for compilation in the Arduino IDE.

  • Open the Arduino IDE (make sure it is the same for which you installed <arduino>/libraries, in case multiple are installed.). Select appropriate port and board. Press upload.

To run the experiment

  • cd to a directory with configuration files for the tracking and for the stimulus delivery. See freewalk/example_config for examples.
  • Run ROS_HOME=`pwd` roslaunch freewalk walk.launch

Parameters to the launch file

  • stimuli_only: (default=False) If True, will run the same stimuli (modulo randomization) that would happen with the same configuration. For validation / measuring the odor output.

  • port: (default=/dev/ttyACM0) The port your Arduino is connected to. The port your MEGA is connected to can often be determind by inspecting the list of available ports in the Arduino IDE.

  • video_only: (default=True) The tracking only saves the background subtracted video, plus background frames, and some metadata. Nodes to do extra image processing and data association necessary to generate trajectories are not started.

To test your valves

Run ROS_HOME=`pwd` roslaunch stimuli test_valves.launch

This will use the same stimulus_parameters.yaml file walk.launch expects in your current directory (ROS_HOME), and test the union of the lists in the olf/left_pins and olf/right_pins parameters.

freewalk's People

Contributors

tom-f-oconnell avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.