Adding URDF file for VLP-16 into Gazebo - simulation

I want to simulate an algorithm we wrote in Gazebo. The base robot I am using is the clearpath Husky. And, I need to put a Velodyne VLP-16 Lidar on it to extract the point clouds. The way I am going about it is trying to make my own custom world and launching the Husky launch file which spawns the Husky in a custom world. I just want to know what would be the best way to put the lidar on top of the husky? Can I just modify the world file? Or will I need to change the clearpath file? I downloaded the velodyne_simulator package from Velodyne and it comes with a VLP-16.urdf.xacro. Is there anyway I can use that? Any help would be appreciated. Thanks

The Husky allows for additional accessories to be added via the husky.urdf.xacro file indicated by this line of code in the file <xacro:include filename="$(arg urdf_extras)" />
The file can be located here https://github.com/husky/husky/blob/kinetic-devel/husky_description/urdf/husky.urdf.xacro
The final step is to add these lines of VLP-16 code to/path/to/my/file.urdf:
<VLP-16 parent="base_link" name="velodyne" topic="/velodyne_points">
<!-- The 0.2 will most likely have to be adjusted to fit -->
<origin xyz="0 0 0.2" rpy="0 0 0" />
</VLP-16>
Now the Husky can be launched with the VLP-16 in Gazebo.
roslaunch husky_gazebo husky_playpen.launch urdf_extras=/path/to/my/file.urdf

The answer by #mastash3ff is mostly correct except there are few things missing. As per the latest husky package you can bring up velodyne VLP-16 or say any model by setting "HUSKY_URDF_EXTRAS" environment variable to the urdf file you want to include.
export HUSKY_URDF_EXTRAS=/path/to/vlp.urdf
In my case vlp.urdf looked like this. You can also follow the same pattern
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="example">
<xacro:include filename="$(find velodyne_description)/urdf/VLP-16.urdf.xacro"/>
<VLP-16 parent="top_plate_link" name="velodyne" topic="/velodyne_points" hz="10" samples="440">
<origin xyz="0.2206 0.0 0.00635" rpy="0 0 0" />
</VLP-16>
</robot>
Hope this helps.

Related

Tableau not loading custom color palette

I have edited Preferences.tps file from my tableau repository to add following code -
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="My Custom Palette" type="regular">
<color>#75787B</color>
<color>#A7A8AA</color>
<color>#BBBCBC</color>
<color>#B7C9D3</color>
<color>#C6BCD0</color>
<color>#E4D77E</color>
<color>#D9C89E</color>
</color-palette>
</preferences>
</workbook>
Upon restarting the Tableau, I still can't see my color pallet in there. I tried searching online for possible solutions and have even replaced the code with custom codes available online. No luck though!
For continuous/ordered data, the type of the color palette would need to be "ordered-sequential" or "ordered-diverging".
See the link below for more info about creating a custom palette and with examples of various types.
https://onlinehelp.tableau.com/current/pro/desktop/en-us/formatting_create_custom_colors.html
For example:
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="My Custom Palette" type="ordered-diverging">
<color>#75787B</color>
<color>#A7A8AA</color>
<color>#BBBCBC</color>
<color>#B7C9D3</color>
<color>#C6BCD0</color>
<color>#E4D77E</color>
<color>#D9C89E</color>
</color-palette>
</preferences>
</workbook>
Ordered-diverging above produces:
If there are multiple versions of Tableau installed, try testing the custom colors on default one. it works.

SAP UI5: NumericContent: scale is shorted

I am having a problem while using SAP UI5. I am using a NumericContent Tile. Here I want to set "km/h" as a scale, but it always gets abbriged to "km/".
How can I prevent this?
<TileContent footer="{i18nExtended>SpeedTripMax}" class="sapUiSmallMargin">
<content>
<NumericContent value="{mymodel>/SpeedTripMax}"
truncateValueTo="6" scale="km/h"/>
</content>
</TileContent>
I do not know why it is happening, but according to api one should use sap.suite.ui.commons.GenericTile instead of sap.suite.ui.commons.NumericTile because it is deprecated since version 1.25.
Try GenericTile approach.
EDITED 10:42 120717:
I tested it on my system and it is bug, because k/h works fine:
The max string length is just 3 signs:
I was testing it within GenericTile.

Creating a working copy for Plone 4 custom content types

I have created a custom Plone content type in my package i.e. my.product.
I am in need of integrating a working copy support: so that a "published" document (in my case, a published content type) stays online while it is being edited. Basically, I want to take advantage of 'Working Copy Support (Iterate)' provided by plone.app.iterate to achieve what is explained here. This will provide me with ability to check-in/check-out my changes.
Is this possible in Plone 4 with custom content types using Archetypes? How would one go about it if yes?
I added the following two files inside my.product/my/product/profiles/default folder and it appears to work:
diff_tool.xml
<?xml version="1.0"?>
<object>
<difftypes>
<type portal_type="MyCustomType">
<field name="any" difftype="Compound Diff for AT types"/>
</type>
</difftypes>
</object>
repositorytool.xml
<?xml version="1.0"?>
<repositorytool>
<policymap>
<type name="MyCustomType">
<policy name="at_edit_autoversion"/>
<policy name="version_on_revert"/>
</type>
</policymap>
</repositorytool>
I have never used plone.app.iterate, but this is the generic approach how to solve the problem.
Actions are installed by plone.app.iterate GenericSetup profile. You can see actions here:
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/profiles/default/actions.xml
Pay note to the line *available_expr* which tells when to show the action or not. It points to helper view with the conditition.
The view is defined here
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/browser/configure.zcml#L7
The checks that are performed for the content item if it's archiveable
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/browser/control.py#L47
Most likely the failure comes from if not interfaces.IIterateAware.providedBy condition. Your custom contennt must declare this interface. However, you can confirm this putting a pdb breakpoint in checkin_allowed(self) and step it though line-by-line and see what happens with your content type.

<ice:outputMedia> and <ui:repeat>

I am trying to play sequence of .wav files with the following code. My Problem is some times all files are playing at a time some times one after other. Simple to say xyz.wav files are playing randomly. Is there a way to thread.sleep or to wait till one file finishes playing the audio???
<
(ui:repeat value="#{captcha.imageSpeechFiles}" var="cart" rendered="#{captcha.play}">
(ice:outputMedia source="#{cart}" mimeType="audio/x-wav" player="windows" style="width:0px;height:0px;" >
(param name="play" value="true"/>
(/ice:outputMedia>
(/ui:repeat>
I solved my own question. instead of ice:outputMedia tag if we use embed as shown below its working fine.
(ui:repeat value="#{popup.imageSpeechFiles}" var="cart" rendered="#{popup.play}">
(embed id="embdwav" src="#{cart}" autostart="true" hidden="true" />
(/ui:repeat>

Saving Long/Lat as kml (track)

So, I've got a class with contains a NSMutableArray of CLLocation's, and a name.
Now I want to save them to KML, ideally as a track (or , so I can use the file to display the locations traveled.)
How would I go about this?
I don't expect code, more guidance (I'm new to Objective-C and KML, so got a lot to learn! :) )
I haven't used either of these, but here's a couple of libraries that turned up in a search:
http://github.com/incanus/Simple-KML/
http://developmentseed.org/blog/2010/aug/12/kml-parsing-library-released-apples-ios-platform
Edit: it looks like both those libraries are parsers, not writers. You may have to create your own writer.
I'd say that using either of these libraries would save you a lot of time. That said, have a look at how KML is formed. It's just XML and making a track is really easy. Here's an example:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1" xmlns:trails="http://www.google.com/kml/trails/1.0">
<Document>
<name>RK_Running.kml</name>
<Placemark>
<name>Running 12/9</name>
<Style>
<LineStyle>
<color>ff0000ff</color>
<width>4</width>
</LineStyle>
</Style>
<MultiGeometry>
<LineString>
<tessellate>1</tessellate>
<coordinates>
138.968309,35.716577,17.0
138.967998,35.716859,17.0
138.967526,35.717252,20.0
138.967055,35.717494,20.0
</coordinates>
</LineString>
</MultiGeometry>
</Placemark>
</Document>
</kml>
Save this as a .kml and it will open in Google Earth
KML is just XML. I'd suggest you create something like what you're looking for using Google Earth. Save it as KML and open it with a text editor to get an idea of what you need to output.
You can generate XML using libxml2 or KissXML