Ask Your Question
0

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

Comments

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
1

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">
    <visual>
      <geometry>
        <box size="1.91 0.680618 1.065022"/>
      </geometry>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <box size="1.91 0.680618 1.065022"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="20.3"/>
      <inertia ixx="1.5" ixy="0.0" ixz="0.0" iyy="1.5" iyz="0.0" izz="1.5"/>
    </inertial>
  </link>

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"/>
  </joint>

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">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="left_steering_joint">
      <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
    </joint>
    <actuator name="left_steering_link_motor">
      <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

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

The yaml file might look something like this:

joint_state_controller:
  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"?>
<launch>

    <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)"/>
        </include>



        <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 ...
(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 454 times

Last updated: Mar 22 '20