Home | Tutorials | Wiki | Issues
Ask Your Question
0

How do I control the robot without using ROS?

asked 2018-10-13 16:30:26 -0500

VansFannel gravatar image

updated 2018-10-14 03:16:56 -0500

I have added the model Pioneer 2DX to an empty world. This model comes with the plugin DiffDrive.

<plugin filename="libDiffDrivePlugin.so" name="diff_drive">
  <left_joint>left_wheel_hinge</left_joint>
  <right_joint>right_wheel_hinge</right_joint>
  <torque>5</torque>
</plugin>

Running gz topic -l I get the topic:

/gazebo/default/pioneer2dxCamera/vel_cmd

How do I control the robot without using ROS?

I'm getting crazy figuring out how to publish to topic vel_cmd to control this robot.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-10-14 21:50:06 -0500

littleghost gravatar image

You can use Gazebo Plugins, which can interact with Gazebo through Gazebo API. But the data communication way is very like ROS type.

edit flag offensive delete link more

Comments

Thanks. If I want to control the robot with arrow keys? How can I do it? Thanks.

VansFannel gravatar imageVansFannel ( 2018-10-15 02:13:27 -0500 )edit

If you use ROS, that will be quite easy. But if you don't want to use ROS, then you can check Gazebo API to see if there has keyboard related functions.

littleghost gravatar imagelittleghost ( 2018-10-15 03:00:11 -0500 )edit
1

You write a plugin like `KeyboardGUIPlugin` which publishes velocity commands. Here's a demo world: https://bitbucket.org/osrf/gazebo/src/f4e51e8f64001beda70615ab8982a7d5a4e65b18/worlds/simple_arm_teleop.world?at=default&fileviewer=file-view-default

chapulina gravatar imagechapulina ( 2018-10-15 14:39:12 -0500 )edit

This world is appropriate. In fact, there are many places where gazebo is very similar to ROS.

littleghost gravatar imagelittleghost ( 2018-10-16 02:12:15 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-13 16:30:26 -0500

Seen: 222 times

Last updated: Oct 14 '18