Monojit Sarkar
Monojit Sarkar

Reputation: 727

No ROS topic between nodes in rqt_graph

I am a beginner in ROS, and I am working on a quadcopter project using ROS and Gazebo. To give you a bit of the background, here is what I did:

  1. I created a quadcopter CAD model in solidworks,
  2. Then I exported it as an urdf file to ROS and Gazebo.

Now my next task to move the quadcopter using python code. But when I type commands like rostopic, I don't see any valuable topic to control my quadcopter. I want the propellers to rotate so that the quadcopter can move.

For ease I have attached an image generated using rqt_graph, and it shows that there are no topics.

enter image description here

Upvotes: 0

Views: 457

Answers (1)

BTables
BTables

Reputation: 4843

Without seeing your URDF file it's hard to say what parts you're missing. That being said, you seem to imply that you've just exported a CAD model to URDF. A URDF is just a file to explain how different parts relate to each other, for it to be useable with ros and gazebo a plugin needs to be used to actually publish states and transforms. Make sure at the bottom of your URDF file you are loading the gazebo_ros_control plugin and transmission control. Something like this:

<!-- ROS Control plugin for Gazebo -->
  <gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
      <robotNamespace>/simple_model</robotNamespace>
    </plugin>
  </gazebo>

  <!-- transmission -->
  <transmission name="base_to_second_trans">
    <type>transmission_interface/SimpleTransmission</type>
    <actuator name="motor1">
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
    <joint name="base_to_second_joint">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
    </joint>
  </transmission>
</robot>

Upvotes: 0

Related Questions