ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question

Francesco_R's profile - activity

2022-04-10 09:22:27 -0500 received badge  Notable Question (source)
2022-04-10 09:22:27 -0500 received badge  Popular Question (source)
2022-04-07 03:34:16 -0500 commented question How to run rosparam_shortcut in noetic

thank you for your reply. Could you please give me some tips to install the package in noetic? I have tried sudo apt-get

2022-04-05 16:50:55 -0500 asked a question How to run rosparam_shortcut in noetic

How to run rosparam_shortcut in noetic Good morning. I would like to run hardware interface program for a 6 axis robot

2022-04-04 08:43:42 -0500 received badge  Enthusiast
2022-03-31 18:59:14 -0500 received badge  Popular Question (source)
2022-03-30 05:51:55 -0500 asked a question RoboWare for Ros Noetic

RoboWare for Ros Noetic Good morning. I'm trying to use the RoboWare IDE for ROS for noetic. After the installation I t

2022-01-26 13:37:00 -0500 marked best answer error urdf.xacro

Good morning everyone :)

I'm tryng to describe a robot geometry and visualisation with robot_base.urdf.xacro file.

In order to semplify the robot_description, I have made another file in the urdf directory called robot_essentials.xacro.

I would like to visualize this robot in rviz by the following:

$ source devel/setup.bash
$ roscd robot_description/urdf/
$ roslaunch urdf_tutorial display.launch model:=robot_base.urdf.xacro

In the terminal is shown this error:

unknown macro name: xacro:robot_wheel when processing file: robot_base.urdf.xacro RLException: Invalid tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', 'robot_base.urdf.xacro']] returned with code [2].

Param xml is The traceback for the exception was written to the log file

It seems that the .urdf.xacro is not able to get the macro written in robot_essentials.xacro file.

The files are structured as follow:

robot_base.urdf.xacro:

<?xml version="1.0"?>
    <robot xmlns:xacro="http://ros.org/wiki/xacro" name="robot_base" >
       <link name="base_link">
            <visual>
                <origin
                    xyz = "0 0 0"
                    rpy = "1.5707963267949 0 3.14" />
                <geometry>
                    <mesh filename="package://robot_description/meshes/robot_base.stl" />
                </geometry>
                <material
                    name = "">
                    <color 
                        rgba = "0.79216 0.81961 0.93333 1" />
                </material>
            </visual> 
        </link>

        <xacro:robot_wheel prefix="front_left" />
        <xacro:robot_wheel prefix="front_right" />
        <xacro:robot_wheel prefix="rear_left" />
        <xacro:robot_wheel prefix="rear_right" />

        <xacro:wheel_joint prefix="front_left" origin="0.220
0.250 0" />
        <xacro:wheel_joint prefix="front_right" origin="0.220
-0.250 0" />
        <xacro:wheel_joint prefix="rear_left" origin="-0.220
0.250 0" />
        <xacro:wheel_joint prefix="rear_left" origin="-0.220
-0.250 0" />



    </robot>

robot_essentials.xacro:

<?xml version="1.0"?>
    <robot xmlns:xacro="http://ros.org/wiki/xacro" name="robot_essentials" >
        <xacro:macro name="robot_wheel" params="prefix">

            <link name="${prefix}_wheel">
                <visual>
                    <origin
                        xyz = "0 0 0"
                        rpy = "1.5707963267949 0 0" />
                    <geometry>
                        <mesh filename="package://robot_description/meshes/wheel.stl" />
                    </geometry>
                    <material
                        name = "">
                        <color 
                            rgba = "0.79216 0.81961 0.93333 1" />
                    </material>
                </visual> 


            </link>
        </xacro:macro>

        <xacro:macro name="wheel_joint" params="prefix origin" >
            <joint name="${prefix}_wheel_joint" type="continuous" >
                <axis xyz="0 1 0" />
                <parent link = "base_link" />
                <child link = "${prefix}_wheel" />
                <origin rpy = "0 0 0" xyz = "${origin}" />
            </joint>
        </xacro:macro>

    </robot>

I have also tried to write in the robot_base.urdf.xacro the include line as follow:

<xacro:include filename="$(find robot_description)/urdf/robot_essentials.xacro" />

rviz is opening but it doesn't show the robot and the terminal shows this error:

[ERROR] [1643066398.619401933]: joint 'rear_left_wheel_joint' is not unique.
[robot_state_publisher-3] process has died [pid 7986, exit code 1, cmd /opt/ros/noetic/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/fra/.ros/log/24d11a22-7d6c-11ec-9a97-3b5cbcf2596a/robot_state_publisher-3.log].
log file: /home/fra/.ros/log/24d11a22-7d6c-11ec-9a97-3b5cbcf2596a/robot_state_publisher-3*.log
[ERROR] [1643066399.328275824]: joint 'rear_left_wheel_joint' is not unique.

Could someone tell me what I did wrong? Is is an issue of ... (more)

2022-01-26 05:39:31 -0500 received badge  Self-Learner (source)
2022-01-26 05:39:31 -0500 received badge  Teacher (source)
2022-01-26 05:37:49 -0500 received badge  Popular Question (source)
2022-01-26 04:57:12 -0500 edited question error urdf.xacro

error urdf.xacro Good morning everyone :) I'm tryng to describe a robot geometry and visualisation with robot_base.urdf

2022-01-26 04:53:51 -0500 answered a question error urdf.xacro

Good morning, I have figure it out what was the problem. The robot_essentials.xacro file is correct. This was useful fo

2022-01-26 04:53:51 -0500 received badge  Rapid Responder (source)
2022-01-25 02:26:50 -0500 received badge  Supporter (source)
2022-01-24 19:21:56 -0500 asked a question error urdf.xacro

error urdf.xacro Good morning everyone :) I'm tryng to describe a robot geometry and visualisation with robot_base.urdf