Giter Club home page Giter Club logo

spot_ros's Introduction

Spot ROS Driver

CP Spot

Prerequisite

pip3 install bosdyn-client bosdyn-mission bosdyn-api bosdyn-core

Documentation

Check-out the usage and user documentation HERE

Environment Variables

This driver supports configuration via environment variables. These can either be manually set in the terminal before starting the driver, or added to $HOME/.bashrc as-desired. The table below lists the available variables and their default values:

Variable Default Value Description
SPOT_PACK 0 If 1, enables the standard ROS backpack accessory and adds it to the URDF
SPOT_LIDAR_MOUNT 0 If 1, adds the Lidar mount to the backpack. Requires SPOT_PACK to be 1
SPOT_VELODYNE 0 If 1, adds the a VLP-16 sensor to the lidar mount. Requires SPOT_LIDAR_MOUNT to be 1
SPOT_VELODYNE_AUTOLAUNCH 1 If 1 and SPOT_VELODYNE is also 1, the VLP16 ROS node will start automatically
SPOT_VELODYNE_XYZ 0 0 0 XYZ offset for the VLP-16 from the backpack lidar mount
SPOT_VELODYNE_RPY 0 0 0 RPY offset for the VLP-16 from the backpack lidar mount
SPOT_VELODYNE_HOST 192.168.131.20 IP address of the VLP-16 sensor
SPOT_URDF_EXTRAS empty.urdf Optional URDF file to add additional joints and links to the robot
SPOT_JOY_DEVICE /dev/input/js0 The Linux joypad input device used by the joy_teleop node
SPOT_JOY_CONFIG spot_control/config/teleop.yaml Joypad button/axis configuration file for joy_teleop

Building Quick-Start

NOTE: please follow the link above for the complete documentation. You will need to configure the networking on both your computer and the base Spot platform before you can run the driver.

Install Dependencies

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-melodic-ros-base

sudo apt update
sudo apt install -y python3-pip
pip3 install cython
pip3 install bosdyn-client bosdyn-mission bosdyn-api bosdyn-core
pip3 install empy

If using the Velodyne VLP-16 mounted to the standard Spot backpack you will also need the velodyne_description and velodyne_pointcloud ROS packages. These are included as dependencies in the spot_driver and spot_description packages respectively, and will be installed if you use rosdep install ... in your workspace.

The teleop_joy package is also included as a dependency to allow Spot to be controlled using a bluetooth or USB game controller.

Building for Melodic

Please note that the Spot SDK uses Python3, which is not officially supported by ROS Melodic. If you encounter an error of this form:

Traceback (most recent call last):
  File "/home/administrator/catkin_ws/src/spot_ros/spot_driver/scripts/spot_ros", line 3, in <module>
    from spot_driver.spot_ros import SpotROS
  File "/home/administrator/catkin_ws/src/spot_ros/spot_driver/src/spot_driver/spot_ros.py", line 19, in <module>
    import tf2_ros
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module>
    from tf2_py import *
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 38, in <module>
    from ._tf2 import *
ImportError: dynamic module does not define module export function (PyInit__tf2)

when launching the driver, please follow these steps:

  1. rm -rf devel/ build/ install/ -- this will remove any old build artifacts from your workspace

  2. git clone https://github.com/ros/geometry2 --branch 0.6.5 into your src folder

  3. rebuild your workspace with

catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so

Or if you are using an Nvidia Jetson:

catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so
  1. re-run source devel/setup.bash

  2. start the driver with roslaunch spot_driver driver.launch

spot_ros's People

Contributors

708yamaguchi avatar civerachb-cpr avatar cst0 avatar dniewinski avatar grassjelly avatar harelb avatar heuristicus avatar k-okada avatar mariogini avatar sktometometo avatar tkmtnt7000 avatar wolfv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

k-okada

spot_ros's Issues

Pose service does not reflect timeout

Calling the pose service (e.g., rosservice call /spot/spot_pose 3 0 0 0 0 1) should have a pose held for one second. Instead, it seems to be held indefinitely.

Build error: spot_msgs/Lease.h: No such file or directory

Error

When building (melodic, fresh clone and build):

In file included from /home/cst/ws_spot/devel/include/spot_msgs/LeaseArray.h:18:0,
                 from /home/cst/ws_spot/build/spot_ros/spot_viz/spot_viz_autogen/UVLADIE3JM/../../../../../src/spot_ros/spot_viz/src/spot_panel.hpp:13,
                 from /home/cst/ws_spot/build/spot_ros/spot_viz/spot_viz_autogen/UVLADIE3JM/moc_spot_panel.cpp:9,
                 from /home/cst/ws_spot/build/spot_ros/spot_viz/spot_viz_autogen/mocs_compilation.cpp:2:
/home/cst/ws_spot/devel/include/spot_msgs/LeaseResource.h:18:10: fatal error: spot_msgs/Lease.h: No such file or directory
 #include <spot_msgs/Lease.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

Workaround

Re-running catkin_make resolves the issue and is an acceptable workaround. Appears to be a build structuring issue, long-term fix is to untangle the dependencies and figure that out.

Better cmd_vel command execution

There are some cases where the current interpretation of cmd_vels leaves much to be desired:

  • If cmd_vel's are received at too low a rate, the robot does not move
  • There's no acceleration/deceleration (at least not noticably), so jerking behavior is common
  • There's some startup race condition where a series of 0'd cmd_vels can be sent, preventing locomotion (though this may be on the side of spot_ros_nav)

Arm opening to use automated door detection

The default arm opener requires a human-in-the-loop, which is obviously not ideal. There's an integration with an automated door opener, but this does not appear to be running reliably. More investigation into this is required.

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.