Git Product home page Git Product logo

colab_reachy_ros's Introduction

colab-reachy-ros

ROS structure

This directory is a ROS package. If you want to use it in your own ROS environment, clone it into your catkin_ws/src directory. Alternatively, if you use the development Docker-Compose setup, it will automatically be mounted as /home/reachy/catkin_ws/src/colab-reachy-ros, and other packages associated with the Reachy will automatically be cloned.

Native setup

Using simulator

  • Open in your browser, and click connect once the unity window loads: https://playground.pollen-robotics.com/
  • Run roslaunch colab_reachy_ros moveit_demo.launch simulator:=true
  • Open a new terminal to use the arm compliant mode service, and enter rosservice call /right_arm_controller/set_arm_compliant False

Node Descriptions


Head Node

Screenshot

Description

this node controls the head of reachy its two servo motors which control the tilt and yaw of the head
TODO: add control of reachy's 2x antenna's (ears)

Commandline Example

this sends a animation for the head in this case its dummy data
but could be conerted to something that shakes the head back and forth
Ros parameters
file is located in launch/head.launch
value="/dev/ttyACM0"/ must be changed to reflect the arduino your using

to find your arduino port run this command
1) 
ls /dev/ttyACM*
2) if that doesnt work try to see if you see "arduino" in the name
ls /dev/serial/by-id
# run the node manually 
## NOTE you must check that the arduino is plugged in and flashed, PLUS that you have the correct arduino port
roslaunch colab_reachy_ros head.launch
# single position (move tilt and yaw) debug statements
rostopic pub /head/position_animator/debug_point_degrees trajectory_msgs/JointTrajectoryPoint '{positions: [94, 100]}'

# Animation example
rostopic pub /head/position_animator_debug_degrees trajectory_msgs/JointTrajectory '{points:[{positions:[94,80]},{positions:[65,80]},{positions:[65,80]},{positions:[94,80]}]}'

how to use degree mode debug topic

usecase : i just want to move the motors to one position for testing

NOTE: the angles are in degrees not! radians

rostopic pub /head/position_animator/debug_point_degrees trajectory_msgs/JointTrajectoryPoint '{positions: [0, 75]}'

Hardware Requirments

  • 2 hobby servo motors

Message Format

  
Header header
string[] joint_names
JointTrajectoryPoint[] points <- im only using this one

example of a JointTrajectoryPoint

float64[] positions <- im only using this one
float64[] velocities
float64[] accelerations
float64[] effort
duration time_from_start

example if it was in json format 
{
    points:
        [
            { positions: [1.5, 1.5] },
            { positions: [0.8, 1.2] },
            { positions: [0.7, 0.6] },
            { positions: [0.3, 0.1] }
        ]
}

Required Packages (python)

im not using any special packages besides the normal rospython client
rospy==1.15.9

Ros packages Instilation (apt-get install)

ros serial for noetic is required to communicat with the arduino over serial
sudo apt-get install ros-noetic-rosserial-arduino
sudo apt-get install ros-noetic-rosserial

Topics Defintion

---public topics---
"/head/position_animator_debug_degrees": JointTrajectory USE: sending a array of poses that make the head move in a animation
"/head/position_animator/debug_point_degrees" JointTrajectoryPoint USE: Use for sending just one position i use it to set the head to a location for testing 

---private topics ---
"/head/position_animator": JointTrajectory UNUSED DO NOT USE
"/head/position_animator/debug_point": JointTrajectoryPoint UNUSED DO NOT USE
 for debugging only private 
"/head/neck_pan_goal": UInt16 
"/head/neck_tilt_goal": UInt16

rostopic pub /head/position_animator/debug_point_degrees trajectory_msgs/JointTrajectoryPoint '{positions: [94, 100]}'

Notes

The arduino code has a manual offset of -90 to account for how the servo motors are mounted that can be changed to 0 if you dont have any offsets

filename: arduino_code/ServoControl/ServoControl.ino

int head_yaw_offset = -90

to

int head_yaw_offset = 0;

title range is between 115 degrees (90+25d ) <-> 75 degrees (90-15d ) with no offset

----- where 90 degrees is the head facing forward (virtical)

how to create a head nodding animation

yes guesture

NOTE: (0, 90) is a nutral head position head facing straight forward and neck stright upright

commandline pub version of yes guesture

94,80
94,115
94,80
94,115
94,80

rostopic pub /head/position_animator_debug_degrees trajectory_msgs/JointTrajectory '{points:[{positions:[94,80]},{positions:[94,115]},{positions:[94,80]},{positions:[94,115]},{positions:[94,80]}]}' 
#### no guesture
```bash
94,80
65,80
115,80
65,80
115,80
94,80

rostopic pub /head/position_animator_debug_degrees trajectory_msgs/JointTrajectory '{points:[{positions:[94,80]},{positions:[65,80]},{positions:[115,80]},{positions:[65,80]},{positions:[115,80]},{positions:[94,80]}]}'  

Look right

94,80
65,80
65,80
94,80

rostopic pub /head/position_animator_debug_degrees trajectory_msgs/JointTrajectory '{points:[{positions:[94,80]},{positions:[65,80]},{positions:[65,80]},{positions:[94,80]}]}'  

Look left

94, 80
115,80
115,80
94, 80

rostopic pub /head/position_animator_debug_degrees trajectory_msgs/JointTrajectory '{points:[{positions:[94,80]},{positions:[115,80]},{positions:[115,80]},{positions:[94,80]}]}'  

EXAMPLE FORMAT


NAME

Screenshot

Description

blah blah blah

Commandline Example

echo foo

Hardware Requirments

  • foo
  • bar

Message Format

  
float64[] positions
float64[] velocities
float64[] accelerations
float64[] effort
duration time_from_start

Required Packages (python)

requests==3.5.2

Ros packages Instilation (apt-get install)

ls -hal

Topics/Services/Actions Defintion

/EXAMPLE_TOPIC : Int16

Ros parameters

Notes


Contributors

Made with contributors-img.

License

MIT © wisehackermonkey

License: MIT

colab_reachy_ros's People

Contributors

trevormuraro avatar tigakub avatar wisehackermonkey avatar circuit-launch avatar agillies8 avatar nahuel-v avatar liamhan0905 avatar annag5555 avatar

Watchers

James Cloos avatar  avatar  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.