赞
踩
xxx.launch.py文件中
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
tf2_earth2map = Node(
package='tf2_ros',
executable='static_transform_publisher',
arguments = ['0', '0', '0', '0', '0', '0', 'earth', 'map']
)
return LaunchDescription([
tf2_earth2map,
])
命令行方式:
ros2 run tf2_ros static_transform_publisher x y z yaw pitch roll frame_id child_frame_id
ros2 run tf2_ros static_transform_publisher x y z qx qy qz qw frame_id child_frame_id
ros2 run tf2_tools view_frames.py
运行该命令后生成tf变换树的PDF文件。
sudo apt install ros-dashing-ros1-bridge
source /opt/ros/noetic/setup.bash
source /opt/ros/foxy/setup.bash
ros2 run ros1_bridge dynamic_bridge --bridge-all-topics
在~/.bashrc文件末尾输入
#source /opt/ros/noetic/setup.bash
echo "ros noetic(1) or ros2 foxy(2)?"
read edition
if [ "$edition" -eq "1" ]; then
source /opt/ros/noetic/setup.bash
echo "ros noetic(1) has been chosen!"
else
source /opt/ros/foxy/setup.bash
echo "ros2 foxy(2) has been chosen!"
fi
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。