uuvsimulator / uuv_simulator

Gazebo/ROS packages for underwater robotics simulation
https://uuvsimulator.github.io/
Other
676 stars 355 forks source link

Exemple for controlling the vehicle #384

Open TheGreatLebowski opened 4 years ago

TheGreatLebowski commented 4 years ago

Hello,

In the section Configuring the thruster manager of the tutorial, it is written at the end

To command the vehicle, you have to start the thruster manager and publish a ROS Wrench message to the input topic //thruster_manager/input with the wrench command to the vehicle.

Can you add an example ? And also I don't understand where I should put the command ...

Thank you for your help !

TheGreatLebowski commented 4 years ago

I've maybe found an example but he is not working :

rostopic pub /submarine/thrusters/0/thrust_wrench geometry/WrenchStamped "header:
seq: 0
stamp:
  secs: 0
  nsecs: 0
frame_id=''
wrench:
  force:
    x: value
    y: value
    z: value
  torque:
    x: value
    y: value
    z: value"

But this error appears :

/opt/melodic/lib/python2.7/dist-packages/rostopic/init.py:1782: TAMLLoad Warning: calling yaml.load() without Loader=... is deprecated, as the default to Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. pub_args.append(yaml.load(arg)) publishing and latching message.

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

A solution is available on this link, but doesn't work on my machine ...

Is my example wrong ? Or there is a bug ?

If not, apparently, you should specify the Loader argument into the load() function like this :

yaml.load(input, Loader=yaml.FullLoader) (More details are on the link)

EDIT :

You have to change the file where the error occurs, in my case I had to change the init.py file, I just converted the function yaml.load() by yaml.safe_load() and after it is possible to publish into the topic ROBOT_NAMESPACE>/thruster_manager/input but the submarine is still not moving ...

EmmaShou commented 4 years ago

I am also confused by the end of this tutorial, have you made any progress? Thanks!

TheGreatLebowski commented 4 years ago

Hello @EmmaShou, I've find a solution, you can check my project https://github.com/TheGreatLebowski/submarine, I've write a simple documentation (Still in progress) where I've put some of the problem I got ! If you don't find what is your problem send me a message, maybe I can help you !

EmmaShou commented 4 years ago

Hi Alexandre,

Thank you -- that's really helpful! Can I ask you another question? Have you been able to make your submarine either follow way-points or move according to a function? There are UUV simulator tutorials about this but I'm having a difficult time getting those tutorials to work.

Thanks a ton, Emma

On Mon, Nov 18, 2019 at 11:43 AM Alexandre Colon notifications@github.com wrote:

Hello @EmmaShou https://github.com/EmmaShou, I've find a solution, you can check my project https://github.com/TheGreatLebowski/submarine, I've write a simple documentation (Still in progress) where I've put some of the problem I got ! If you don't find what is your problem send me a message, maybe I can help you !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uuvsimulator/uuv_simulator/issues/384?email_source=notifications&email_token=AH3P6PR3JM7A3OE7MDQDUQLQUKZZTA5CNFSM4JGKDKSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEK32JA#issuecomment-555072804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3P6PXZMI6XHH6MO4BQOVLQUKZZTANCNFSM4JGKDKSA .

TheGreatLebowski commented 4 years ago

Hi Emma ! No I am currently working on it, when I will find a solution I will add it in my github project, but if you find something please let me know !

EmmaShou commented 4 years ago

Thanks Alexandre!

If I find a solution I will let you know. Please let me know if you make progress

On Wed, Nov 20, 2019 at 8:37 AM Alexandre Colon notifications@github.com wrote:

Hi Emma ! No I am currently working on it, when I will find a solution I will add it in my github project, but if you find something please let me know !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uuvsimulator/uuv_simulator/issues/384?email_source=notifications&email_token=AH3P6PRUVGL3ABCA6KNE2GTQUUVQHA5CNFSM4JGKDKSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEER2XVY#issuecomment-555985879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3P6PSHI7WBPT52BUNEMZTQUUVQHANCNFSM4JGKDKSA .

pxalcantara commented 4 years ago

@TheGreatLebowski Nice, could you, please create a PR with your new documentation? It would be very helpful to have your colaboration!

Thanks!