add new env_manager to project
This commit is contained in:
parent
fe94fc7bc2
commit
d32f44682d
6 changed files with 9 additions and 21 deletions
|
@ -1,9 +0,0 @@
|
|||
env_manager:
|
||||
ros__parameters:
|
||||
gz_enviroment:
|
||||
type: gz_enviroment/GzEnviroment
|
||||
|
||||
|
||||
gz_enviroment:
|
||||
ros__parameters:
|
||||
mesh_name: "monkey"
|
|
@ -8,11 +8,11 @@
|
|||
<license>Apache-2.0</license>
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
|
||||
<depend>env_interface</depend>
|
||||
<depend>env_manager_interfaces</depend>
|
||||
<depend>rclcpp</depend>
|
||||
<depend>rclcpp_lifecycle</depend>
|
||||
<depend>env_inteface</depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
|
|
@ -45,10 +45,10 @@ CallbackReturn GzEnviroment::on_configure(const rclcpp_lifecycle::State&)
|
|||
m_topic_name = std::string("/world/") + m_world_name + "/dynamic_pose/info";
|
||||
m_service_spawn = std::string("/world/") + m_world_name + "/create";
|
||||
|
||||
if (!doGzSpawn())
|
||||
{
|
||||
return CallbackReturn::ERROR;
|
||||
}
|
||||
// if (!doGzSpawn())
|
||||
// {
|
||||
// return CallbackReturn::ERROR;
|
||||
// }
|
||||
|
||||
return CallbackReturn::SUCCESS;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ CallbackReturn GzEnviroment::on_deactivate(const rclcpp_lifecycle::State&)
|
|||
void GzEnviroment::onGzPoseSub(const gz::msgs::Pose_V& pose_v)
|
||||
{
|
||||
// TODO: Read from config
|
||||
m_follow_frames = { "box1", "box2", "box3", "box4", "box5", "box6", "monkey" };
|
||||
m_follow_frames = { "box1", "box2", "box3", "box4", "box5", "box6"};
|
||||
for (const auto& it : pose_v.pose())
|
||||
{
|
||||
if (std::find(m_follow_frames.begin(), m_follow_frames.end(), it.name()) == m_follow_frames.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue