Skip to content

Commit

Permalink
fixed clock | added camera
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Dec 5, 2023
1 parent e3b4ce0 commit 4a3db5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 32 deletions.
3 changes: 2 additions & 1 deletion rosbot_description/urdf/rosbot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
parent_link="camera_link"
xyz="0.0 0.0 0.0"
rpy="0.0 0.0 0.0"
namespace="$(arg namespace)"
simulation_engine="$(arg simulation_engine)" />
</xacro:unless>

</robot>
9 changes: 5 additions & 4 deletions rosbot_gazebo/config/gz_remappings.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- topic_name: "/clock"
ros_type_name: "rosgraph_msgs/msg/Clock"
gz_type_name: "ignition.msgs.Clock"
direction: GZ_TO_ROS

- topic_name: "<robot_namespace>/scan"
ros_type_name: "sensor_msgs/msg/LaserScan"
gz_type_name: "ignition.msgs.LaserScan"
Expand All @@ -18,10 +23,6 @@
ros_type_name: "sensor_msgs/msg/PointCloud2"
gz_type_name: "ignition.msgs.PointCloudPacked"

- topic_name: "<robot_namespace>/clock"
ros_type_name: "rosgraph_msgs/msg/Clock"
gz_type_name: "ignition.msgs.Clock"

- topic_name: "<robot_namespace>/range/fl"
ros_type_name: "sensor_msgs/msg/LaserScan"
gz_type_name: "ignition.msgs.LaserScan"
Expand Down
27 changes: 0 additions & 27 deletions rosbot_gazebo/launch/spawn.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,32 +133,6 @@ def generate_launch_description():
}.items(),
)

# The frame of the pointcloud from ignition gazebo 6 isn't provided by <frame_id>.
# See https://github.com/gazebosim/gz-sensors/issues/239
depth_cam_frame_fixer = Node(
package="tf2_ros",
executable="static_transform_publisher",
name="depth_to_camera",
output="log",
arguments=[
"0.0",
"0.0",
"0.0",
"1.57",
"-1.57",
"0.0",
"camera_depth_optical_frame",
LaunchConfiguration(
"gazebo_frame", default=[robot_name, "/base_link/camera_orbbec_astra_camera"]
),
],
remappings=[
("/tf", "tf"),
("/tf_static", "tf_static"),
],
namespace=namespace,
)

return LaunchDescription(
[
declare_namespace_arg,
Expand All @@ -171,6 +145,5 @@ def generate_launch_description():
ign_bridge,
gz_spawn_entity,
bringup_launch,
depth_cam_frame_fixer,
]
)

0 comments on commit 4a3db5c

Please sign in to comment.