gazebo(fortress) set the path of sdf file
2024-01-10 06:06:30
This method only satisfied with gazebo "fortress" ;not harmenic
<launch>
<set_env name="GZ_SIM_RESOURCE_PATH" value="$(find-pkg-share gazebo_pkg)/etc/"/>
<group>
<let name="robot_description" value="$(command 'xacro $(find-pkg-share gazebo_pkg)/urdf/total.xacro')"/>
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen" args="-d $(find-pkg-share gazebo_pkg)/etc/empty1.rviz"/>
<!--rviz2 need this node below-->
<node pkg="robot_state_publisher" exec="robot_state_publisher" name="robot_state_publisher">
<param name="robot_description" value="$(var robot_description)"/>
</node>
<node name="joint_state_publisher" exec="joint_state_publisher" pkg="joint_state_publisher"/>
<include file="$(find-pkg-share ros_gz_sim)/launch/gz_sim.launch.py">
<arg name="ign_args" value="/home/actorsun/test.sdf"/>
</include>
<node pkg="ros_gz_sim" exec="create" args="-world default -topic /robot_description">
</node>
<node pkg="ros_gz_bridge" exec="parameter_bridge" name="bridge1" args="/turtle1/cmd_vel@geometry_msgs/msg/Twist@ignition.msgs.Twist">
</node><!--there must not be a '/' in upper line eg:/turtle1/cmd_vel is wrong-->
<node pkg="ros_gz_bridge" exec="parameter_bridge" name="bridge2" args="/radar_sensor100@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan"/>
</group>
</launch>
my english is very good!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
文章来源:https://blog.csdn.net/geniusChinaHN/article/details/135493140
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!