Skip to content
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

Radar and ROS1 #1747

Open
risk-v opened this issue Sep 11, 2021 · 15 comments
Open

Radar and ROS1 #1747

risk-v opened this issue Sep 11, 2021 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@risk-v
Copy link

risk-v commented Sep 11, 2021

Hi there,

I was wondering if it's possible to use the radar sensor with ROS1. I can see the radar 3D bounding boxes in LGSVL but when I tried "rostopic echo /radar" (/radar is my chosen topic using the Wise interface) the output it's empty. I am using LGSVL 2021.2. Thanks in advance.

image

@MaxandreOgeret
Copy link

Last time I checked radar was not working properly. #1530

@EricBoiseLGSVL
Copy link
Contributor

EricBoiseLGSVL commented Sep 14, 2021

radar is supported, search DetectedRadarObjectData in the code. In RosConversions.cs

public static Lgsvl.DetectedRadarObjectArray RosConvertFrom(DetectedRadarObjectData data)
        {
            var r = new Lgsvl.DetectedRadarObjectArray()
            {
                header = new Ros.Header()
                {
                    stamp = ConvertTime(data.Time),
                    seq = data.Sequence,
                    frame_id = data.Frame,
                },
            };

            foreach (var obj in data.Data)
            {
                r.objects.Add(new Lgsvl.DetectedRadarObject()
                {
                    sensor_aim = ConvertToRosVector3(obj.SensorAim),
                    sensor_right = ConvertToRosVector3(obj.SensorRight),
                    sensor_position = ConvertToRosPoint(obj.SensorPosition),
                    sensor_velocity = ConvertToRosVector3(obj.SensorVelocity),
                    sensor_angle = obj.SensorAngle,
                    object_position = ConvertToRosPoint(obj.Position),
                    object_velocity = ConvertToRosVector3(obj.Velocity),
                    object_relative_position = ConvertToRosPoint(obj.RelativePosition),
                    object_relative_velocity = ConvertToRosVector3(obj.RelativeVelocity),
                    object_collider_size = ConvertToRosVector3(obj.ColliderSize),
                    object_state = (byte)obj.State,
                    new_detection = obj.NewDetection,
                });
            }

            return r;
        }

as for @MaxandreOgeret comment, we are looking into the issue posted.

-edit to swap to the right method LGSVL not Apollo, whoops

@EricBoiseLGSVL EricBoiseLGSVL added the answered Waiting for response label Sep 14, 2021
@PveOnly
Copy link

PveOnly commented Nov 7, 2021

Hi is there some news ? I have the same problem.

@EricBoiseLGSVL
Copy link
Contributor

@PveOnly what issue do you have exactly? Velocity is fixed and in the latest release 2021.3 and ROS1 is supported.
See RadarSensor.cs RosConversions.cs and Lgsvl.cs.

@EricBoiseLGSVL EricBoiseLGSVL added the close soon This issue is solved/out of scope label Nov 8, 2021
@PveOnly
Copy link

PveOnly commented Nov 9, 2021

Hi the issue is when I launch the rosbridge_websocket.launch to retrieve data from the radar I got these error pourring on the INFO tab :
image

I'm using WSL Ubuntu 18.04 and the binary svlsimulator-windows64-2021.3
I have no problem retrieving the LIDAR's data. When I try to retrieve the data from the radar I have no output in my terminal

@EricBoiseLGSVL
Copy link
Contributor

EricBoiseLGSVL commented Nov 10, 2021

Please post the player log so we can see where the error starts. Also any sensor/bridge configs to see how you set the simulation up.

I wonder if the WSL is an issue here but it could be the bridge. Any idea @hadiTab ?

@EricBoiseLGSVL EricBoiseLGSVL added question Further information is requested and removed close soon This issue is solved/out of scope answered Waiting for response labels Nov 10, 2021
@PveOnly
Copy link

PveOnly commented Nov 10, 2021

No problem , here is the Player.log :
Player.log
For this simulation I launched the simulation first then launched my rosbridge during the simulation (like 20 second after)

For the sensor/bridge I used that :
image

with "/radar" as a topics and "radar" as the frame for the radar and "/points_raw" and "velodyne" for the LIDAR on the default Jaguar2015XE

For the bridge with WLS I followed your tutorial (#754). I had some issue but I was able to resolve them

For the lgsvl_msg required for the radar I built from source because I could not install it with sudo apt:
image

@PveOnly
Copy link

PveOnly commented Nov 10, 2021

The rosbridge terminal output when I launch it :
ros_bridge_terminal_output.txt

@EricBoiseLGSVL
Copy link
Contributor

Can you clarify what you mean by built from source the lgsvl_msg? What was the issue?
Are you able to run the provided ROS bridge?
@revati-naik Are you able to reproduce this?

@PveOnly
Copy link

PveOnly commented Nov 11, 2021

The issue is that this line didn't work :
image

image

So I just followed this instead :
image

What is the provided ROS bridge ? The ROS bridge seems to work since I can retrieve data from the LIDAR

@MaxandreOgeret
Copy link

MaxandreOgeret commented Nov 11, 2021 via email

@PveOnly
Copy link

PveOnly commented Nov 11, 2021

Thank you I was able to install it with apt !
I reinitiated my WSL Ubuntu 18.04 installation and reinstalled the bridge then launched a new simulation to check if the problem came from that but unfortunately it didn't solve the problem.

I installed the melodic ros bridge by following these command :
melodic_ros_bridge_install.txt

@EricBoiseLGSVL
Copy link
Contributor

We are looking into why the radar is not publishing, hope to have a solution soon

@EricBoiseLGSVL EricBoiseLGSVL added bug Something isn't working and removed question Further information is requested labels Nov 11, 2021
@PveOnly
Copy link

PveOnly commented Nov 13, 2021

Thanks !

@Ankur02
Copy link

Ankur02 commented Oct 18, 2022

Hi, I am still facing the issue where the /radar_data just gives empty objects. Has there been any resolution to the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants