重新定义全局符号:创建启动文件时出现 pi 错误
redefining global symbol: pi error while ceating a launch file
创建了一个启动文件,我的机器人应该在其中打开凉亭世界,当我尝试使用 roslaunch 运行 启动文件时,出现以下错误
redefining global symbol: pi
when processing file: /home/akash/project/src/techman_robot_ros-master/tm_grasp_description/urdf/tm700.urdf.xacro
included from: /home/akash/project/src/techman_robot_ros-master/tm_grasp_description/urdf/tm700_robot.urdf.xacro
xacro.py is deprecated; please use xacro instead
started roslaunch server http://akash:37109/
我仍然可以看到我的凉亭世界,但看不到导入的机器人。
这是启动文件
<launch>
<arg name="eih" default="false" />
<arg name="limited" default="false"/>
<group unless="$(arg eih)">
<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot.urdf.xacro'" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot_joint_limited.urdf.xacro'" />
</group>
<group if="$(arg eih)">
<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot_eih.urdf.xacro'" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot_joint_limited_eih.urdf.xacro'" />
</group>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="world_name"
value="$(find tm700_moveit_config)/launch/gg.world"/>
</include>
</launch>
由于 ROS Jade Xacro internally uses functions and constants from Python math
module such as pi
when converting a Xacro to a URDF robot description. It seems like tm700.urdf.xacro
(以及包中的其他几个 Xacro 文件)出于某种原因在第 8
行中定义了 pi
<property name="pi" value="3.14159265" />
这与数学模块中的现有定义冲突。因此,您的机器人描述生成失败。 从 Xacro-files 中删除 pi
的所有定义,然后它应该可以工作。
创建了一个启动文件,我的机器人应该在其中打开凉亭世界,当我尝试使用 roslaunch 运行 启动文件时,出现以下错误
redefining global symbol: pi
when processing file: /home/akash/project/src/techman_robot_ros-master/tm_grasp_description/urdf/tm700.urdf.xacro
included from: /home/akash/project/src/techman_robot_ros-master/tm_grasp_description/urdf/tm700_robot.urdf.xacro
xacro.py is deprecated; please use xacro instead
started roslaunch server http://akash:37109/
我仍然可以看到我的凉亭世界,但看不到导入的机器人。
这是启动文件
<launch>
<arg name="eih" default="false" />
<arg name="limited" default="false"/>
<group unless="$(arg eih)">
<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot.urdf.xacro'" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot_joint_limited.urdf.xacro'" />
</group>
<group if="$(arg eih)">
<param unless="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot_eih.urdf.xacro'" />
<param if="$(arg limited)" name="robot_description" command="$(find xacro)/xacro.py '$(find tm_grasp_description)/urdf/tm700_robot_joint_limited_eih.urdf.xacro'" />
</group>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="paused" value="false"/>
<arg name="use_sim_time" value="true"/>
<arg name="gui" value="true"/>
<arg name="headless" value="false"/>
<arg name="debug" value="false"/>
<arg name="world_name"
value="$(find tm700_moveit_config)/launch/gg.world"/>
</include>
</launch>
由于 ROS Jade Xacro internally uses functions and constants from Python math
module such as pi
when converting a Xacro to a URDF robot description. It seems like tm700.urdf.xacro
(以及包中的其他几个 Xacro 文件)出于某种原因在第 8
pi
<property name="pi" value="3.14159265" />
这与数学模块中的现有定义冲突。因此,您的机器人描述生成失败。 从 Xacro-files 中删除 pi
的所有定义,然后它应该可以工作。