ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to install a package from an old distro?

asked 2016-08-29 18:08:44 -0500

scandrew gravatar image

updated 2016-09-01 12:06:13 -0500

gvdhoorn gravatar image

Hi, I am fairly new to ROS. I found a package that is exactly what I need. Only problem is, last time it was updated was a few years back. Differential_drive package. It seems to be compatible with Fuerte and Groovy. I am using Kinetic. What is the easiest way to implement this package? I am ready to go as far as build my own package and use the source code from the existing nodes of this package. I was just hoping there was an easier/faster way. I would appreciate any help, thank you. Andrew


Edit: Thanks, I downloaded and catkin made it, then sourced. I can tell ROS recognises the package because when I press TAB, it auto-completes "differential-drive", but if I then press double TAB it only seems to see crosshair.jpg and none of the scripts. Do you have any idea why?

Here is the mistake I get, when I try to run one of the scripts

rosrun differential_drive twist_to_motors.py
[rosrun] Couldn't find executable named twist_to_motors.py below /home/desktop/catkin_ws/src/differential-drive
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun]   /home/desktop/catkin_ws/src/differential-drive/scripts/twist_to_motors.py
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2016-08-30 01:45:01 -0500

gvdhoorn gravatar image

updated 2016-08-30 01:48:22 -0500

This is not really an answer to your question (as it doesn't tell you how to port a package from an older release to a newer one), but for your specific use-case (controlling a differential platform), you could perhaps take a look at the diff_drive_controller in ros_control.

It is -- at least in spirit -- a successor to many of the differential drive control nodes that were used before, and should be relatively easy to setup and use. Same Twist interface, Odometry output, etc.


Edit: in general though, to port a pkg to a new release: just copy the package sources into a catkin workspace and try to compile it. If it isn't found, make sure it's actually a catkin package (has a package.xml and the CMakeLists.txt doesn't use any of the rosbuild macros). If it builds, but you get errors, you'll have to find a way to resolve those. This will most of the time mean either updating method calls to new signatures, update / replace used message types and / or coming up with suitable replacements for deprecated / removed API calls.

After all that (and it now builds cleanly) comes testing the runtime behaviour, to make sure the nodes still behave as they ought to. If they do, and integration testing is also successful, you've ported the package.

edit flag offensive delete link more

Comments

1

thanks gvdhoorn! I also considered the ros_control package, and its diff_drive_controller. My problem with it was, that I did not find any documentation on how to actually use it. There seem to be no tutorials, or instructions on it. I will try to look harder. Thanks!

scandrew gravatar image scandrew  ( 2016-08-30 07:28:57 -0500 )edit

You're right, it is rather sparsely documented. I guess the assumption is that you'd already know a things or two about ros_control and how to work with any of the other controllers. The 'diff drive' side of it is rather obvious though (parameterwise), I'd say.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-30 08:03:26 -0500 )edit

You can probably take a look at the config files for one of the robots listed on the wiki page, such as jackal. See jackal_control/../control.yaml for its diff drive config.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-30 08:04:34 -0500 )edit

Thanks. Will look into it. I will start a new question, specific to odometry and differential control. Maybe there is a simpler solution. But if I get no satisfactory answer, I may just try to create a catkin package from the old source files on differential_drive package, as you suggested

scandrew gravatar image scandrew  ( 2016-08-30 08:19:11 -0500 )edit

Up to you of course. The plugin takes care of everything needed: odometry calculation and publishing, converting Twists into motor control commands, etc, etc. If you just want to control a diff drive, it's probably the plugin. If you want to learn, writing something may give you more insight.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-30 09:54:55 -0500 )edit
3

answered 2016-08-31 16:05:52 -0500

Mark Rose gravatar image

updated 2016-09-01 07:27:53 -0500

The latest source of that package includes code I contributed to update the package for indigo and jade. I've used it successfully in both those releases, so you shouldn't have any problem with kinetic. Get the code from the author's GitHub repository: https://github.com/jfstepha/different... .

edit flag offensive delete link more

Comments

I am new to ROS, so not exactly sure what is causing it. But looking at your CMakeLists.txt, it is pretty much empty, with no executables, messages or services declared. Looks like the only uncommented line is catkin_package()**

scandrew gravatar image scandrew  ( 2016-09-01 09:11:30 -0500 )edit

Hmmm... I mainly updated to the new package structure and fixed some runtime errors caused by ROS changes. Yes, it should have Python setup stuff (although not strictly required it you run from source, since it doesn't install any Python modules.)

Mark Rose gravatar image Mark Rose  ( 2016-09-01 14:46:32 -0500 )edit
1

Probably should add this to CMakeLists.txt:

catkin_package()
catkin_install_python(
PROGRAMS
    scripts/diff_tf.py
    scripts/pid_velocity.py
    ... etc. - stupid comment limit! ...
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
catkin_python_setup()
Mark Rose gravatar image Mark Rose  ( 2016-09-01 14:51:02 -0500 )edit

Or, as you say, uncomment and edit. I'll suggest another pull request to the author when I have time.

Mark Rose gravatar image Mark Rose  ( 2016-09-01 14:54:03 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-29 18:08:18 -0500

Seen: 1,628 times

Last updated: Sep 01 '16