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

How to write urdf for Ackwermann Steering system, How should i join the links in steering assembly??

asked 2020-03-03 19:48:02 -0500

Hemanth_47_ gravatar image

i am trying to get urdf from solidworks, when i import the urdf in gazebo, all the parts are scattered!!!! i used SWto urdf plugin, please help me to get proper urdf for Ackermann steering system.

edit retag flag offensive close merge delete


Have you tried this tutorial?

Besides, why not implement your own URDF description with Xacro?

Weasfas gravatar image Weasfas  ( 2020-03-04 04:40:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-22 19:16:54 -0500

CoachAllen gravatar image

While I dont know much about SolidWorks I will try help.

You should have a tag known as a link (check for something like this in the exported file)

<!-- Base Link -->
  <link name="base_link">
        <box size="1.91 0.680618 1.065022"/>
      <material name="blue"/>
        <box size="1.91 0.680618 1.065022"/>
      <mass value="20.3"/>
      <inertia ixx="1.5" ixy="0.0" ixz="0.0" iyy="1.5" iyz="0.0" izz="1.5"/>

You will need to have links much like this for each of the components on your robot i.e body, wheels, etc...

Next you will joints. The purpose of the joints tag is to describe how the components tie to each other. Look for something in your exported file:

<joint name="left_steering_joint" type="revolute">
    <parent link="base_link"/>
    <child link="left_steering_link"/>
    <axis xyz="0.0 0.0 0.1"/>
    <origin rpy="0.0 0.0 0.0" xyz="0.855 0.372059 -0.432511"/>
    <limit effort="100.00" lower="-0.30" upper="0.30" velocity="100.00"/>

When trying to use gazebo there is added complexity. You need transmissions. They are to be included in your urdf file. You may not have those automatically with the SolidWorks plugin. They should look something like this.

<transmission name="left_steering_link_trans">
    <joint name="left_steering_joint">
    <actuator name="left_steering_link_motor">

You will also need a yaml file to try and controll these joints.

The yaml file might look something like this:

  type: joint_state_controller/JointStateController
  publish_rate: 50

  left_steering_link: left_steering_link
  right_steering_link: right_steering_link

  front_left_wheel: front_left_wheel
  front_right_wheel: front_right_wheel

  rear_left_wheel: rear_left_wheel
  rear_right_wheel: rear_right_wheel

And finally you will to implement all of this in a launch file:

<?xml version="1.0"?>

    <arg name="namespace" default="/ursa_bot" />
    <arg name="world_name" default="worlds/empty_world" />
    <arg name="cmd_timeout" default="0.5"/>
    <arg name="x" default="0.0"/>
    <arg name="y" default="0.0"/>
    <arg name="z" default="1.0" />
    <arg name="roll" default="0.0"/>
    <arg name="pitch" default="0.0"/>
    <arg name="yaw" default="0.0"/>

    <group ns="$(arg namespace)">

        <include file="$(find gazebo_ros)/launch/empty_world.launch">
            <arg name="world_name" default="$(arg world_name)"/>

        <rosparam file="$(find ursa_bot_ctrl)/config/joint_states.yaml" command="load" ns="/ursa_bot" />
        <rosparam file="$(find ursa_bot_ctrl)/config/mobile_base.yaml" command="load" ns="/ursa_bot" />
        <rosparam file="$(find ursa_bot_ctrl)/config/ursa_bot_gazebo.yaml" command="load" ns="/ursa_bot" />
        <rosparam file="$(find ursa_bot_ctrl)/config/pids.yaml" command="load" ns="/ursa_bot" />

        <!-- Loading the Ursa Bot into Gazebo -->
        <param name="robot_description" command="$(find xacro)/xacro $(find ursa_bot_description)/urdf/ursa_bot_basic.urdf.xacro"/>
        <node name="spawn_vehicle" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model ursa_bot
                -gazebo_namespace /$(arg namespace ...
edit flag offensive delete link more

Question Tools



Asked: 2020-03-03 19:48:02 -0500

Seen: 897 times

Last updated: Mar 22 '20