How to use package (downloaded from git)

asked 2020-06-20 06:49:46 -0600

creazy gravatar image

Hello :)

I'm new to ROS and RVIZ and got the task to get a line extraction from laser scans running. My professor recommended first trying out the git package "laser_line_extraction" written by kam3k. I installed it now and found out how to create it as package. Now I'm able to find it via rospack find and tried to start it. But when roslaunching it like explained in the "read-me" file nothing happens at all. The author wrote that I should make a copy into the launch directory. Where can I find my launch directory? And how can I get the package running then? Do I need to start gazebo+rviz first and then roslaunch it or do I just roslaunch the new package laser_line_extraction?

Thanks for any help!

edit retag flag offensive close merge delete

Comments

There is an error message? Did you build the package before launch it?

Teo Cardoso gravatar image Teo Cardoso  ( 2020-06-20 12:24:29 -0600 )edit

No, there's no error message. It's just nothing happening when executing "roslaunch laser_line_extraction example.launch" tough the git explanation shows that there should be the laser-lines shown in rviz.

I'm not sure what you mean by build the package. I followed some online tutorials and copied it from github and used catkin_make to create it. Then I used source ~/.bashrc and could find it via rospack.

I tried first launching gazebo and then launch the laser_line_extraction package and the other way round. And then I started rviz. But in neither case anything is shown.

creazy gravatar image creazy  ( 2020-06-21 03:35:29 -0600 )edit

I can see the laser_lines in rviz like usual but the package https://github.com/kam3k/laser_line_e... just doesn't show any lines like in its tutorial. When do I need to roslaunch it? After gazebo & pr2 or before? And do I have to consider anything else?

creazy gravatar image creazy  ( 2020-06-21 04:08:44 -0600 )edit

Usually, I launch gazebo first, however, in the most packages that don't make a difference at all. In the example launch file, there are two params: scan_topic and frame_id. Did you set this to your situation?

Teo Cardoso gravatar image Teo Cardoso  ( 2020-06-21 11:55:16 -0600 )edit

That's a great hint, thanks! I set scan_topic now to 'value="/base_scan"' since I choose base_scan as the laser's topic. But I'm not sure which value frame_id should take? Is it the world frame I'm using in Rviz?

creazy gravatar image creazy  ( 2020-06-21 13:27:41 -0600 )edit

I'm not sure, but probably the same that is the LaserScan header msg.

Teo Cardoso gravatar image Teo Cardoso  ( 2020-06-21 13:57:50 -0600 )edit