This page describes useful macros that you will find through out ros.org

PackageHeader

This automatically generates the package header that you see on all package pages. Usage:

<<PackageHeader(PACKAGE)>>

Example:

<<PackageHeader(tf)>> 

StackHeader

This automatically generates the stack header that you see on all stack pages. Usage:

<<StackHeader(STACK)>>

Example:

<<StackHeader(geometry)>> 

RepoHeader

This automatically generates a listing of stacks that are contained in a repository. You can optionally include a list of packages as well. Examples: alufr-ros-pkg, gt-ros-pkg.

Usage:

<<RepoHeader(repo-name)>>
<<RepoHeader(repo-name packages)>>

Example:

<<RepoHeader(wg-ros-pkg)>>

This automatically creates a link to the msg in the ROS code API documentation. Usage:

<<MsgLink(package/name)>>

Example:

<<MsgLink(nav_msgs/OccupancyGrid)>>

nav_msgs/OccupancyGrid

This automatically creates a link to the msg in the ROS code API documentation. Usage:

<<SrvLink(package/name)>>

Example:

<<SrvLink(nav_msgs/GetMap)>>

nav_msgs/GetMap

The TracLink macro lets you link into Trac so that visitors can easily file tickets, e.g.: Usage:

<<TracLink(REPO PACKAGE)>>

Example:

<<TracLink(ros-pkg geometry)>> 

Use trac to report bugs or request features. [View active tickets]

The KforgeTracLink macro lets you link into Trac so that visitors can easily file tickets, e.g.: Usage:

<<KforgeTracLink(REPO PACKAGE)>>

Example:

<<KforgeTracLink(turtlebot turtlebot)>> 

Use trac to report bugs or request features. [View active tickets]

Ticket

The Ticket macro lets you link into specific Trac tickets, e.g.: Usage:

<<Ticket(REPO NUM)>>

Example:

<<Ticket(ros 2571)>> 

#2571

Stack Navi

This macro uses the stack.xml to display the stack description and create navigation bar into the stack packages. Usage:

<<StackNavi(stack)>>

Example:

<<StackNavi(foote_photo_management)>> 

foote_photo_management

Currently an interface to picasa web albums.

  • Author: Tully Foote/tfoote@willowgarage.com
  • License: LGPL
  • Packages: picasaweb_sync

FullSearchWithDescriptionsCS

The FullSearchWithDescriptionsCS can be used to auto-generate the tutorial index and can search over different keywords.

<<FullSearchWithDescriptionsCS(title:WritingTutorials BeginnerCategory)>>

This shows the title and description of the tutorial with title WritingTutorials and keyword BeginnerCategory. If the category had been AdvancedCategory, no tutorial would be displayed as below.

  1. How to Write a Tutorial

    This tutorial covers useful template and macros for writing tutorials, along with exemplar tutorials that are available for guidance on ros.org

IncludeCSTemplate

This macro takes the keys at the top of the page and turns them into clearsilver variables that can be operated on using the clearsilver templating commands. In the case of tutorials the keys are used in the TutorialCSHeaderTemplate.

<<IncludeCSTemplate(TutorialCSHeaderTemplate)>>

Youtube

This macro allows you to embed youtube video into the wiki page using the video key Usage:

<<Youtube(key)>>

Example:

<<Youtube(bNtm6_FBJp8)>>

Version

This macro allows you to consistently report a version number for a particular package, stack, API, or otherwise. If the version macro is given arguments you will see a highlighted tag. If given no arguments you will see 3 version button appear to toggle between versioned text in your wiki page

Usage:

Arguments:

<<Version(ROS Boxturtle)>>

my_api() New in ROS Boxturtle

No arguments:

<<Version()>>

Welcome to a demo of a cool API tool

{{{#!wiki version boxturtle

This is my boxturtle API.  It's old

}}}

{{{#!wiki version cturtle

This is my cturtle API.  It's new and awesome

It has wiki formatting and '''everything'''!!!
}}}

This text is relevant to everyone

{{{#!wiki version cturtle unstable

cturtle/unstable specific stuff.  
}}}

Welcome to a demo of a cool API tool

This is my boxturtle API. It's old

This is my cturtle API. It's new and awesome

It has wiki formatting and everything!!!

This text is relevant to everyone

cturtle/unstable specific stuff.

CodeRef

Often you will see tutorials first listing a whole file and then few snippets from it. To correctly display lines, avoid mistakes from copy & paste, the code should be listed only once, and referenced later. To do so, start your code block like this:

{{{
#!foo block=myblockname

some more text
on several lines
and even more
...

The newline after the first {{{ is important. Choose any name you want for myblockname. Then, later in the wiki, you can cite parts of that code using:

<<CodeRef(myblockname,3,5)>>

Becomes:

some more text
on several lines

Note that the codeblock needs to have been saved at least once for the preview to work! Line numbers only show if you use a language recognized by the wiki.

LurkerLink, LurkerSearch

It's often the case that for some particular item on the wiki there is much more information available in discussions in the mailing lists, though it's not practical (or even a good idea) to add all that detail to the wiki itself. As the list archives grow however it becomes ever harder to find relevant information by a simple keyword search.

These macros allow for easy linking in the wiki to a particular message, thread, or general search in the Lurker mailing list archives. So, for example, the thread relating to the creation of these macros is here: [ML]

Use this macro to link to a specific message or thread. When browsing Lurker, look at the URL for the message or thread you are viewing; it will look like

https://code.ros.org/lurker/thread/20110131.134604.f6e00a71.en.html
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(for a thread), or

https://code.ros.org/lurker/message/20110131.134604.f6e00a71.en.html
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(for a message). Paste the part highlighted above (after ...lurker/ and before .en.html) into the macro argument.

Message example: <<LurkerLink(message/20110207.203656.510ae321)>>

Thread example: <<LurkerLink(thread/20110206.185417.a1e171aa)>>

Becomes:

Message example: [ML]

Thread example: [ML]

AnswersSearch

Use this macro to search for a list of tags on anwsers.ros.org

<<AnswersSearch(text to display, drivers, hardware)>>

Becomes: text to display

Wiki: WikiMacros (last edited 2012-03-08 18:53:23 by KenConley)