Created
June 27, 2023 21:28
-
-
Save asymingt/1d833ac9857ecba36eb2fa523137a7ba to your computer and use it in GitHub Desktop.
Problem with static transforms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from ament_index_python.packages import get_package_share_directory | |
from launch import LaunchDescription | |
from launch_ros.actions import Node | |
def generate_launch_description(): | |
foxglove_bridge = Node( | |
name="foxglove_bridge", | |
package="foxglove_bridge", | |
executable="foxglove_bridge") | |
transforms = [ | |
Node( | |
package="tf2_ros", | |
executable="static_transform_publisher", | |
arguments=[ | |
"--x", "0", | |
"--y", "0", | |
"--z", "0", | |
"--yaw", "0", | |
"--pitch", "0", | |
"--roll", "0", | |
"--frame-id", "bar", | |
"--child-frame-id", "foo", | |
], | |
), | |
Node( | |
package="tf2_ros", | |
executable="static_transform_publisher", | |
arguments=[ | |
"--x", "0", | |
"--y", "0", | |
"--z", "0", | |
"--yaw", "0", | |
"--pitch", "0", | |
"--roll", "0", | |
"--frame-id", "baz", | |
"--child-frame-id", "bar", | |
], | |
), | |
Node( | |
package="tf2_ros", | |
executable="static_transform_publisher", | |
arguments=[ | |
"--x", "0.5", | |
"--y", "1.0", | |
"--z", "2.0", | |
"--yaw", "0", | |
"--pitch", "0", | |
"--roll", "0", | |
"--frame-id", "bar", | |
"--child-frame-id", "bar_child1", | |
], | |
), | |
Node( | |
package="tf2_ros", | |
executable="static_transform_publisher", | |
arguments=[ | |
"--x", "0", | |
"--y", "0", | |
"--z", "0", | |
"--yaw", "0", | |
"--pitch", "0", | |
"--roll", "0", | |
"--frame-id", "bar_child1", | |
"--child-frame-id", "bar_child1_grandchild", | |
], | |
), | |
Node( | |
package="tf2_ros", | |
executable="static_transform_publisher", | |
arguments=[ | |
"--x", "0.5", | |
"--y", "-1.0", | |
"--z", "2.0", | |
"--yaw", "0", | |
"--pitch", "0", | |
"--roll", "0", | |
"--frame-id", "bar", | |
"--child-frame-id", "bar_child2", | |
], | |
), | |
Node( | |
package="tf2_ros", | |
executable="static_transform_publisher", | |
arguments=[ | |
"--x", "0", | |
"--y", "0", | |
"--z", "0", | |
"--yaw", "0", | |
"--pitch", "0", | |
"--roll", "0", | |
"--frame-id", "bar_child2", | |
"--child-frame-id", "bar_child2_grandchild", | |
], | |
), | |
] | |
# Return everything | |
return LaunchDescription([foxglove_bridge] + transforms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment