Skip to content
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

[NiceToHave] Create a simplified version of the simulation #4

Open
ipa-nhg opened this issue Apr 15, 2020 · 9 comments
Open

[NiceToHave] Create a simplified version of the simulation #4

ipa-nhg opened this issue Apr 15, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@ipa-nhg
Copy link
Member

ipa-nhg commented Apr 15, 2020

I tested the simulation and it works, great job @marioney 🎉🎉
The only problem I have is that the real time rate of gazebo is super slow (obviously the problem is my laptop, I usually use my workstation but these days I don't have access to it). Is it ok for you if I create a simplified version of the simulation? Probably just remove the controllers of the yumi will be ok.


Short test protocol:

Installation: https://github.com/rosin-project/metacontrol_sim/blob/1adaafb28d5a92acca70e175955c35e1204418f3/README.md#setup-using-wstool

Command: roslaunch metacontrol_sim ridgeback_yumi_world.launch gui:=true

Test:
Terminal A:

rostopic pub /ridgeback_velocity_controller/cmd_vel geometry_msgs/Twist "linear:
  x: 0.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 1.0" -r 10

Terminal B:
rostopic echo /ridgeback_velocity_controller/odom

The robot didn't move on gazebo but probably it is related to my computer...

@marioney
Copy link
Member

. Is it ok for you if I create a simplified version of the simulation?

if you use the command

roslaunch metacontrol_sim ridgeback_world.launch gui:=true

It will launch only the base without the YUMI altogether. So it may be easier for your laptop to handle it.

The robot didn't move on gazebo but probably it is related to my computer...

I've been using the /cmd_vel topic to control the robot, so I didn't realize that somehow the /ridgeback_velocity_controller/cmd_vel is ignored. I'll take a look a it

@chcorbato
Copy link
Member

chcorbato commented Apr 15, 2020

if you use the command

roslaunch metacontrol_sim ridgeback_world.launch gui:=true

It will launch only the base without the YUMI altogether. So it may be easier for your laptop to handle it.

I do not think that is the case (at least it did not work for me that way)
Is it s different roslaunch param name @marioney ?

@chcorbato chcorbato added the enhancement New feature or request label Apr 15, 2020
@chcorbato
Copy link
Member

I totally support this request to have a very simple simulation that can be run in any laptop.
Mine cannot handle this one.
Suggestions:

  • select to use simplified models as a param in the launch file
  • other robot model
    Whatever is easier/faster to implement.

@ipa-nhg
Copy link
Member Author

ipa-nhg commented Apr 16, 2020

if you use the command

roslaunch metacontrol_sim ridgeback_world.launch gui:=true

Thanks! This looks much better. But I think there are some issues with the robot controller ⬇️

--

I've been using the /cmd_vel topic to control the robot, so I didn't realize that somehow the /ridgeback_velocity_controller/cmd_vel is ignored. I'll take a look a it

I checked the /cmd_vel topic and for me it has an unknown message type. I took a look at the controller implementation and it seems for the base they use their own gazebo plugin ridgeback_ros_force_based_move and they just added a topic_relay to cmd_vel, but the plugin is already not working for me. I added the missed dependency to the ridgeback_gazebo package and installed all the required package from the release version, I tried also with the source version but so far without success.

--

I totally support this request to have a very simple simulation that can be run in any laptop.
Mine cannot handle this one.
Suggestions:

* select to use simplified models as a param in the launch file
* other robot model
 * Whatever is easier/faster to implement.

I suggest the use of a common gazebo plugin like the differential_drive_controller (I completely ignore the kinematics of the ridgeback, maybe there is a more adequate one ) where we could also ignore the physics and the contacts of the wheels. We mainly need the collision of the base and a reference link (commonly "base_link") to the center of the base. These simulations are not realistic (you are completely ignoring the friction with the ground) but I think for this experiment is completely fine and should work for any laptop and with a very easy installation setup.

@marioney
Copy link
Member

marioney commented Apr 16, 2020

I checked the /cmd_vel topic and for me it has an unknown message type

This is strange, because for me it's a Twist message, as any other /cmd_vel, this is the output of

$ rostopic info /cmd_vel 
Type: geometry_msgs/Twist

Publishers: None

Subscribers: 
 * /cmd_vel_relay (http://mario-laptop:44349/)
 * /gazebo (http://mario-laptop:35645/)

they use their own gazebo plugin ridgeback_ros_force_based_move

I think they use this plugin because the base is holonomic, so my guess is that they implemented this for that.

, I tried also with the source version but so far without
success.

This plugin is part of the ridgeback_gazebo_plugins, you can install it directly from debs (ros-melodic-ridgeback-gazebo-plugins) but if you want to check the source code, I think this is the official one.

I suggest the use of a common gazebo plugin like the differential_drive_controller (I completely ignore the kinematics of the ridgeback, maybe there is a more adequate one )

I can test the differential_drive_controller but I'll need to change the navigation configuration also.

@ipa-nhg
Copy link
Member Author

ipa-nhg commented Apr 20, 2020

@marioney thanks for your answer, I am pretty sure I have a problem of missed dependencies. The people usually forget to list in the package.xml all the dependencies related to the gazebo plugins. These types of errors are very hard to be found by the typical CI tests because don't produce compilation failures, even the common rostests don't check them.

I will give a last try to the simulation setup, in case I can't get it working on my laptop can I send you some instructions to execute our extractor script of your machine and send me back the resulted files?

@marioney
Copy link
Member

The people usually forget to list in the package.xml all the dependencies related to the gazebo plugins.

Totally agree, it can get really hectic with dependencies versions and so on.

can't get it working on my laptop can I send you some instructions to execute our extractor script of your machine and send me back the resulted files?

No problem with that. I hope you make it work, and of course I'm happy to execute the extractor if you still run into issues, just let me know!

@ipa-nhg
Copy link
Member Author

ipa-nhg commented Apr 20, 2020

ok, fixed. We were right, missed dependencies problem. I fixed it by:

sudo apt-get install ros-melodic-ridgeback-*

Thanks a lot! 👍

@chcorbato
Copy link
Member

ok, fixed. We were right, missed dependencies problem. I fixed it by:

sudo apt-get install ros-melodic-ridgeback-*

Thanks a lot!

Added dependency ros-melodic-ridgeback-gazebo in README.md 5f56076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants