How do I spawn an ArUcO marker on top of jackal

asked 2021-03-23 07:38:36 -0500

Saphira7544 gravatar image

I need to put an ArUcO marker on top of my jackal in gazebo so that my drone can track it. I already have an environment where both the jackal and the drone spawn on a world, but I don't know how to add the marker so that it is fixed on top of the jackal every time I run the simulator. I already have the marker on my models aswell.

My xacro for the jackal has the following

    <?xml version="1.0"?>
<!-- This URDF should be loaded into a ROS parameter using xacro, then loaded 
     into Gazebo using robot state publisher.
     Requires the arguments: $namespace, $id -->
<robot name="jackal" xmlns:xacro="">
  <xacro:property name="PI"                        value="3.1415926535897931" />
  <xacro:property name="wheelbase"                 value="0.262" />
  <xacro:property name="track"                     value="0.37559" />
  <xacro:property name="wheel_vertical_offset"     value="0.0345" />
  <xacro:property name="footprint_vertical_offset" value="-0.0655" />
  <xacro:property name="wheel_radius"              value="0.098" />
  <xacro:property name="wheel_width"               value="0.040" />
  <xacro:property name="chassis_length"            value="0.420" />
  <xacro:property name="chassis_width"             value="0.310" />
  <xacro:property name="chassis_height"            value="0.184" />
  <xacro:property name="dummy_inertia"             value="1e-09"/>
  <xacro:property name="mount_spacing"             value="0.120" />

  <material name="dark_grey"><color rgba=" 0.2 0.2 0.2 1.0" /></material>
  <material name="light_grey"><color rgba="0.4 0.4 0.4 1.0" /></material>
  <material name="yellow"><color rgba="0.8 0.8 0.0 1.0" /></material>
  <material name="black"><color rgba="0.15 0.15 0.15 1.0" /></material>

  <!-- The wheel template. -->
  <xacro:macro name="wheel" params="prefix *joint_pose">
    <link name="${prefix}_wheel_link">
        <origin xyz="0 0 0" rpy="${PI/2} 0 0"/>
          <mesh filename="package://multi_jackal_description/meshes/jackal-wheel.stl"/>
        <material name="black" />
        <origin xyz="0 0 0" rpy="${PI/2} 0 0"/>
          <cylinder radius="${wheel_radius}" length="${wheel_width}"/>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <mass value="0.477"/>
          ixx="0.0013" ixy="0" ixz="0"
          iyy="0.0024" iyz="0"
    <gazebo reference="${prefix}_wheel_link">
    <joint name="${prefix}_wheel" type="continuous">
      <parent link="chassis_link"/>
      <child link="${prefix}_wheel_link" />
      <xacro:insert_block name="joint_pose" />
      <axis xyz="0 1 0" />
    <!-- In reality, Jackal has only two motors, one per side. However, it's more
         straightforward for Gazebo to simulate as if there's an actuator per wheel. -->
    <transmission name="${prefix}_wheel_trans">
      <joint name="${prefix}_wheel">
      <actuator name="${prefix}_actuator">

  <!-- The joints and links. -->
  <xacro:wheel prefix="front_left">
    <origin xyz="${wheelbase ...
edit retag flag offensive close merge delete