Ask Your Question
0

Building custom messages on Desktop

asked 2012-09-13 04:17:25 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm trying to plot a custom message with rxplot on my desktop while my Turtlebot runs. However, this fails and asks if I've built my messages? How can I build custom messages on my desktop computer?

EDIT: You can't copy and paste from turtlebot to the desktop because the directories are different. Make files only work if they're in the proper directory. I can't roscreate a new package on the desktop in the ROS directory. I can make it anywhere else on the machine, but when I try roscreate-pkg, it's denied, and when I sudo it, roscreate-pkg the command is not found.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-09-20 05:36:45 -0500

Lorenz gravatar image

Never create packages in /opt/ros nor use sudo for compiling packages.

On the desktop, you need to create an overlay. Then copy the package containing your custom messages into it. If you copied the build directory in your package, too, you will run into compiler errors because the paths have changed. In that case, all you need to do is call rosmake --pre-clean <your package> to make sure that the old build directories are all removed.

edit flag offensive delete link more

Comments

Sure. They work since the beginning of ros and are commonly used.

Lorenz gravatar image Lorenz  ( 2012-09-20 08:49:32 -0500 )edit

It should. rosws is independent from the ros release.

Lorenz gravatar image Lorenz  ( 2012-09-20 09:03:55 -0500 )edit

Ok, yeah, sorry I hadn't installed it and assumed it was there.

IFLORbot gravatar image IFLORbot  ( 2012-09-20 09:09:29 -0500 )edit

Yeah, that should be it, I'm just having multiple problems either adding the overlay to the package path, or once, I do that, not having interfere with ROS_ROOT. I don't have anymore time today to fix it, so I'll try to mess with it more tomorrow.

IFLORbot gravatar image IFLORbot  ( 2012-09-20 10:13:35 -0500 )edit

You should not have any problems if you follow the overlay tutorial closely.

Lorenz gravatar image Lorenz  ( 2012-09-20 10:24:02 -0500 )edit

When you create the overlay with rosws init ~/overlay /opt/ros/electric and source ~/overlay/setup.bash you should be able to access all normal ros packages. Verify that first. Create a subdir in ~/overlay, put your msgs in there and add it with rosws set. Source setup.bash again.

Lorenz gravatar image Lorenz  ( 2012-09-21 03:19:42 -0500 )edit

That didn't work. Set didn't add the subdirectory to ROS_PACKAGE_PATH, it seems, and it should, right? I had it working correctly for a minute after I added all the package paths to ROS_PACKAGE_PATH, but then it reverted when I opened a new terminal.

IFLORbot gravatar image IFLORbot  ( 2012-09-21 03:40:20 -0500 )edit

Did you source the right setup.bash (that one in the overlay)?

Lorenz gravatar image Lorenz  ( 2012-09-21 03:41:25 -0500 )edit
1

answered 2012-09-13 05:40:17 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Uncomment rosbuild_genmsg() in CMakeLists.txt.

edit flag offensive delete link more

Comments

That's how I do it on the laptop controlling the turtlebot, but that doesn't work on the Desktop. I can't copy the files over and I can't use roscreate since it doesn't exist on the desktop SDK.

IFLORbot gravatar image IFLORbot  ( 2012-09-13 07:16:06 -0500 )edit

I can't make since I copied the files over and the directory has changed. How can I roscreate if it doesn't exist on the Desktop?

IFLORbot gravatar image IFLORbot  ( 2012-09-17 03:23:51 -0500 )edit

The machine where rxplot runs needs to have a ROS install, where the messages exist.

dornhege gravatar image dornhege  ( 2012-09-17 04:59:34 -0500 )edit

ROS is installed, but it's the desktop SDK, which does not come with ROS create installed, which you need to make new projects, which is the only way I know how to build ros make files. Is there a way to just build messages without using roscreate?

IFLORbot gravatar image IFLORbot  ( 2012-09-17 07:50:20 -0500 )edit

I'm not sure what the Desktop SDK is, but you shouldn't need to redo the messages package that you have on the other machine. In fact it should be an exact clone/checkout/etc. of the code on the turtlebot.

dornhege gravatar image dornhege  ( 2012-09-17 22:59:01 -0500 )edit

It is, but make files do not work if they are moved out of the directory they were created in, so I can't run it.

IFLORbot gravatar image IFLORbot  ( 2012-09-18 02:54:52 -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

Stats

Asked: 2012-09-13 04:17:25 -0500

Seen: 229 times

Last updated: Sep 20 '12