机器狗站不起来

把小车和宇树的go1机器狗模型导入到了一个gazebo界面,但是小车可以运动,控制机器狗站立时就仰过去了,这是怎么问题,应该怎么解决呀(单独运行时都没有问题,还可以控制其进行步态行走)。

这是写好的launch文件

<launch>
    <arg name="wname" default="earth"/>
    <arg name="rname" default="go1"/>
    <arg name="robot_path" value="(find $(arg rname)_description)"/>
    <arg name="dollar" value="$"/>

    <arg name="paused" default="true"/>
    <arg name="use_sim_time" default="true"/>
    <arg name="gui" default="true"/>
    <arg name="headless" default="false"/>
    <arg name="debug" default="false"/>
    <!-- Debug mode will hung up the robot, use "true" or "false" to switch it. -->
    <arg name="user_debug" default="false"/>
    
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find unitree_gazebo)/worlds/$(arg wname).world"/>
        <arg name="debug" value="$(arg debug)"/>
        <arg name="gui" value="$(arg gui)"/>
        <arg name="paused" value="$(arg paused)"/>
        <arg name="use_sim_time" value="$(arg use_sim_time)"/>
        <arg name="headless" value="$(arg headless)"/>
    </include>
    <arg name="gazebo_gui" default="true"/>
    <!-- By default, we do not start a database (it can be large)默认情况下不启动数据库 -->
    <arg name="db" default="false" />
    <!-- Allow user to specify database location 允许用户指定数据库位置-->
    <arg name="db_path" default="$(find moveit_config)/default_warehouse_mongo_db" />


  <!-- By default, we won't load or override the robot_description -->
  <arg name="load_robot_description" default="false"/>
  <arg name="use_gui" default="false" />
  
  

  <group ns="fourwheel1">
   <param name="robot_description" textfile ="$(find fourwheelnew)/urdf/2car.urdf" />

    <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" ></node>
    <!-- <param name="tf_prefix" value="fourwheel1" /> -->
    <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher" >
    <param name="publish_frequency" type="double" value="50.0" />
      </node>
    
    <!--在gazebo中生成一个名为fourwheel1的urdf文件,并放在指定位置。使用gazebo_ros包中的spawn_model节点的启动配置-->
    <node name="spawn_turtlebot_model" pkg="gazebo_ros" type="spawn_model"
             args="-urdf -model fourwheel1 -param robot_description -x -6.5  -y -2.5 -z 5 "/>

  </group>
  

  <!-- Run the main MoveIt! executable without trajectory execution (we do not have controllers configured by default) -->
  <!--<include file="$(find moveit_config)/launch/move_group.launch">
    <arg name="allow_trajectory_execution" value="true"/>
    <arg name="fake_execution" value="false"/>
    <arg name="info" value="true"/>
    <arg name="debug" value="false"/>
    <arg name="load_robot_description" value="$(arg load_robot_description)"/>
  </include>-->

  <!-- Run Rviz and load the default config to see the state of the move_group node -->


  <include file="$(find moveit_config)/launch/moveit_rviz.launch">
    <arg name="rviz_config" value="$(find moveit_config)/launch/moveit.rviz"/>
    <arg name="debug" value="$(arg debug)"/>
  </include>

  <!-- If database loading was enabled, start mongodb as well -->
  <include file="$(find moveit_config)/launch/default_warehouse_db.launch" if="$(arg db)">
    <arg name="moveit_warehouse_database_path" value="$(arg db_path)"/>
  </include>
  <include file="$(find moveit_config)/launch/follow_leader.launch" />

    <!-- Load the URDF into the ROS Parameter Server -->
    <param name="robot_description"
           command="$(find xacro)/xacro --inorder '$(arg dollar)$(arg robot_path)/xacro/robot.xacro' 
           DEBUG:=$(arg user_debug)"/>
    
  
                                


    <!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
    <!-- Set trunk and joint positions at startup 启动时设置主干和接头位置-->
    <node pkg="gazebo_ros" type="spawn_model" name="urdf_spawner" respawn="false" output="screen"
          args="-urdf -z 0.6 -model $(arg rname)_gazebo -param robot_description -unpause"/>

    <!-- Load joint controller configurations from YAML file to parameter server 加载联合控制器配置,并从YAML文件到参数服务器-->
    <rosparam file="$(arg dollar)$(arg robot_path)/config/robot_control.yaml" command="load"/>

    <!-- load the controllers -->
    <node pkg="controller_manager" type="spawner" name="controller_spawner" respawn="false"
          output="screen" ns="/$(arg rname)_gazebo" args="joint_state_controller
          FL_hip_controller FL_thigh_controller FL_calf_controller
          FR_hip_controller FR_thigh_controller FR_calf_controller
          RL_hip_controller RL_thigh_controller RL_calf_controller
          RR_hip_controller RR_thigh_controller RR_calf_controller "/>

    <!-- convert joint states to TF transforms for rviz, etc -->
    <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher2"
          respawn="false" output="screen">
        <remap from="/joint_states" to="/$(arg rname)_gazebo/joint_states"/>
    </node>

    <!-- <node pkg="unitree_gazebo" type="servo" name="servo" required="true" output="screen"/> -->

    <!-- load the parameter unitree_controller -->
    <include file="$(find unitree_controller)/launch/set_ctrl.launch">
        <arg name="rname" value="$(arg rname)"/>
    </include>

</launch>

屏幕录制 

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值