ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

redefining global symbol: pi when processing file

asked 2021-07-14 05:08:34 -0500

akash12124234 gravatar image

updated 2021-07-14 06:24:21 -0500

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro%22">xmlns:xacro="http://www.ros.org/wiki/...></robot>

  <!-- transmission -->
  <xacro:include filename="$(find tm_grasp_description)/urdf/tm.transmission.xacro" />

  <!-- Mass parameters -->
  <xacro:property name="pi" value="3.14159265" />

  <xacro:property name="base_mass" value="1.0" />
  <xacro:property name="shoulder_mass" value="4.5" />
  <xacro:property name="arm_1_mass" value="10.5" />
  <xacro:property name="arm_2_mass" value="2.1" />
  <xacro:property name="wrist_1_mass" value="1.45" />
  <xacro:property name="wrist_2_mass" value="1.45" />
  <xacro:property name="wrist_3_mass" value="0.4" />

  <!-- Kinematic model -->
  <!-- Properties from tmcontrol.conf -->
  <!--
    DH for TM700:
    a = [0.00000, 0.329, 0.3115,  0.00000,  0.00000,  0.0000]
    d = [0.1451,  0.00000,  0.00000,  -0.1222,  0.106,  0.1144]
    alpha = [ -1.570796327, 0, 0, 1.570796327, 1.570796327, 0 ]
    q_home_offset = [0, -1.570796327, 0, 1.570796327, 0, 0]
    joint_direction = [-1, -1, 1, -1, 1, 1]
    mass = [4.5, 10.5, 2.1, 1.45, 1.45, 0.4]
    center_of_mass = [ [0, -0.02561, 0.00193], [0.2125, 0, 0.11336], [0.11993, 0.0, 0.0265], [0, -0.0018, 0.01634], [0, 0.0018,0.01634], [0, 0, -0.001159] ](tm700)
  -->
  <xacro:property name="tm_d1" value="0.1451" />
  <xacro:property name="tm_a2" value="0.3290" />
  <xacro:property name="tm_a3" value="0.3115" />
  <xacro:property name="tm_d4" value="0.1222" />
  <xacro:property name="tm_d5" value="0.1060" />
  <xacro:property name="tm_d6" value="0.1144" />

  <!-- offsets for shoulder/elbow joints -->
  <xacro:property name="shoulder_offset" value="-0.146" />  <!-- measured from model -->
  <xacro:property name="elbow_offset" value="0.1298" /> <!-- measured from model -->       
  <xacro:property name="wrist_offset" value="${-tm_d4 - elbow_offset - shoulder_offset}" />

  <!-- link lengths used in model -->
  <xacro:property name="shoulder_height" value="${tm_d1}" />
  <xacro:property name="arm_1_length" value="${tm_a2}" />
  <xacro:property name="arm_2_length" value="${tm_a3}" />
  <xacro:property name="wrist_1_length" value="tm_d5}" />
  <xacro:property name="wrist_2_length" value="${tm_d5}" />
  <xacro:property name="wrist_3_length" value="0.0565" />
  <xacro:property name="ee_length" value="${tm_d6 - wrist_3_length}" />

  <xacro:macro name="cylinder_inertial" params="radius length mass *origin">
    <inertial>
      <mass value="${mass}" />
      <xacro:insert_block name="origin" />
      <inertia ixx="${0.0833333 * mass * (3 * radius * radius + length * length)}" ixy="0.0" ixz="0.0"
        iyy="${0.0833333 * mass * (3 * radius * radius + length * length)}" iyz="0.0"
        izz="${0.5 * mass * radius * radius}" />
    </inertial>
  </xacro:macro>

  <xacro:macro name="tm700_robot" params="prefix joint_limited">

    <!-- transmission prefix -->
    <xacro:tm_arm_transmission prefix="${prefix}" />

    <link name="${prefix}base_link" >
      <visual>
        <geometry>
      <mesh filename="package://tm_grasp_description/meshes/tm700/visual/Base.STL" />
        </geometry>
        <material name="Grey">
          <color rgba="0.5 0.5 0.5 1.0"/>
        </material>
      </visual>
      <collision>
        <geometry>
      <mesh filename="package://tm_grasp_description/meshes/tm700/collision/base.STL" />
        </geometry>
      </collision>

      <xacro:cylinder_inertial radius="0.06" length ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please! edit this question and change file names. For example which xacro code has which file name.

Thanks

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-07-14 06:05:50 -0500 )edit

i have specified the file name .the code at the top file name is tm700.urdf.xacro and the code below file name is hrwros.xacro

akash12124234 gravatar image akash12124234  ( 2021-07-14 06:23:17 -0500 )edit

The message you quote is not an error. It's a warning afaik.

You seem to have noticed that yourself as well from what I can tell from #q382448.

If your question is really about something else, please update the title of your question so it better reflects what it's about.

gvdhoorn gravatar image gvdhoorn  ( 2021-07-14 07:18:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-07-14 05:46:28 -0500

Ranjit Kathiriya gravatar image

updated 2021-07-14 05:55:08 -0500

Hello @aakash,

Can you please have a look at this code:

Line number 35-37

i was trying to add the robot to the xacro file

the code below this : / tm.transmission.xacro

<xacro:logical_camera_urdf prefix="logical_camera1_" logi

cal_camera_parent="world_interface">

Can you please! remove the extra space over here and make this to :

<xacro:logical_camera_urdf prefix="logical_camera1_" logical_camera_parent="world_interface">
edit flag offensive delete link more

Comments

i tried but it showing the same error and even I tried deleting the camera part but same

akash12124234 gravatar image akash12124234  ( 2021-07-14 06:01:31 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-07-14 05:08:34 -0500

Seen: 186 times

Last updated: Jul 14 '21