ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Unable to initialize NDT localizer in AVP demo

asked 2021-08-06 00:11:17 -0500

akshata4315@gmail.com gravatar image

updated 2021-08-10 01:04:38 -0500

Hi, We are trying to run the AVP demo. Following the document https://autowarefoundation.gitlab.io/... with lgsvl. We are running autoware stack and simulator on different machines. The steps that we followed

1.Lgsvl simulator is run in a different machine outside ade(The version of lgsvl image inside ade is old 2020.06, we are unable to create simulation with that)

2.Created a simulation with autonomousparking map and IP address of the autoware machine in the bridge address.

3.On the other machine the visualization file is launched "autoware_auto_visualization.launch.py", RVIZ opens up.

4.After running "avp_sim.launch.py" the map and vehicle are loaded.

5.The vehicle in RVIZ is spawned at a different position, when I try to set the initial position of the vehicle in RVIZ with that of in simulator with 2D pose estimate, the position of the vehicle is not getting localized.

The vehicle in RVIZ does not seem to follow the ego-vehicle movement in simulator.

6.When I try to set the initial pose for the ego-vehicle in RVIZ with 2D pose estimate, as shown in the document https://autowarefoundation.gitlab.io/..., I can see the initial position coordinates of the vehicle are getting logged into RVIZ terminal, and I am even getting the coordinates as output for the "ros2 topic echo /localization/initialpose"

But vehicle in RVIZ does not seems to follow vehicle movement in simulator

7.On the bridge connection from lgsvl to Autoware,which bridge should we use the lgsvl-bridge or the ros-bridge that is launched by "autoware_auto_visualization.launch.py".There is a conflict, I can not run both the bridges simultaneously,

and also I observed that the lgsvl simulator gets connected to lgsvl-bridge on autoware machine properly,but when ros-bridge is open instead of lgsvl-bridge the bridge-status in simulator will be "connected" until play button is clicked in simulator, once the play button the clicked bridge-status changes to disconnected.

Please Help me to run this demo successfully. Thank you

edit retag flag offensive close merge delete

Comments

Can you confirm this?

In your Rviz > In display tab> Global options> Fixed Frame> is set to map?

If yes, then I think you need to provide more details, for example, the behavior of the program, errors, screen short, etc.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-08-06 06:01:57 -0500 )edit

Yes fixed frame is set to map

akshata4315@gmail.com gravatar image akshata4315@gmail.com  ( 2021-08-06 22:18:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-06 14:01:07 -0500

Vini71 gravatar image

updated 2021-08-06 17:47:15 -0500

Hi Marcus here again. I answered you on Autoware forum...I also failed to execute the AVP demo this time. I am very confident that the reason is:

1 - The AVP demo just works with the LGSVL internal simulator (on ade): https://autowarefoundation.gitlab.io/...

I am also trying to execute with newer SVL releases outside docker image and running the lgsvl bridge...but does not work because from the autoware_demos avp_sim.launch.py file, if you open it you will check in the function below that the file param/avp/vehicle_characteristics_sim.param.yaml is called:

def generate_launch_description():
    """
    Launch all nodes defined in the architecture for Milestone 3 of the AVP 2020 Demo.

    More details about what is included can
    be found at https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto/-/milestones/25.
    """
    avp_demo_pkg_prefix = get_package_share_directory('autoware_demos')
    autoware_launch_pkg_prefix = get_package_share_directory('autoware_auto_launch')

    lgsvl_param_file = os.path.join(
        autoware_launch_pkg_prefix, 'param/lgsvl_interface.param.yaml')

    map_publisher_param_file = os.path.join(
        avp_demo_pkg_prefix, 'param/avp/map_publisher_sim.param.yaml')
    ndt_localizer_param_file = os.path.join(
        avp_demo_pkg_prefix, 'param/avp/ndt_localizer_sim.param.yaml')
    mpc_param_file = os.path.join(
        avp_demo_pkg_prefix, 'param/avp/mpc_sim.param.yaml')
    pc_filter_transform_param_file = os.path.join(
        avp_demo_pkg_prefix, 'param/avp/pc_filter_transform.param.yaml')
    vehicle_characteristics_param_file = os.path.join(
        avp_demo_pkg_prefix, 'param/avp/vehicle_characteristics_sim.param.yaml')

    urdf_pkg_prefix = get_package_share_directory('lexus_rx_450h_description')
    urdf_path = os.path.join(urdf_pkg_prefix, 'urdf/lexus_rx_450h.urdf')
    with open(urdf_path, 'r') as infp:
        urdf_file = infp.read()

HOWEVER you can search for this file inside the autoware_demos/avp/param folder and you won't find it! I also did not find this file inside the Autoware repository. Therefore when I opened rviz2 (following the tutorial) I had the errors you had ( Lookup Transform error, urdf icon was red, etc....the map does not appear colorful...). Well I used this software months ago and I remember it just works fine for the "on ade internal docker simulator". I fixed somethings to make it work externally, but for 2020.06 version and I forgot which topics I needed to change on JSON vehicle configuration file...


An UPDATE

I have already tried again, you are right LGSVL does not allow the use of the old simulator version inside docker... So going ahead to step 2: I have runned the ndt localizer successful (but accidentaly). The steps are. You must use 4 terminals. And you must run in the following order to make it work

1- Terminal ONE: run the lgsv-bridge in a terminal

2 - Run this command (it will help mitigate the TF error, urdf error:

ros2 run tf2_ros static_tranform_publisher 1 0 0 0 0 0 map base_link

3 - Run the other launch file "autoware_demos avp_sim.launch"

4 - Run the launch file called "autoware_auto_launch visualization.py..." something like that

(I know the tutorial tell to run in other way but does not work)

Ok If you have lucky and/or a powerful computer the Transform will work fine as well as the localization (ndt localizer). My issue is that after do this I couldn't run the planner. The car didn't get the path planner output to send to the control commands ... (more)

edit flag offensive delete link more

Comments

Thanks, sure will let you know ,Once I solve it

akshata4315@gmail.com gravatar image akshata4315@gmail.com  ( 2021-08-10 01:19:33 -0500 )edit

Hi It seems they have solved one of the main reasons (the bridge) of the AVP demo fails: https://gitlab.com/autowarefoundation...

I will try this later when I have more free time...if you do before, please share a tutorial to re-run this AVP demo easily with the new SVL release (hahahaha I have to use for my master thesis)...just a youtube video, or simple tutorial step-by-step if you don't mind,,,Thanks!

Vini71 gravatar image Vini71  ( 2021-08-13 16:39:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-08-06 00:11:17 -0500

Seen: 289 times

Last updated: Aug 10 '21