add lidar sensor and use obstacle_layer in costmap params#531
add lidar sensor and use obstacle_layer in costmap params#531
Conversation
d03855f to
8ae9a4e
Compare
do you want me to try to flip the mount body orientation to see if I can get rid of the script? I know things can get weird when I tune the quaternion since it affects both TF and beam direction so it can sometimes get in a bad state, but happy to try since it is cleaner than using the relay node. Thoughts? --WILL TRY THIS---- |
8ae9a4e to
b1ca37e
Compare
b1ca37e to
8ae9a4e
Compare
8ae9a4e to
f064b5d
Compare
|
|
07fa9f2 to
1fcd6d9
Compare
|
ok, so finally fixed the quaternion, and stopped punting it to claude, so as now to not need the extra 180 degree. The main issue being knowing that there was a -90 degree rotation in the Y-axis in the plug-in which flips the world Z from up to the forward X direction. Since the beams point along the forward X-axis now it needed another rotation about the world Z to move the beams along the x-y plane to -135 degrees where the lidar was mounted. Then had to tune the filters again . |
griswaldbrooks
left a comment
There was a problem hiding this comment.
Some small things, and can you post a video?
1fcd6d9 to
43bdbc1
Compare
|
First video shows going to the small boxes and the global path planning a path that the local costmap does not allow completion of. lidarnav_toboxes.mp4Second video just goes towards the plane. lidarnav_toplane.mp4third video i made the laser scan thicker to show the scanned points better: lidarnav_tostart.mp4 |
summarized with claude: (I tested with confirming local costmap matches and running the click to navigate objective. It was also helpful to watch the mujoco viewer, rviz, and add temporary boxes. I increased to the 3 degree beam spacing after performance did not seem to be an issue )
Summary
This PR adds obstacle detection to the hangar_sim local and global costmaps, which previously had no
active sensors feeding Nav2. The nav2 config was referencing a non-existent
/left_camera/pointspointcloud, so obstacles were never detected during navigation.
Changes
Added dual 270° planar lidars to the Ridgeback MJCF (
description/ur5e_ridgeback.xml)pos="0.45 0 0.15")pos="-0.45 0 0.15")<size nuser_sensor="6"/>required by the MuJoCo lidar pluginAdded
script/scan_mirror_fix.pylidar_front_ROS/lidar_rear_ROSTF frames with RPY [180°, 0°,0°] relative to
ridgeback_base_link, which flips the Y-axis and causes obstacles to appear mirroredleft↔right in the costmap
rangesarray in the/scanmessage and republishes as/scan_mirrored,mathematically cancelling the TF sign flip
Added
params/laser_filter_params.yamlLaserScanAngularBoundsFilterkeeping only beams within ±93° (±1.6231 rad)Updated
params/nav2_params.yamlvoxel_layer(3D point cloud plugin, wrong type for LaserScan) withobstacle_layerin both local and global costmaps/left_camera/points→/scan_filteredobstacle_layer + inflation_layer, rolling 10×10m windowstatic_layer + obstacle_layer + inflation_layerbest_effortto match MuJoCo'sSensorDataQoSpublisherUpdated
launch/sim/robot_drivers_to_persist_sim.launch.pyscan_mirror_fixnode (/scan→/scan_mirrored)laser_angular_filternode (/scan_mirrored→/scan_filtered)Updated
CMakeLists.txtandpackage.xmlscan_mirror_fix.pyas an executablelaser_filtersexec dependencyUpdated
description/hangar_scene.xmltimestepfrom0.02to0.01for physics stabilityScan pipeline
Test plan
ros2 launch moveit_studio_agent agent_robot.launch.xml/scanis published at expected rate:ros2 topic hz /scan/scan_filteredis published:ros2 topic hz /scan_filteredmirroring)