Adding a boat to the Gazebo environment - ros

I want to work on a surface vehicle in the gazebo environment. I've looked at various resources on this topic, but haven't been able to find a working example file for the system I'm using. In the sources I found, the vehicle sinks into the water. I also did research to get it on the water, but I couldn't get any results. My system information is as follows. Is there a source for my system information where I can work on the surface vehicle? Or do I need to change the version?
System info:
Ubuntu 20.04
ROS Noetic Distribution
Gazebo 11
I added ocean and boat model to Gazebo environment. To keep the boat afloat, I looked at this resource:
https://classic.gazebosim.org/tutorials?tut=hydrodynamics&cat=physics
I added the codes in this resource to the boat.sdf file. But the boat did not rise above the water.

Related

Which resources are included with pydrake FindResourceOrThrow?

In pydrake, the following line successfully locates an SDF file:
my_sdf = FindResourceOrThrow("drake/examples/multibody/cart_pole/cart_pole.sdf")
Given the structure of the github repository and this example, I would expect the following line to work as well,
my_sdf = FindResourceOrThrow("drake/examples/multibody/four_bar/four_bar.sdf")
but it fails with RuntimeError: Could not find Drake resource_path....
Why is this? Are only some of the SDF files included with the python bindings? If so, is there a list of such available files anywhere?
Are only some of the SDF files included with the python bindings?
Yes, that's correct.
If so, is there a list of such available files anywhere?
If you installed using https://drake.mit.edu/pip.html, then you can list the installed SDFormat files for your current version of the Drake wheel like so:
$ find env/lib/python*/site-packages/pydrake/share/drake -name '*.sdf'
...
env/lib/python3.8/site-packages/pydrake/share/drake/examples/multibody/cart_pole/cart_pole.sdf
...
If you installed via some other mechanism, the command would be similar but you'd need to change the find path to wherever Drake is installed.
Why is this?
Drake is primary a library of stable code, not a library of models. We generally expect users to create their own models, possibly by copying and modifying some example models to get started.
Some model files are very large (e.g., meshes or textures). If we included those in our wheels, the wheel would exceed the default size allowed by PyPI.
We currently do install some models along with our wheels to facilitate our tutorials, but we plan to stop installing those and instead download them at runtime for the tutorials.
The set of installed models for a given version of Drake is somewhat random, and will generally shrink from one release to the next. If you need a stable version of Drake model(s), you should copy the model file(s) into your own project directly.

Using Underwater Robot Model on ROS (Noetic) and Gazebo

I have to work with ROS Noetic and gazebo on a model of a Semi-submerged drone. To test some different programs, I want to use the model of diffboat, located in this git.
Because Kinetic might close in few days, i have to work with ROS Noetic (or Foxy/ROS2) and the problem is this project is not compatible with ROS Noetic..
Do you have any advice to make this project compatible on ROS/Noetic?
Hi am not sure if you have to work with the mentioned environment or if also unity instead of gazebo is an alternative.
But if you want to check out other maritime simulators I can recommend these links to you:
Ros Discourse on Maritime Robotics
UUV Simulator (Ros,Gazebo)
DAVE Simulator (Ros,Gazebo)
Plankton Simulator (Ros2,Gazebo)

edgetpu_compiler: How to combine two tflite models

I'm trying to use the Google Coral edgetpu_compiler to combine two existing tflite models into a single model following Google's directions. I'm using two of Google's pre-compiled models. The error indicates the the models are already compiled for the Coral device. These models are in fact already compiled for the Edge TPU, but I'm trying to combine the two models. Am I doing something wrong or is combining Edge TPU models not supported?
Here is the command I'm running and the output:
$ edgetpu_compiler \
mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite \
mobilenet_ssd_v2_face_quant_postprocess_edgetpu.tflite
Edge TPU Compiler version 2.0.267685300
Invalid model: mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
Model already compiled for Edge TPU
Im running this on the Coral board OS version: Mendel GNU/Linux 3 (Chef).
Any guidance appreciated.
Thanks,
John
The models that you are trying to combine are already compiled for edgetpu and cannot be compiled again.
To compile both the models again, you can download the 'All model files' of "MobileNet SSD v2 (COCO)" and "MobileNet SSD v2 (Faces)" from https://coral.withgoogle.com/models/. After extracting these compressed files, you will find tflite_graph.pb files for both the models. You will have to convert these .pb files into .tflite (CPU version) files.
After getting CPU version of .tflite files, you should be able to compile two models together.
Please see the model requirements in detail at : https://coral.withgoogle.com/docs/edgetpu/models-intro/#compatibility-overview
Please read about co-compiling the model at : https://coral.withgoogle.com/docs/edgetpu/compiler/#co-compiling-multiple-models. Please also note that co-compiling n models will produce n models, not just one. The benefit is that the compiler support parameter data cached together in TPU RAM

Using Google Cartographer with Turtlebot in a custom world?

I am a beginner in robotics and I am trying to use Google Cartographer to make my simulated Turtlebot build a map autonomously of its environment.
I have done already all the tutorials in ROS and I can make the robot build the map using teleoperation, but I don't know how to make it build the map by itself. I want to use Google Cartographer for this.
I can however run the demo provided by Google and it works (it builds the map of a Museum).
# Launch the 2D depth camera demo.
roslaunch cartographer_turtlebot demo_depth_camera_2d.launch bag_filename:=${HOME}/Downloads/cartographer_turtlebot_demo.bag
The questions:
How can I run it on my own world instead of the bag file of that museum?
Does it need a yaml map like the one I built with teleoperation? what is the command to make it use my yaml map instead of a bag file?
Can I use a .png image with yaml context?
Could it use the gazebo simulated worlds that are .sdf? What is the command to input this then?
These are the specifications I have:
Ubuntu Xenial
ROS Kinetic
Gazebo 7
Turtlebot2
Google Cartographer for turtlebot
Thanks a lot! It's like I understand the concepts but I don't know how to link things together to make them work.

can't find /camera/camera_info and /camera/image_raw when using rostopic list command

i'm going to do the intrinsic calibration for my kinect camera, I've followed this tutorial http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration
However, when I use command rostopic list, I just found 2 topics:
/rosout
/rosout_agg
but didn't find wanted topics that are:
/camera/camera_info
/camera/image_raw
I've installed camera_calibration package, and I'm using ROS Indigo.
In my case, I use a kinect and freenect driver for it, so the problem is I need to "roslaunch detection freenect.launch" first, then I can see my wanted topics that are /camera/rgb/image_color and camera:=/camera/rgb.

Resources