Open TorBorve opened 1 year ago
this is normal? it need input?
Hi,
Yes it is normal to get the "Waiting for twist message..." if a twist topic is not provided to the mpc. Make sure that there is a active twist topic and that the topic name is the same as in the .yaml file used to load params.
In the second case you run the program using ros2 run
this will not work since the code expects to be provided with parameters. Therefore, you should run the program using ros2 launch
. Please see documentation.
Hope this helps!
I ran this launch file. There should be data in this global path topic, but I did not find the data in rviz.should l do something others
If you still have the warning "waiting for twist message" in the console this is expected. The mpc is unable to start running without having information about the velocity of the car. This is given using a twist topic. Please make sure that ros2 topic echo <your_twist_topic>
prints valid data.
l tried
I defined a topic data myself, but there is still no data
is there something wrong with my code
Is this test data invalid?
Even if that works the data the mpc gets does not make sense since it will be the same no matter what it does. You should not publish data that is not from a simulator or real world sensors.
I recommend using this simulator to test the mpc. This is what I have been using myself. I recommend using the single_vehicle_example.launch
file when running the simulator. Make sure you use the ros2 branch of audibot. What you would do is first run ros2 launch audibot_gazebo single_vehicle_example.launch.py
, and then run ros2 launch mpc_local_planner mpc.launch.py
in a different terminal.
strangeness
Seems like there is something wrong with loading the xacro files. Please search on the internet for solutions and refere to the issue on the audibot github. Make sure you have followed the necessary steps to set up gazebo with ros2.
I believe I also had this problem, however I can't seem to remember how I fixed it. Please check that ros-humble-xacro
is installed on your system. This can be installed using sudo apt install ros-humble-xacro
Change "humble" to whatever ros2 version you are running.
l tried,another question arises,thanks for you answer
I'm not sure if this is a big problem. Perhaps you can ignore the warnings. Please do one step at a time. First make sure that the audibot simulator works. You can do this by running the launch file and checking that the car shows up in the simulator. You can also check if the car move by manually publishing a throttle command using ros2 topic pub /throttle_cmd example_interfaces/msg/Float64 "data: 1.0"
. If this works then you can move on to testing the mpc. You do this by closing audibot and rerunning it and then running the mpc launch file. Hope this helps.
it was a big problem ,
the car can not move,Is it related to the version?
l give up.thanks a lot
Choose between using twist and odom topics