Skip to content

Latest commit

 

History

History
executable file
·
122 lines (86 loc) · 5.85 KB

README.md

File metadata and controls

executable file
·
122 lines (86 loc) · 5.85 KB

reference_signal_generator

GitHub issues GitHub pull requests GitHub forks GitHub stars GitHub license


A simple ROS node for generating reference signals for control systems.

📝 Table of Contents

🧐 About

Wanting to quickly send some reference signals for your own control system in ROS2? Then this repo's for you. reference_signal_generator allows you to quickly bind a ROS2 node to a user-specified topic, and publish a reference signal with any number of inputs and a series of different signal types. The parameters are customized through ROS2 service calls.

You may call the services in many different ways, but this package comes with an extra: a custom Foxglove panel made specifically for it! Check out foxglove-reference-signal now for more information!

🏁 Getting Started

This repo is a standard ROS2 package (ament_python) that depends on custom service definitions.

🛠 Prerequisites

  • A ROS2 workspace (colcon)

  • reference_signal_srvs

    • This other repo contains the service definitions for the reference signals advertised by reference_signal_generator. Definitions are kept in a dedicated package following the ROS2 best practice.

💻 Installing

As mentioned above, this repo is a standard ROS2 package. Thus, you simply have to clone it inside your workspace's src directory.

cd <path_to_your_ros2_ws>/src
git clone https://github.com/leggedrobotics-usp/reference_signal_generator.git

Don't forget to also clone the required reference_signal_srvs package!

git clone https://github.com/leggedrobotics-usp/reference_signal_srvs.git

Then, use colcon to build.

cd <path_to_your_ros2_ws>
colcon build --symlink-install

🎈 Usage

Each instance of reference_signal_generator binds to a user-specified topic and creates multiple services for starting and stopping several different types of reference signals. Default topic name is /reference_signal and user can specify through command-line as follows:

ros2 run reference_signal_generator reference_signal_generator --ros-args -p topic_name:=<your_topic_name>

After starting the generator node, two services will be created to start and stop the reference signals. Use ros2 topic list to check them out. You must see:

  • /<your_topic_name>/start Used to parameterize and start the reference signal
  • /<your_topic_name>/stop Used to stop a signal created by a start before its total_time

See reference_signal_srvs for more details on each type of reference signal. Currently supported types are Step, Ramp, Sine, Square, Triangle, Sawtooth and Chirp.

🔋 Feature requests

Want another type of reference signal? Open an Enhancement issue describing it.

🤝 Contributing

  • Fork the repo
  • Check out a new branch based and name it to what you intend to do:
    • git checkout -b BRANCH_NAME
  • Commit your changes
    • Please provide a git message that explains what you've done;
    • Commit to the forked repository.
      git commit -m "A short and relevant message"
  • Push to the branch
    • git push origin BRANCH_NAME
  • Make a pull request!

✍️ Author


Victor T. N. 🤖

Made with ❤️ by @Vtn21