Giter VIP home page Giter VIP logo

vector_ros's Introduction

vector_ros

This repository contains an unofficial ROS package for Anki Vector. This package is essentially a wrapping of core Vector functions from Vector Python SDK as ROS topics, services and actions(full list below). THe original repository is that we forked from is here

Setup

Requirements

Virtual Environment

It's highly recommended to use a virtual environment in order to run Python 3 properly on ROS. Follow the instructions:

  1. Clone this repository
git clone https://github.com/betab0t/vector_ros
  1. Install virtualenv
# Get virtualenv package
sudo apt update
sudo apt install python3-dev python3-pip
sudo pip3 install -U virtualenv

# Verify installation
python3 --version
pip3 --version
virtualenv --version

# Make python3 virtual environment
cd vector_ros
virtualenv --system-site-packages -p python3 envs/venv
source envs/venv/bin/activate  # sh, bash, ksh, or zsh
pip install --upgrade pip
pip list  # show packages installed within the virtual environment
deactivate  # don't exit until you're done running code
  1. Install Vector SDK

Follow the instructions listed here. Make sure to use your Anki Developer username and password

Topics

  • /vector/camera (sensor_msgs/Image)

Vector camera feed.

  • /lwheel_ticks (std_msgs/Int32)

Cumulative encoder ticks of the left wheel. used by diff_drive package.

  • /rwheel_ticks (std_msgs/Int32)

Cumulative encoder ticks of the right wheel. used by diff_drive package.

  • /lwheel_rate (std_msgs/Int32)

Left wheel rotation rate. used by diff_drive package.

  • /rwheel_rate (std_msgs/Int32)

Right wheel rotation rate. used by diff_drive package.

Services

  • /vector/battery_state

  • /vector/set_head_angle

  • /vector/set_lift_height

  • /vector/anim_list

  • /vector/say_text

Actions

  • /vector/play_animation

Play animation by name.

Examples

Run the following (with your Vector's serial number substituted) to make topics available for subscribing and publishing messages to Vector

roslaunch vector_ros vector.launch serial:="<serial number>"

View single image from camera

rosrun image_view image_saver image:=/vector/camera
[ INFO] [1550425113.646567813]: Saved image left0000.jpg
[ INFO] [1550425113.752592532]: Saved image left0001.jpg
[ INFO] [1550425113.848999553]: Saved image left0002.jpg

Set head angle

rosservice call /vector/set_head_angle "deg: 45.0"

Say text

rosservice call /vector/say_text "text: 'hello world'"

Play animation

rostopic pub /vector/play_animation/goal vector_ros/PlayAnimationActionGoal "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
goal_id:
  stamp:
    secs: 0
    nsecs: 0
  id: ''
goal:
  anim: 'anim_turn_left_01'"

FAQ

vector_ros's People

Contributors

betab0t avatar jmc359 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.