-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a teleop plugin that sends twist commands #186
Comments
I am tackling this on my branch: on the latest commit I added the buttons functionality TestingPlugin.mp4You can set the desire topic and change the module of the linear and angular velocities. For now it can only be controlled clicking on the buttons. So the next steps would be :
|
Looks good @LolaSegura ! A suggestion would be to add a stop button. Also, it would be nice to turn while driving forward/backward (for example, driving forward and turning left at the same time) |
Nice! Looking good!
+1, that would be very helpful! I believe that's why the robot steering plugin linked above uses sliders instead of buttons. But I think we can also achieve the same with buttons. For example, when the user presses "forward", we increment the forward velocity instead of setting it. So the more the user presses forward, the faster the robot goes. Then the same number of backward presses results in the robot slowing down until it stops. Pressing right while there's some forward velocity would make the robot go forward while rotating, etc. Another idea is to use unicode characters with arrows on the buttons instead of the words "Forward", etc. |
That's a great idea. Actually, Lola has implemented these buttons too:
+1000.
I think that approach is interesting, it is definitely good to mix forward/backward movement and clockwise rotation at the same time however I feel like probably it would be a bit confusing for the user. What about the following:
Alternative: Wdyt @chapulina ? I am ok with either option but I wanted to bring this option to the table too. You certainly have more insight about what could be more useful to the users than me 😄 |
(Sorry for the noise, I hit some key combination by mistake) |
+1 to having WASD+ keys. The advantage of keys over buttons is that the user can press more than one at the same time. So we could achieve the linear + angular combinations by combining keys instead of using new keys. For example, front + right would be
I'm ok with that. That's the approach in turtlebot_teleop, for example. Another idea that came to mind is to make just 4 buttons that are togglable. So the user could enable front and right at the same time. The advantage would be that:
If it's not too difficult, I think they'd be a nice addition. Similar to the idea above, they allow throttle + steer combinations while providing visual feedback of the current command.
Not sure about that 😉 In the end of the day, the best approach is to write something, then have someone else try to use it. In the end of the day, there's no ideal GUI control for 2D movement - that's why we have joysticks! 😄 |
I implemented this idea so now there are only 5 togglable buttons. 4 for direction and 1 for stopping the vehicle. So now for turning while moving forward you have to push both 'forward' and 'right' buttons for example.
I implemented this as well. So now the keys available for moving the vehicle are Here is a video showing the plugin with all I mentioned before. 122595556-09270000-d03f-11eb-8d2f-969c4e61b685.mp4The next steps to follow would be:
|
That looks great, @LolaSegura ! Feel free to open a PR once you're ready! The last recommendation I have is to use Material Design controls so the UI looks a bit more modern. I think that changing to these imports should do the trick:
See for example how the |
A GUI plugin that has arrow buttons and publishes twist messages to a custom topic to control robots would be nice to test vehicles easily.
Desired behavior
The user loads a world in
ign-gazebo
that has a vehicle in it, likeign gazebo diff_drive.sdf
.Then the user can insert the GUI twist teleop plugin, set the desired topic, and start sending commands by pressing buttons or keys, or with sliders.
Alternatives considered
The approach currently taken for teleop is using
KeyPublisher
+TriggeredPublisher
as described on the moving robot tutorial. This can be inconvenient because:TriggeredPublisher
at runtime yet (Insert system plugins from the GUI gz-sim#190), so it needs to be hardcoded in the SDF file.Implementation suggestion
The rqt_robot_steering plugin for ROS has vertical and horizontal sliders to control throttle and steering.
The text was updated successfully, but these errors were encountered: