Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,42 @@
</plugin>
</include>

<model name="debug_viz">
<pose relative_to="blades_link">
0.0 0.0 0.0 0 0 -1.57
</pose>
<link name='debug_viz_link'>
<visual name="debug_viz">
<geometry>
<box>
<size>0.25 0.25 0.25</size>
</box>
</geometry>
<material>
<ambient>0 0 0 1</ambient>
<diffuse>0 0 0 1</diffuse>
<specular>0 0 0 0</specular>
<emissive>0 1 0 1</emissive>
</material>
</visual>
</link>
<plugin filename="ignition-gazebo-pose-publisher-system"
name="ignition::gazebo::systems::PosePublisher">
<publish_link_pose>false</publish_link_pose>
<publish_collision_pose>false</publish_collision_pose>
<publish_visual_pose>false</publish_visual_pose>
<publish_nested_model_pose>true</publish_nested_model_pose>
<publish_model_pose>true</publish_model_pose>
<use_pose_vector_msg>false</use_pose_vector_msg>
<static_publisher>false</static_publisher>
<update_frequency>10</update_frequency>
</plugin>
</model>
<joint name="debug_viz_joint" type="fixed">
<parent>blades_link</parent>
<child>debug_viz::debug_viz_link</child>
</joint>

<joint name="gps_joint" type="fixed">
<parent>motor_link</parent>
<child>gps</child>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def pose_static(model_name):
ign_type='ignition.msgs.Pose_V',
ros_type='tf2_msgs/msg/TFMessage',
direction=BridgeDirection.IGN_TO_ROS)


def cmd_vel(model_name):
return Bridge(
Expand Down
37 changes: 23 additions & 14 deletions as2_simulation_assets/as2_ign_gazebo_assets/src/ign_assets/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
import codecs
import os
import subprocess
import json
from abc import ABC, abstractmethod

from ament_index_python.packages import get_package_share_directory

from launch_ros.actions import Node
from ign_assets.bridge import Bridge, BridgeDirection

import ign_assets.bridges

import yaml
import json


UAVS = [
Expand Down Expand Up @@ -429,8 +430,16 @@ def bridges(self, world_name):
# ign_assets.bridges.pose(self.model_name),
# pose static
# ign_assets.bridges.pose_static(self.model_name),

]
# TODO: temporal
if self.model_type == 'windmill':
bridges.append(
Bridge(ign_topic='/model/windmill_0/model/debug_viz/pose',
ros_topic='debug/pose',
ign_type='ignition.msgs.Pose',
ros_type='geometry_msgs/msg/PoseStamped',
direction=BridgeDirection.IGN_TO_ROS)
)
nodes = []
if (self.model_type in gps_object_models()):
nodes = [Node(
Expand All @@ -456,18 +465,18 @@ def bridges(self, world_name):
]
)]
nodes.extend([Node(
package='as2_ign_gazebo_assets',
executable='object_tf_broadcaster',
namespace=self.model_name,
output='screen',
parameters=[
{
'world_frame': 'earth',
'namespace': self.model_name,
'world_name': world_name,
}
]
)])
package='as2_ign_gazebo_assets',
executable='object_tf_broadcaster',
namespace=self.model_name,
output='screen',
parameters=[
{
'world_frame': 'earth',
'namespace': self.model_name,
'world_name': world_name,
}
]
)])
bridges.extend(self.joint_bridges())

return bridges, nodes
Expand Down