ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    voxl-cam-ros

    Software Development
    5
    12
    890
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • modaltbM
      modaltb ModalAI Team
      last edited by

      Using this as reference: https://docs.modalai.com/voxl-cam-ros/

      These scripts use some environment variables that have tripped me up before, for tracking:

      https://gitlab.com/voxl-public/voxl-cam-ros/-/blob/master/launch/tracking.launch#L7

      Can you run voxl-env show ?

      TRACKING_CAM_IDneeds to match that of the launch file.

      You can use voxl-configure-cameras to modify if needed.

      1 Reply Last reply Reply Quote 0
      • V
        vaughanje
        last edited by

        The content of voxl-env show is:

        ROS_MASTER_URI=http://localhost:11311/
        ROS_IP=192.168.8.1
        CAM_CONFIG_ID=2
        HIRES_CAM_ID=-1
        TRACKING_CAM_ID=0
        STEREO_CAM_ID=-1
        TOF_CAM_ID=-1
        

        This was after running voxl-configure-cameras to change to the tracking camera only configuration. However, given that the camera is connected to J2, should I use the hires camera? I'm basing this question on the information here:

        https://docs.modalai.com/voxl-flight-quickstart/

        which reports the J2 connector as the hires camera. Should I use a hires camera configuration? I have tried both without success, but if I'm asking to make sure that I do have the correct camera configuration. That would help me narrow the issue on my side.

        James StrawsonJ 1 Reply Last reply Reply Quote 0
        • Chad SweetC
          Chad Sweet ModalAI Team
          last edited by Chad Sweet

          When you look at the RTSP stream, is it in color? Trying to understand what setup you have. The config implies you have a single, high-resolution camera connected. Since voxl-rtsp is working, the camera is working. It looks like if you have voxl-cam-ros use camera ID 1, it should work

          1 Reply Last reply Reply Quote 0
          • V
            vaughanje
            last edited by

            Yes. I get color images from the RTSP stream.

            We do currently only have a single camera, connected to J2.

            1 Reply Last reply Reply Quote 0
            • James StrawsonJ
              James Strawson ModalAI Team @vaughanje
              last edited by

              @vaughanje

              voxl-configure-cameras doesn't have a hires-only option but option #4 (hires + tracking) should work for you. Any option that sets the HIRES_CAM_ID to 0 which will be it's index if it's the only camera connected. You also need to make sure the "ROS_IP" variable is set correctly in ~/my_ros_env.sh otherwise roscore will fail to start and no nodes will start. That's just a fun feature of ROS that it needs to know its own IP address before starting even when only running nodes locally.

              After running voxl-configure-cameras or updating ~/my_ros_env.sh make sure to refresh the new bash environment variables with "exec bash"

              The ROS node needs to be run in either master mode if running alone, or slave mode if the rtsp streamer was started first. The ROS node cannot be started before the RTSP stream. The command to launch the hires cam in master mode is:

              roslaunch voxl_cam_ros hires.launch
              OR
              roslaunch voxl_cam_ros hires_color.launch

              To run as slave:
              roslaunch voxl_cam_ros hires.launch is_cam_master:=false
              OR
              roslaunch voxl_cam_ros hires_color.launch is_cam_master:=false

              Regards,
              James

              1 Reply Last reply Reply Quote 0
              • V
                vaughanje
                last edited by

                Thanks for the help.

                I reverted to using the hires + tracking option. So, the current output of voxl-env show is:

                ROS_MASTER_URI=http://localhost:11311/
                ROS_IP=192.168.8.1
                CAM_CONFIG_ID=4
                HIRES_CAM_ID=0
                TRACKING_CAM_ID=1
                STEREO_CAM_ID=-1
                TOF_CAM_ID=-1
                

                The RTSP stream is running, so I used the is_cam_master:=false version of the suggested roslaunch commands. There is a pause between libcam.dump.dir /data/misc/camera/dumps and ERROR: could not open camera subscriber for cam id 0.

                SUMMARY
                ========
                
                PARAMETERS
                 * /hires/voxl_cam_nodelet/cam_id: 0
                 * /hires/voxl_cam_nodelet/cam_name: hires
                 * /hires/voxl_cam_nodelet/format: 1
                 * /hires/voxl_cam_nodelet/frame_id: hires_frame
                 * /hires/voxl_cam_nodelet/frame_rate: 15
                 * /hires/voxl_cam_nodelet/height: 1080
                 * /hires/voxl_cam_nodelet/is_cam_master: False
                 * /hires/voxl_cam_nodelet/skip_n_frames: 0
                 * /hires/voxl_cam_nodelet/width: 1920
                 * /hires/voxl_cam_nodelet/yuv_remap: yuv422
                 * /rosdistro: indigo
                 * /rosversion: 1.11.21
                
                NODES
                  /hires/
                    hires_nodelet_manager (nodelet/nodelet)
                    voxl_cam_nodelet (nodelet/nodelet)
                
                auto-starting new master
                process[master]: started with pid [4890]
                ROS_MASTER_URI=http://localhost:11311/
                
                setting /run_id to da98c2d4-1dd3-11b2-913f-ec5c68cd238b
                process[rosout-1]: started with pid [4903]
                started core service [/rosout]
                process[hires/hires_nodelet_manager-2]: started with pid [4916]
                process[hires/voxl_cam_nodelet-3]: started with pid [4921]
                [ INFO] [764.624133042]: Initializing nodelet with 4 worker threads.
                [ INFO] [764.819000074]: SnapCamDriver Starting
                [ INFO] [764.819231792]: Monotonic offset: 1.670465990
                libcam.enable.publish  1
                libcam.enable.publish.dump 0
                libcam.publish.buffer.policy max
                libcam.publish.buffer.max 3
                libcam.debug.level info
                libcam.dump.dir /data/misc/camera/dumps
                ERROR: could not open camera subscriber for cam id 0
                [ERROR] [781.824676109]: CameraManager::Initialize() failed
                [ERROR] [781.825179598]: Unable to open camera.
                

                Any ideas?

                1 Reply Last reply Reply Quote 0
                • Chad SweetC
                  Chad Sweet ModalAI Team
                  last edited by

                  Can you try the camera-test app? See if you can find a camera ID that enumerates as high-res. Maybe it's not actually located at ID 0 (the ID can change based on which cameras are connected)

                  1 Reply Last reply Reply Quote 0
                  • V
                    vaughanje
                    last edited by vaughanje

                    Running camera-test gives:

                    num_cameras = 1
                    Testing camera id=0
                    Segmentation fault
                    
                    1 Reply Last reply Reply Quote 0
                    • Chad SweetC
                      Chad Sweet ModalAI Team
                      last edited by

                      It seems voxl-rtsp cannot run concurrently with voxl-cam-ros. We are working on a new camera-server to fan out the cameras more consistently, but that is probably a month away.

                      voxl-cam-ros uses libCamera which does support multiple clients of the same camera. It would be possible to write an rtsp server using the built in live555 and libCamera that would work concurrently with voxl-cam-ros.

                      Otherwise it seems in the meantime you will need to disable voxl-rtsp to get voxl-cam-ros to work

                      1 Reply Last reply Reply Quote 0
                      • V
                        vaughanje
                        last edited by

                        Sorry for the slight delay. I was finally able to get back to this this morning. Killing voxl-rtsp fixed this issue. voxl-cam-ros will launch without issue. Thank you for the help.

                        P 1 Reply Last reply Reply Quote 0
                        • P
                          ptaylor1234 @vaughanje
                          last edited by

                          @vaughanje I am with you up until this point, but I can't figure out how to kill voxl-rtsp. what command did you use for that?

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Powered by NodeBB | Contributors