Skip to content

Commit

Permalink
Added current name of model to topic name
Browse files Browse the repository at this point in the history
  • Loading branch information
KiselevIlia committed Jun 12, 2023
1 parent def4f22 commit 045778e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gazebo_sensor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void CollisionPlugin::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf)
node = transport::NodePtr(new transport::Node());
node->Init("custom_plugin");

auto const name = "~/" + _sensor->Name() + "/collisions";
auto const name = "~/" + my_name_ + "/" + _sensor->Name() + "/collisions";

pub = node->Advertise<gazebo_custom_msgs::msgs::CollisionObject>(name, 1000);
gzmsg << "Topic name " << pub->GetTopic() << std::endl;
Expand Down

0 comments on commit 045778e

Please sign in to comment.