Giter Club home page Giter Club logo

rc_templates's People

Contributors

alex-arnal avatar

rc_templates's Issues

Add Subscriber example to the template

Expected behavior

It should be listening a topic all time and print a ROS_INFO every time it recives a message.

Metodology

  • Add the subscriber to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Add string variable related to the topic that the subscriber will use to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Add the callback function that the suscriber will use to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Initialize the topic variable in the rosReadParams method. Set the value of the variable reading it as a ROS param.

  • Initialize the subscriber in the rosSetup method.

  • Define the callback.

  • Check that there is no any compilation error and that the node works as expected.

  • Comment all changes. This way, the template will have a ROS Subscriber that actually works, but the user will decide if he will use it, uncommenting it or not.

Add Service server example to the template

Expected behavior

It should be called with an empty request. It will print a ROS_INFO every time is triggered

Metodology

  • Add the service server to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Add string variable related to the name of the service to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Add the callback function that the service will use to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Initialize the service name variable in the rosReadParams method. Set the value of the variable reading it as a ROS param.

  • Initialize the subscriber in the rosSetup method.

  • Define the callback.

  • Check that there is no any compilation error and that the node works as expected.

  • Comment all changes. This way, the template will have a ROS Service Server that actually works, but the user will decide if he will use it, uncommenting it or not.

Automate uncomment template

Expected behaviour

It will uncomment parts of the template based on the needs of the user (publisher, subscriber, etc.)

Metodology

  • Create an script that detects comments with a specific structure.
    i.e:
/* Test Publisher
  CODE
*/
  • Once are detected, delete the comments.

  • Let the script get arguments to select what to uncomment.

Add Publisher example to the template

Expected behavior

It should publish data every time the controlLoop of the RComponent is executed and the component is in READY_STATE.

Metodology

  • Add the publisher to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Add string variable related to the topic that the publisher will use to the rc_template_cpp.h in the part of the node-specific variables and functions.

  • Initialize the topic variable in the rosReadParams method. Set the value of the variable reading it as a ROS param.

  • Initialize the publisher in the rosSetup method.

  • Make the publisher send data in the readyState method.

  • Check that there is no any compilation error and that the node works as expected.

  • Comment all changes. This way, the template will have a ROS Publisher that actually works, but the user will decide if he will use it, uncommenting it or not.

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.