GithubHelp home page GithubHelp logo

kevinochs / hexapod_ros Goto Github PK

View Code? Open in Web Editor NEW
107.0 18.0 46.0 12.75 MB

ROS Hexapod stack with functioning 2D and 3D mapping.

License: Other

CMake 3.92% C 0.38% C++ 95.70%
c-plus-plus hexapod hexapod-ros ros robotics gait stack 3d-map odometry rviz

hexapod_ros's Introduction

ROS Hexapod Stack

1. Documentation

This is my implementation of a hexapod functioning in the ROS framework. Agnostic to either a 3dof or 4dof hexapod. It is still very much a work in progress and I am still actively developing it.

Thanks to Shubhankar Das there are two gaits offered, the original sinusoidal tripod gait and a new ripple gait.

  • Author: Kevin M. Ochs
  • Contributor: Shubhankar Das
  • Contributor: Renée Love
  • Contributor: Konstantinos Chatzilygeroudis
  • Contributor: Kurt Eckhardt
  • Contributor: Romain Reignier

2. Expected Hardware for mapping

  • Primesense Sensor, Asus Xtion or Intel Realsense
  • IMU (Current master branch uses a Phidgets 3/3/3 Spatial in launch files.)

3. Dependencies

sudo apt-get install git
sudo apt-get install ros-indigo-sound-play
sudo apt-get install ros-indigo-diagnostic-updater
sudo apt-get install ros-indigo-xacro
sudo apt-get install ros-indigo-openni2-launch
sudo apt-get install ros-indigo-depthimage-to-laserscan
sudo apt-get install ros-indigo-joystick-drivers
sudo apt-get install ros-indigo-imu-filter-madgwick
sudo apt-get install ros-indigo-robot-localization
sudo apt-get install ros-indigo-rtabmap
sudo apt-get install ros-indigo-rtabmap-ros
sudo apt-get install ros-indigo-robot-state-publisher
sudo apt-get install ros-indigo-gazebo-ros-control
sudo apt-get install ros-indigo-navigation
sudo apt-get install ros-indigo-move_base
sudo apt-get install ros-indigo-navfn
sudo apt-get install ros-indigo-amcl
sudo apt-get install libusb-1.0-0-dev

Joystick

For pairing a PS3 controller you can either install BlueZ5 or follow the below link.

https://help.ubuntu.com/community/Sixaxis

4. Nodes

hexapod_controller

This is the main node of the stack. It handles all control, gait, IK and servo communications with the legs. Minimal latency was required to keep the gait smooth and synced with odometry hence the reason they are all combined in this one node.

Subscribed Topics

 cmd_vel (geometry_msgs/Twist) Velocity command. 
 body_scalar (geometry_msgs::AccelStamped) Scalar to modifiy the orientation of the body.
 head_scalar (geometry_msgs::AccelStamped) Scalar to modifiy the pan and tilt of the optional turret.
 state (std_msgs::Bool) Bool array to record state of the hexapod. Standing up, sitting etc.
 imu/data (sensor_msgs::Imu) Used in optional auto body leveling on non level ground.

Published Topics

sounds (hexapod_msgs::Sounds) Custom message to send sound cues to the optional sound package.
joint_states (sensor_msgs::JointState) Joint states for rviz and such.
odometry/calculated (nav_msgs::Odometry) Calculated odometry from the gait system in the package.
twist (geometry_msgs::TwistWithCovarianceStamped) Twist message syncronized with the gait system. 

hexapod_bringup

This package has all the launch files. From simple locomotion only to full mapping and localization examples.

hexapod_description

This package has all the param files. You will start with one of the param config files to describe your hexapod. It also has params for different telop controllers. The xacro and meshes also reside in this package.

Example Launch Command

roslaunch hexapod_bringup hexapod_full.launch config:=phantomX joy_mapping:=joystick_ds3

5. Install

git clone https://github.com/KevinOchs/hexapod_ros.git . 

For Raspberry Pi2 please add these compiler optimizations after first build.

[workspace]/build/CMakeCache.txt
Change: CMAKE_CXX_FLAGS:STRING=-O3 -mfloat-abi=hard -mfpu=neon-vfpv4 -mcpu=cortex-a7

For ODROID XU3 please add these compiler optimizations after first build.

[workspace]/build/CMakeCache.txt
Change: CMAKE_CXX_FLAGS:STRING=-O3 -pipe -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=hard

Videos


Click on picture for redirect to YouTube video.

Rviz recording of 3D mapping using RTABmap.

[ScreenShot] (https://www.youtube.com/watch?v=-3Ejgy1nFOg)

Small video of Golem research platform and IMU testing.

[ScreenShot] (https://www.youtube.com/watch?v=IP-1HebkZnU)

Renée Love's odometry test video using the phantomX.

[ScreenShot] (https://www.youtube.com/watch?v=VYBAM0MrvWI)

Pictures

Rviz screenshot of point cloud and laserscan active. ScreenShot

2D room mapping in Rviz. ScreenShot

Renée Love's adaptation of the Hexapod stack for Trossen's PhantomX. ScreenShot

hexapod_ros's People

Contributors

costashatz avatar kevinochs avatar kurte avatar r3n33 avatar razbotics avatar romainreignier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexapod_ros's Issues

Ik problem of phantomX

Hi, thank you for your great work.
The IK class works well with the 4 DOF legs, however, it can't get the correct joint angles for the phantomX robot. Could you give me some suggestions?

Raspberry pi and standard servos

Hello,
Can the code be used with a raspberry pi and standard hobby servos I'm looking to do a college project and I'm on a budget.

The initialization of pose_th_,pose_x_ and pose_y_

You should initialize pose_th_,pose_x_ and pose_y_ equal to zero at the construct function of control.cpp When i using the fake odom tf, it works perfectly on one machine, but becomes weird on the other machine. I finally found that some machine give a random initial value instead zero...
Bests.

Driver for pca9685 available?

Hi i would like to use your hexapod_ros package for odometry, but my hexapod uses a pca9685(pwm) controllerboard! is there any chance for use with an pca9685 driver?
thx in advance!

Wrong ID in phantomX.yaml

Hi,

I'm just testing the stack on a RPI4 and a PhantomX MarkIII. It seems that the phamtonX.yaml file has a small problem regarding servo ID's.

In detail

16': {name: coxa_joint_LF, type: AX, id: 19, ticks: 1024, center: 512, max_radians: !degrees 300, sign: 1, offset: !degrees 0},

should be

'16': {name: coxa_joint_LF, type: AX, id: 1, ticks: 1024, center: 512, max_radians: !degrees 300, sign: 1, offset: !degrees 0},

and lines
'19': {name: pan_joint, type: AX, id: 20, ticks: 1024, center: 512, max_radians: !degrees 300, sign: 1, offset: !degrees 0},
'20': {name: tilt_joint, type: AX, id: 21, ticks: 1024, center: 512, max_radians: !degrees 300, sign: 1, offset: !degrees 0}

should become

'19': {name: pan_joint, type: AX, id: 19, ticks: 1024, center: 512, max_radians: !degrees 300, sign: 1, offset: !degrees 0},
'20': {name: tilt_joint, type: AX, id: 20, ticks: 1024, center: 512, max_radians: !degrees 300, sign: 1, offset: !degrees 0}

Cheers,

Christ

imu_lowpass_ variables in control.cpp need init value

imu_pitch_lowpass_
imu_roll_lowpass_
imu_yaw_lowpass_

All need to be initialized to 0 on instantiation of the Control class. This became apparent when compiling and running on the RaspberryPi ARM architecture.

Does gazebo control work?

Hello, I'm trying to get this robot working in simulation in gazebo. It looks like the gazebo implementation exists, but I can't find any way to have the hexapod gait & control node talk to the gazebo controllers instead of real Dynamixels. Is it possible to launch the robot and control it within gazebo? Could you provide an example of how to bring that up?

Parameters vs data members in publishJointStates()

In control.cpp, the method publishJointStates() takes leg, head and joint_state parameters which are data members of the Control class so they are accessible by the method with no need of the parameters.

In the case you want to be able to use other messages than the data members of the Control class, then you should replace the use of head_ (line 145) by the parameter head.

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.