Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

launch_srv

GitHub issues GitHub pull requests GitHub forks GitHub stars GitHub license


A ROS2 package for calling launch files from a ROS service

ROS version Branch
ROS2 ros2
ROS1 ros1

📝 Table of Contents

🧐 About

launch_srv is a ROS package that provides:

  • A service definition (Launch.srv) for calling launch files;
  • A service server (launch_server.py) that implements this call;
  • A launch file (foxglove.launch.py) that launches both the service server and foxglove_bridge.

🏁 Getting Started

This repo is a standard ROS2 package (ament_cmake).

🛠 Prerequisites

  • A ROS2 workspace (colcon)

  • Foxglove bridge

    • sudo apt install ros-<distro>-foxglove-bridge

💻 Installing

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

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

Then, use colcon to build.

cd <path_to_your_ros2_ws>
colcon build --symlink-install

🎈 Usage

Run the service server:

ros2 run launch_srv launch_server.py

Each service call will trigger the corresponding launch file on a separate process. Configure the inputs as follows:

  • package_name (string): the name of the package that contains the desired launch file;
  • launch_file (string): the launch file name (complete, with extension);
  • parameters (string): if necessary, input the parameter list;
  • terminate (boolean): set to false to start the launch process, or true to terminate it.

If you want to call the service using Foxglove Studio, use the included launch file instead:

ros2 launch launch_srv foxglove.launch.py

🔋 Feature requests

Want a new feature? Open an Enhancement issue describing it.

🤝 Contributing

  • Fork the repo
  • Check out a new branch (from the ros2 branch) 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

About

A ROS package (ROS1 + ROS2) for calling launch files from a ROS service

Resources

Code of conduct

Stars

0 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages