Giter Site home page Giter Site logo

robotec-ua / robotec_velocity_controller Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 16 KB

The package is an interlayer between the robot's navigation stack and actual hardware controllers.

License: Apache License 2.0

CMake 8.66% C++ 91.34%
ros diff-drive diff-drive-robot 2wd ros-control

robotec_velocity_controller's Introduction

Velocity Controller by Robotec

The package is an interlayer between the robot's navigation stack and actual hardware controllers. It computes separate velocities for wheels of a two-wheeled robot using command velocity and the known state of every wheel.

Table of contents

Project structure

.
├── config
│   └── README.md
├── include
│   └── robotec_velocity_controller
│       └── robot_hardware.hpp
├── src
│   ├── controller_node.cpp
│   └── robot_hardware.cpp
├── CMakeLists.txt
├── LICENSE
├── package.xml
├── README.md
└── TODO.md

Folders

  • include : RobotHWImplementation header file
  • src : node source code

Files

  • CHANGELOG.md : the file where the changes to the project are desribed
  • README.md : project documentation
  • TODO.md : suggesting changes in the package

Class hierarchy

Class hierarchy is represented as one class, which is an implementation of ros_control's interface.

Class RobotHWImplementation

The class is an implementation of the RobotHW class from ros_control package. The class is dedicated to create a filler between ros_control and robot's actual hardware.

Methods

  • controllerInitialization : initialization of the controllers for ControllerManager
  • update : read, calculate and write data on a time event
  • write : the method is dedicated to publishing the data when triggered by the timer event
  • (left/right)WheelDegreesCallback() : callback for receiving degrees data
  • (left/right)WheelvelocityCallback() : callback for receiving velocity data

Fields

  • WHEELS_AMOUNT : amount of joints to create
  • left_wheel_setpoint_pub : desirable value of speed to achieve on the left wheel
  • right_wheel_setpoint_pub : desirable value of speed to achieve on the right wheel
  • _state_interface : interface for checking state of joints (ros_control)
  • _velocity_interface : velocity controller interface (ros_control)
  • _positions : array of positions
  • _velocities ; array of velocities
  • _efforts : array of applied efforts
  • _effort_commands : array of efforts to handle joints control
  • _velocity_commands : array of velocity to handle joints control
  • _rate : timer trigger rate
  • nh_ : ROS node instance
  • timer_event : ROS timer instance
  • elapsed_time_ : elapsed time since last operation
  • controller_manager_ : controller_manager instance

Algorithm

This node is an implementation of RobotHW class (ros_control), which is dedicated to be a middleman between high-level operations (e.g. data transferring) and actual joint controllers (ros_controllers). robotec_velocity_controller gets data of which speed it should maintain on two different wheels of differential drive robot. Then, using data about actual state of the wheels, it calculates velocities for them and publishes the data on timer triggers.

Topics

Subscribed

  • (left/right)/velocity : topic with current velocity data
  • (left/right)/degrees : topic with current degrees data

Publishing

  • (left/right)/setpoint : topic with desirable valocity for every wheel separately

Parameters

  • left_velocity : name of the left wheel velocity data topic, default : /left_wheel/velocity
  • right_velocity : name of the right wheel velocity data topic, default : /left_wheel/velocity
  • left_degrees : name of the left wheel degrees data topic, default : /left_wheel/degrees
  • right_degrees : name of the right wheel degrees data topic, default : /right_wheel/degrees
  • left_setpoint : name of the left wheel setpoint data topic, default : /left_wheel/setpoint
  • right_setpoint : name of the right wheel setpoint data topic, default : /right_wheel/setpoint

Usage

  • The first step of using the package is to create a configuration file. The process is described in config folder

  • Next, you should run the command :

$ rosrun robotec_velocity_controller velocity_controller

robotec_velocity_controller's People

Contributors

those-eyes avatar

Watchers

 avatar

robotec_velocity_controller's Issues

Missing 2Wcontrol file

Hi.. ive been working on differential_drive and was trying to implement hardware interface and then came across your package and wrote a hw_interface by customizing to our robot requirements and in the launch file I've seen there is driver_control package with 2Wcontrol node missing in the current repository could you just give me a peek at it so that I could complete my hardware_interface module.. thanks in advance..!

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.