how to make my model walk on rviz?

asked 2019-11-12 17:25:28 -0600

panches gravatar image

updated 2019-11-13 10:21:53 -0600

Hi, I am new to ROS and Rviz and I am trying to make a humanoid model using urdf that can walk on rviz changing joint angles. Before coding, I wanted to make the model walk setting manually the angles on Rviz and doing so I realized that my base is wrong. To walk I imagine that I have to set my base in a imaginary ground, where I can stay standing using only one foot, so that the other can change the place its foot is standing, but What is happening is very different than that. Can you guys help me on this? Below I have my urdf file where the base is the link called human/foot.

EDIT: When I said that my model base is wrong, I am actually not sure about it. My question here is How can I create a floor for my model to interact and walk on it? How can my model walk changing only the joint angles? Because, at the moment, he is moving his legs, but he is staying on the same place.

<?xml version="1.0" ?>
<robot name="human_model" xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
  <link name="human/pelvis">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 -0.0405569060538"/>
      <geometry>
    <cylinder length="-0.0811138121076" radius="0.130553532998"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 -0.0405569060538"/>
      <geometry>
    <cylinder length="-0.0811138121076" radius="0.130553532998"/>
      </geometry>
    </visual>
  </link>
  <link name="human/spine_0">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.0363124478192"/>
      <geometry>
    <cylinder length="0.0726248956383" radius="0.141172520845"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.0363124478192"/>
      <geometry>
    <cylinder length="0.0726248956383" radius="0.141172520845"/>
      </geometry>
    </visual>
  </link>
  <link name="human/spine">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.137944030927"/>
      <geometry>
    <cylinder length="0.275888061853" radius="0.161172520845"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.137944030927"/>
      <geometry>
    <cylinder length="0.275888061853" radius="0.161172520845"/>
      </geometry>
    </visual>
  </link>
  <link name="human/shoulder_center">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.050635057485"/>
      <geometry>
    <cylinder length="0.10127011497" radius="0.181172520845"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.050635057485"/>
      <geometry>
    <cylinder length="0.10127011497" radius="0.181172520845"/>
      </geometry>
    </visual>
  </link>
  <link name="human/neck">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.102139711472"/>
      <geometry>
    <cylinder length="0.204279422944" radius="0.04"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.102139711472"/>
      <geometry>
    <cylinder length="0.204279422944" radius="0.04"/>
      </geometry>
    </visual>
  </link>
  <link name="human/head">

    <collision>
      <origin rpy="0 0 0" xyz="0 0 ...
(more)
edit retag flag offensive close merge delete

Comments

Two observations/comments:

  1. you don't explain what the actual problem is: you show a urdf and say "I realised my base is wrong". That will not be sufficient for others to help you
  2. there is no concept of a "ground" in RViz. So there is also no concept of "one foot on the ground, [..] standing". There are only 3D objects floating in space. If it happens that your model and the rectangle beneath it align, it would appear it is "on the ground", but in reality there is nothing there.
gvdhoorn gravatar imagegvdhoorn ( 2019-11-13 01:19:26 -0600 )edit

you are correct, I edited my question, I hope it is clearer now.

panches gravatar imagepanches ( 2019-11-13 10:22:54 -0600 )edit