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

Arguments in

asked 2013-07-31 11:07:08 -0600

David Lu gravatar image

Can someone please explain the arguments to generate_distutils_setup (reference)?

I have two use cases that I have not been able to get working with my catkin releases.

1) Release a script so I can rosrun it

2) Release a library so I can import it in other rospy code.

The 'scripts' argument I've gathered actually means GLOBAL scripts that are run without rosrun. The relevant code is actually not too helpful for this.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-31 11:15:17 -0600

joq gravatar image

The Installing Python scripts and modules how-to may be more helpful for your use cases.

You are correct that the scripts argument is not recommended (or needed) for normal rosrun scripts.

edit flag offensive delete link more


Thanks for your reply. I've updated the wiki to include a link to that page. One related followup question not addressed there is: What is this mapping? package_dir={'': 'src'})

David Lu gravatar image David Lu  ( 2013-07-31 13:05:04 -0600 )edit

It makes the `src/` subdirectory the root of your Python modules.

joq gravatar image joq  ( 2013-07-31 13:35:24 -0600 )edit

Okay, but why is it a dictionary?

David Lu gravatar image David Lu  ( 2013-07-31 17:45:30 -0600 )edit

ROS is simply using the standard Python interface. I suppose it allows multiple root directories for resolving module imports. I've never needed anything except the `{'': 'src'}`.

joq gravatar image joq  ( 2013-08-06 05:47:35 -0600 )edit

Question Tools

1 follower


Asked: 2013-07-31 11:07:08 -0600

Seen: 385 times

Last updated: Jul 31 '13