osrf / vrx

Virtual RobotX (VRX) resources.
Apache License 2.0
428 stars 193 forks source link

Access to the thrust_angle topic and more #125

Closed osrf-migration closed 5 years ago

osrf-migration commented 5 years ago

Original report (archived issue) by Matthieu Parent (Bitbucket: Matthieu Parent).


Hi,

I am currently running through the tutorial and I am stuck. I respect every steps and I cannot access to the thurst_angle topic concerning the angle of the propellers. Do I miss something ?

Quote from the tutorials/examples section : << After launch, all examples given below should begin with the wamv floating on the water near the shore, as shown >> -----> my boat is always in the middle of nowhere in water… and it is just drifting.

Not a single example is working in the end. Maybe I am wrong I do not know…

In the installation tutorial it is told that we have 2 options : installing the full-package or build it from source. I had to do both, I do not understand why there are two options then.

I am a real beginner on ROS and I have already made some tutorials but it is quite hard right now.

Thank you for your time,

MatthieuPar

osrf-migration commented 5 years ago

Original comment by Matthieu Parent (Bitbucket: Matthieu Parent).


osrf-migration commented 5 years ago

Original comment by Brian Bingham (Bitbucket: brian_bingham).


Matthieu,

I would recommend building from source. We are preparing for a new release, so there are a number of changes/features that are not yet in the package repositories.

Are you able to run the first tutorial - https://osrf-migration.github.io/vrx-gh-pages/#!/osrf/vrx/wiki/tutorials/Sand_Island_Basic ?

If that isn’t working for you, perhaps try the command…

roslaunch vrx_gazebo sandisland.launch verbose:=true

and post the output.

osrf-migration commented 5 years ago

Original comment by Matthieu Parent (Bitbucket: Matthieu Parent).


Hi Brian,

I know have the thrust angle, I didn’t change anything, except reinstalling everything. Please note that building it from source is not working either because some packages are missing, the catkin_make doesn’t work. But after in install your pre-built package the command catkin_make returns no error.

Thank you for your time. Well I can run this tutorials but I don’t know what should be the output. When I run the command line you gave me I have a boat in gazebo which is drifting forever. Concerning the environment I have what you can see on the picture. When I follow the first tutorial I have the same output.

I don’t understand the purpose of all these tutorials to be honest. Are they here to provide us the environment of each tasks ?
Maybe I’m becoming mad because I don’t know what the output should be.

I kept running the tutorials, I am currently on the : [https://osrf-migration.github.io/vrx-gh-pages/#!/osrf/vrx/wiki/tutorials/Creating](https://osrf-migration.github.io/vrx-gh-pages/#!/osrf/vrx/wiki/tutorials/Creating) a custom WAM-V Thruster and Sensor Configuration For Competition

We have only 3 cameras allowed at the maximum and the Example Yaml Sensor Configuration File is providing 4 cameras. Is that normal ? I deleted one and that works fine.

I kept running the tutorials, I am currently on the : https://osrf-migration.github.io/vrx-gh-pages/#!/osrf/vrx/wiki/tutorials/AddingSensors

I tried to add sensors but the only config of the boat i get is only with the 2 motors. What is weird is that when I open the xacro file I have the whole configuration, including the two cameras i try to add.

EDIT : I find what may be the problem, in the my_wamv.urdf that is generated by the following command there is no lines concerning any sensors like you can find in the Creating a custom WAM-V Thruster and Sensor Configuration For Competition tutorial. I think come from this, but I don’t know how to generate the custom urdf file properly.

 rosrun xacro xacro --inorder my_wamv.urdf.xacro > my_wamv.urdf

MatthieuPar

osrf-migration commented 5 years ago

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


osrf-migration commented 5 years ago

Original comment by Brian Bingham (Bitbucket: brian_bingham).


Matthieu,

There are a few items/issues you discuss, so I’ll try to pull them apart…

  1. Installing from source. If you follow the instructions here https://osrf-migration.github.io/vrx-gh-pages/#!/osrf/vrx/wiki/tutorials/SystemSetupInstall
    Does catkin_make fail? If so, could you post the output?
  2. I added a sentence to try and describe the purpose of the first set of tutorials: “Example Environments: These tutorials illustrate bringing up example environments within Gazebo as a starting point for development.”
  3. For the sensor configuration, for the VRX competition the configuration is limited to 3 cameras. That is a new feature so we’ll work on the consistency. Tyler Lum (tylerlum) could you take a look?
  4. For the AddingSensors tutorial, if you add the snippet of xacro to the my_wamv.urdf.xacro file - you can add it just before the closing </robot> tag in the file.

    1. Then when you call rosrun xacro xacro --inorder my_wamv.urdf.xacro > my_wamv.urdf it should generate the my_wamv.urdf file.
    2. One way to verify is to run grep stereo_left *.* which should generate results similar to this…

We are actively working on the tutorials, so appreciate the debugging.

osrf-migration commented 5 years ago

Original comment by Tyler Lum (Bitbucket: tylerlum).


Hi Matthieu,

Thank you for reaching out and trying out the tutorials. I’m sorry that the setup has been frustrating, and I hope that we can help you through it!


In response to: "We have only 3 cameras allowed at the maximum and the Example Yaml Sensor Configuration File is providing 4 cameras. Is that normal ? I deleted one and that works fine."

You are absolutely right. This tutorial was created a week ago to demonstrate how to use generate_wamv.launch, which, at the time, had no compliance issues; it would accept any configuration. Just a few days ago, we merged in a pull request adding configuration restraints, which limits the number of sensors and requires physically realizable sensor locations. That is described here: https://github.com/osrf/vrx/blob/master/vrx_gazebo/src/vrx_gazebo_python/generator_scripts/wamv_config/sensor_compliance/numeric.yaml. Removing the 4th camera was the right thing to do.

I will add a clear description of how the compliance works in the tutorial tomorrow. Thank you for bringing this up.

osrf-migration commented 5 years ago

Original comment by Tyler Lum (Bitbucket: tylerlum).


In response to: “Quote from the tutorials/examples section : << After launch, all examples given below should begin with the wamv floating on the water near the shore, as shown >> -----> my boat is always in the middle of nowhere in water… and it is just drifting.”

I think I have an idea of what is happening here, but I need to ask you some questions.

You may be running sandisland.launch from the wrong package. There is a vrx_gazebo package /opt/ros/melodic/share/vrx_gazebo that comes with ros and the vrx_gazebo package that you get from Bitbucket for development. The first image below is the /opt/ros/melodic/share/vrx_gazebo one and second one is from this Bitbucket repository. You want the second one. This likely means you did not source your vrx workspace or it was not built correctly.

You can also run roscd vrx_gazebo; pwd to see which package it is.

osrf-migration commented 5 years ago

Original comment by Matthieu Parent (Bitbucket: Matthieu Parent).


Hi all,

I am sorry if I’m bothering you ahah, just trying to understand what I am doing.

  1. I removed the prebuilt package and the repository and I did the installation again. This time only from source. There was no problem. Yesterday the problem while building from source concerned the geometry_msg. But now it seems to work.
  2. Ok i’ve just tried adding some cameras. I guess i didn’t put the line code at the good place. I copy-pasted the lines between de x:unless and the robot tag in the xacro file. Now I see only the pair of camera, which is, I suppose a good thing. In the xacro file I already see a lot of sensors, maybe i should add some arguments to : roslaunch vrx_gazebo sandisland.launch urdf:=`pwd`/my_wamv.urdfin order to enable which sensors I want. Tell me if I’m wrong by the way !
  3. I have the second image using the good repository built from source. Everything is fine.

Regards,

MatthieuPar

osrf-migration commented 5 years ago

Original comment by Tyler Lum (Bitbucket: tylerlum).


Hi Matthieu,

No worries at all. Thank you for helping us see where we can improve. I hope that we were able to help.

Response to your questions:

  1. Great to hear! I am glad that it is working, and we will keep our eyes open to try to prevent issues like that from coming up.

  2. You ask a good question. At a high level:

    1. roslaunch vrx_gazebo sandisland.launch runs the boat simulation with the default sensor and thruster configuration
    2. roslaunch vrx_gazebo sandisland.launch urdf:=<absolute_path_to_urdf> runs the boat simulation with the sensor and thruster configuration specified in <absolute_path_to_urdf>. To customize your boat, you can either

      1. Directly create and edit the .urdf file directly (not recommended, as this is more complicated. Doable, but harder)
      2. Follow https://osrf-migration.github.io/vrx-gh-pages/#!/osrf/vrx/wiki/tutorials/Creating a custom WAM-V Thruster and Sensor Configuration For Competition to create thruster and sensor yaml files that specify the positions of your thrusters and sensors and then run roslaunch vrx_gazebo generate_wamv.launch thruster_yaml:=<abs_path_to_thruster_yaml> sensor_yaml:=<abs_path_to_sensor_yaml> wamv_target:=<abs_path_to_urdf>. This scripts takes in the yaml files as input and creates a new urdf file at <abs_path_to_urdf>. This is the recommended method.
  3. Great to hear that it is working!

Please let us know if you have any other question, and resolve this issue if you don’t have any other questions.

osrf-migration commented 5 years ago

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


Please, reopen if this is still an issue.