-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Other issue]: Simulate laser scan in Gazebo #23
Comments
Hi @Jerrybaoyilei, You'll need to add a lidar model to your .world file or spawn it into the world. ie, just as you would attach a lidar model to one of your robot links through a fixed joint, you could need to instead create a fixed joint between the model and the |
Hi @Yadunund , thank you for the clarification! From my understanding, attaching a lidar model to the robot won't work with this package, right? Since the "obstacle-free" basis world is created from the first 10 LaserScan messages (please correct me if I am wrong) I am not submitting a GSoC proposal. I am just exploring open-rmf and trying out the simulations (thank you and your team for building this amazing platform) Also, I apologize that I asked the question here even though it's not a bug. It's just I couldn't find much information online regarding this package, and I figured maybe I could ask here directly... |
Yup you don't need to attach the model to the robot. Instead attach it to the world so it remains stationary in space. |
Hi @Yadunund , I used the However, even though I successfully got some data reading from echoing the converted ROS 2 topics, the LiDAR has an intensity of 0 and I cannot see any rays in Ignition Gazebo. I wonder if you used some version of the |
It's best to stick to Gazebo (new) as Gazebo Classic (old) will be retired soon. With the new Gazebo, you'll need to explictly add a plugin in the world sdf to visualize the lidar rays. See https://github.com/gazebosim/gz-sim/blob/b9138fb12b0cef77621ed3a5eba577ebe4f7abd0/examples/worlds/visualize_lidar.sdf#L125-L126 Regarding intensities, you'll need to check whether the lidar plugin in Gazebo supports this. Even if it did, I assume it would be conditioned on every asset in the gazebo world properly defining PBR parameters. https://github.com/gazebosim/gz-sensors/blob/gz-sensors8/include/gz/sensors/GpuLidarSensor.hh Usually, relying on the range values is sufficient. |
@Yadunund Got it. Thank you! Also, is there a historical version of this package (rmf_obstacle) that works with Humble binaries of ROS 2 and rmf that I can use? I am asking only because I modified some code when I was using ROS 2 Humble and the humble binary of rmf, and some of these packages were significantly changed in ROS 2 Iron. Thank you! |
There isn't. Since this package is not stabilized yet, there are no distro branches associated with it. |
Got it, thank you! |
Hi @Yadunund , sorry to bother you with yet another question. I got the LiDAR showing up in GUI and laser detector working (I can see the terminal output indicating there are obstacles detected). But when I tried to run
Have you encountered this before? I am using ROS 2 Iron (binary installation) and rmf iron-release branch (binary installation) |
Are you piping the |
@Yadunund yes, I ran After outputing the tf frame graph before and after running the lane blocker node, I noticed that I don't have a frame for the lidar sensor; the only frames are for tinyRobot1 and tinyRobot2 in the demo office simulation. Could this lack of frame be the reason for all the dropping message? In my |
Did you pass |
Hi @Yadunund , no I didn't, not all nodes. I just changed the default value of I now added a transform broadcaster to broadcast the location of lidar model frame to the world frame, and the error is gone. However, the lane is still not closed. Seems like the lane blocker is able to recognize that the obstacle is on the robot lane though. Here is part of the output from the lane_blocker node terminal:
The rest of the output is repeating these 2 blocks of output. The entire time, I placed the obstacle there and never moved it away. I also checked the rqt_graph and compared with #9 (comment). I've attached the .dot file as well. In the rqt graph, the |
Before proceeding, is there an existing issue or discussion for this?
Description
Hi @Yadunund , I am quite new to ROS 2 and Open-RMF.
I was trying to implement the
rmf_obstacle_detector_laserscan
package into thermf_demos
package. I also followed your instructions in #15 . Now in my terminal I can see "[INFO] [1711031152.446753857] [laserscan_obstacle_detector]: Activation successful. Waiting to receive 10 LaserScan messages on topic lidar/scan to begin calibration.", but since I don't have any simulated laser scanner in my gazebo simulation, there is currently no LaserScan message published to this lidar/scan topic.I wonder which simulated laser scanner package did you use in achieving the deep blue laser scan result in the gif you showed in Readme? I've checked in Gazebo Classic tutorials, and the laser scan plugin are attached to a robot, whereas the one in this gif looks like a stationary one, which is what I hope to use. Thank you very much!
The text was updated successfully, but these errors were encountered: