Ask Your Question
4

Has anyone written a trajectory plotting tool?

asked 2013-03-21 22:51:07 -0500

Adolfo Rodriguez T gravatar image

updated 2014-01-28 17:15:50 -0500

ngrennan gravatar image

Adam Leeper asked on ros-users:

I'd like a tool that plots a series of joint trajectories. In my work, I continuously re-plan motions, meaning I need each trajectory to spline smoothly at a particular time with the previously commanded trajectory. Having a graphical tool to verify that this is happening correctly would be very useful.

Has anyone already written such a tool? Otherwise, I guess I'll start getting familiar with rqt and matplotlib...

David Lu answered on ros-users:

I have a tool based around a library here: https://code.google.com/p/wu-robotics/source/browse/trunk/precise_trajectory/graph_trajectory/src/graph_trajectory/__init__.py

It also uses a JointWatcher to record the values that are actually performed. https://code.google.com/p/wu-robotics/source/browse/trunk/precise_trajectory/pr2_precise_trajectory/src/pr2_precise_trajectory/joint_watcher.py

Dorian Scholz answered on ros-users:

the rqt GUI has a 2D plotter rqt_plot that can plot numerical data from messages. It is very similar to rxplot, but there is no restriction (as far as I know) on how many variables can be plotted. It's just dependent on you CPU power... rqt_plot has three different drawing backends selectable from it's configuration menu: - qwt plot (fast, but not using message timestamps and needs python-qwt bindings) - pyqtgraph (fast and needs pyqtgraph to be installed which is not in the repos) - matplotlib (slow but always available)

Dirk Thomas answered on ros-users:

Even without any further information how you want to plot the trajectories I would recommend looking into QGraphicsScene as the backend. May be this is a better fit than using matplotlib.

edit retag flag offensive close merge delete

Comments

Hi , David Lu could you explain how to use your program??? thanks

rem870 gravatar imagerem870 ( 2013-07-31 12:22:56 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2018-06-07 05:42:52 -0500

Kei Okada gravatar image

updated 2018-06-07 05:44:04 -0500

recently my college wrote the rqt plugin for visualize joint trajectory , try apt-get install ros-kinetic-rqt-joint-trajectory-plot

https://github.com/tork-a/rqt_joint_t...

rqt joint trajectory plot

edit flag offensive delete link more
4

answered 2013-03-21 22:53:18 -0500

Adolfo Rodriguez T gravatar image

updated 2013-03-21 23:03:46 -0500

I've used rxplot to visualize joint trajectory messages as they are being sent to the controllers. The downside is that there is no proper way to reconstruct the spline. For example, you can visualize the position of the waypoints and see the plotting tool reconstruct a smooth curve, but you can't enforce the actual waypoint velocity and acceleration specified in the message.

I don't know if there exists an rqt plugin for reconstructing splines from JointTrajectory messages, but if not, it would be a very valuable addition.

A question from my side would be: are you explicitly computing the blending patches for trajectory replacement, or are you letting the controller (eg. joint trajectory action controller) do that for you?.

edit flag offensive delete link more

Comments

2

rqt_plot does not know anything about trajectories, it just plots numeric data over time (like rxplot, but with a choice of multiple plotting backends). Feel free to add a plugin for trajectory plotting, which can reuse the plotting backends.

Dorian Scholz gravatar imageDorian Scholz ( 2013-03-22 01:47:24 -0500 )edit
3

answered 2013-04-03 21:25:37 -0500

We had a student in our lab who implement a real-time plotting tool that worked pretty well under ROS (but also supports YARP) displaying numerous trajectories at high frequencies. Rxplot used to not deliver in those situations. You can have a look at it here:

https://code.google.com/p/streamvis/

I am still using the tool under fuerte. Don't know if it works under groovy out of the box. The user community is pretty small but the tool is still supported. In case you encounter installation problems do not hesitate to send an email. ;)

edit flag offensive delete link more

Comments

I have installed the streamvis but not able to add ROS topic to view data. How can i add ROS topic in streamvis.

bvbdort gravatar imagebvbdort ( 2014-09-04 09:36:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

8 followers

Stats

Asked: 2013-03-21 22:51:07 -0500

Seen: 4,091 times

Last updated: Jun 07 '18