当前位置: 首页> 财经> 金融 > 营销策划的步骤有哪些_跨境电商软件erp排名_自助建站系统代理_黄冈网站seo

营销策划的步骤有哪些_跨境电商软件erp排名_自助建站系统代理_黄冈网站seo

时间:2025/7/10 2:51:50来源:https://blog.csdn.net/suoxd123/article/details/146215697 浏览次数:0次
营销策划的步骤有哪些_跨境电商软件erp排名_自助建站系统代理_黄冈网站seo

以GO1为例

1. CMakelists.txt更新语法

cmake_minimum_required(VERSION 3.8)
project(go1_description)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(gazebo_ros REQUIRED)
find_package(xacro REQUIRED)# 安装URDF和Xacro文件
install(DIRECTORYurdf/DESTINATION share/${PROJECT_NAME}/urdf
)# 安装启动文件
install(DIRECTORYlaunch/DESTINATION share/${PROJECT_NAME}/launch
)ament_package()

2. packge.xml更新语法

<?xml version="1.0"?>
<package format="3"><name>go1_description</name><version>0.0.0</version><description>The go1_description package</description><maintainer email="laikago@unitree.cc">unitree</maintainer><license>TODO</license><buildtool_depend>ament_cmake</buildtool_depend><depend>rclcpp</depend><depend>std_msgs</depend><depend>sensor_msgs</depend><depend>gazebo_ros</depend><depend>xacro</depend><test_depend>ament_lint_auto</test_depend><test_depend>ament_lint_common</test_depend><export><build_type>ament_cmake</build_type></export>
</package>

3. 新建launch文件

import os
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import Command, LaunchConfiguration, PathJoinSubstitution
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directorydef generate_launch_description():pkg_path = get_package_share_directory('go1_description')# 使用xacro命令生成URDFxacro_file = os.path.join(pkg_path, 'xacro', 'robot.xacro')robot_description = Command(['xacro ', xacro_file])# 启动Gazebogazebo = IncludeLaunchDescription(PythonLaunchDescriptionSource([os.path.join(get_package_share_directory('gazebo_ros'), 'launch', 'gazebo.launch.py')]))# 发布机器人状态robot_state_publisher_node = Node(package='robot_state_publisher',executable='robot_state_publisher',output='both',parameters=[{'robot_description': robot_description}])# 在Gazebo中生成实体spawn_entity = Node(package='gazebo_ros',executable='spawn_entity.py',arguments=['-topic', 'robot_description', '-entity', 'my_robot'],output='screen')return LaunchDescription([DeclareLaunchArgument('world',default_value='worlds/empty.world'),gazebo,robot_state_publisher_node,spawn_entity,])

4. colcon编译包

cd ~/suo/unitree_ros/robots/go1_description
colcon build --packages-select go1_description
source install/setup.bash

在这里插入图片描述

5. 启动仿真

ros2 launch go1_description spawn_robot.launch.py

在这里插入图片描述

6. 最终效果

在这里插入图片描述

关键字:营销策划的步骤有哪些_跨境电商软件erp排名_自助建站系统代理_黄冈网站seo

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: