在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):sundermann/camera_localization开源软件地址(OpenSource Url):https://github.com/sundermann/camera_localization开源编程语言(OpenSource Language):C++ 82.4%开源软件介绍(OpenSource Introduction):Camera localizationCamera localization using aruco markers. SetupWe installed three cameras on the ceiling facing downwards to the map surface. These cameras are connected to one computer which is responsible for providing the localization for all the cars. Each car has its own unique aruco marker (4x4_50, 9 cm) and aruco markers (6x6_250) are placed onto the map surface. Each camera has to see at least four aruco markers on the floor of which their world coordinates are known. The cameras should be installed so that they overlap each other a bit so that the marker on the car can be seen at all times by at least one camera. Creating the aruco markersInside the scripts folders there are two python scripts for creating the car and map surface markers. Run each script using python and provide an unique id:
This will create two image files for the car marker 11 and map marker 11. The map surface markers should be printed on a single A4 paper with a edge length of about 24 cm whilst four car markers should be printed onto a single A4 paper with an edge length of about 9 cm. When cutting the markers you should keep as much whitespace around the markers because that is needed for the detection to work. RunningThe RoboticsLabLocalization.launch launch file will run everything needed for the localization. The multimaster communication needs
Checking the localizationRun rviz and check if the tf frames of each camera has been positioned correctly. Place a camera onto the map surface and check if the tf frame MultimasterThe localization node is designed to run on a separate computer with its own roscore. The ros package multimaster_fkie is used to send the localization information to the individual roscores on the cars. Connecting to the localization computer on the carStart the master_discovery and master_sync node from the ros-multimaster-fkie package:
Launchfile to connect only to the localization host
ConfigurationConfiguration is done through dynamic reconfigure and launch files. The dynamic reconfigure config contains the parameters for the aruco marker detection which can be adjusted while running the node. Any parameter change will trigger a redection of the markers on the map surface. The static configuration is done through the launch files. Camera.launchRuns the usb_cam camera driver package for three cameras at /dev/video-left, /dev/video-middle and /dev/video-right. The exposure time is set to manual mode with a fairly low value. It is important to set the exposure time as low as possible to avoid motion blur as much as possible. If the camera cannot detect the markers you might have to find better values for exposure time and gain. You can use v4l2ucp to find better parameters for the camera. Each camera runs in its own namespace. These values are valid for Logitech C930e USB cameras and might not work with other cameras or other lighting conditions. You can also use other camera drivers as long as it publishes the camera image (compressed or raw) and the camera calibration information. CameraLocalization.launchRuns a camera_localization node for each camera. Each camera_localization node runs in its own namespace along with the camera driver. SingleCameraLocalization.launchRuns a single camera_localization node. This launch file contains the positions of the markers and the translation of the markers to the rear axle. The world position of each marker center on the map surface should be configured here:
You should replace Since the marker might not be placed at the position of the odometry a translation can be applied to the marker position to the the odometry. In this example we shift the position back in x direction by 20cm and the height by 19 cm which is then the middle of the rear axle at the ground for our cars:
RoboticsLabLocalization.launchRuns all the nodes needed for localization at our lab. It also includes the map_publisher package which publishes an occupancy grid of the map we are using. Multimaster.launchRuns the multimaster_fkie master_discovery node so the cars and detect the computer. Make sure |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论