22#include <ignition/msgs.hh>
23#include <ignition/transport/Node.hh>
25#include "gazebo/common/Plugin.hh"
26#include "gazebo/msgs/msgs.hh"
28#include "gazebo/physics/World.hh"
30#include "gazebo/transport/Node.hh"
32#include <gazebo_ros/node.hpp>
33#include <rclcpp/rclcpp.hpp>
34#include <std_msgs/msg/int8.hpp>
47 gzmsg <<
"Loading ControllableLed plugin\n";
81 void LightCmd(
const std_msgs::msg::Int8::SharedPtr msg)
83 gzmsg <<
"Turning on light\n";
87 gzmsg <<
"Turning on light\n";
91 else if (msg->data == 0)
93 gzmsg <<
"Turning off light\n";
99 void Load(gazebo::physics::ModelPtr _parent, sdf::ElementPtr _sdf)
override
rclcpp::Subscription< std_msgs::msg::Int8 >::SharedPtr subscription_
void OnCommand(ConstIntPtr &_msg)
void LightCmd(const std_msgs::msg::Int8::SharedPtr msg)
gazebo_ros::Node::SharedPtr ros_node_
A pointer to the GazeboROS node.
void Load(gazebo::physics::ModelPtr _parent, sdf::ElementPtr _sdf) override
virtual bool TurnOffAll() final
Turn off all flash lights.
virtual bool TurnOnAll() final
Turn on all flash lights.
void Load(gazebo::physics::ModelPtr _parent, sdf::ElementPtr _sdf) override
A plugin that blinks light and visual elements in a model. In addition to the features of the base pl...