rrt_exploration icon indicating copy to clipboard operation
rrt_exploration copied to clipboard

Fix Indexing Error in Filter.py

Open JDaniel41 opened this issue 4 years ago • 17 comments

When looking for the global_costmap_topics, I noticed that it would point towards the wrong index in the topic name thus not pulling down the robot's index number. This solution fixes that by shifting litraIndx one to the right.

Original Error

[ERROR] [1600985292.579831, 0.000000]: bad callback: <function globalMap at 0x7f3d5ab575d0>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/jmdanie/catkin_ws/src/rrt_exploration/scripts/filter.py", line 45, in globalMap
    [litraIndx])-namespace_init_count
ValueError: invalid literal for int() with base 10: '_'

[ERROR] [1600985292.580379, 0.000000]: bad callback: <function globalMap at 0x7f3d5ab575d0>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/jmdanie/catkin_ws/src/rrt_exploration/scripts/filter.py", line 45, in globalMap
    [litraIndx])-namespace_init_count
ValueError: invalid literal for int() with base 10: '_'

JDaniel41 avatar Sep 24 '20 22:09 JDaniel41

@JDaniel41 Hi, JDaniel41, Have you successfully run this package under the ROS melodic?

GradyM2M avatar Apr 30 '21 08:04 GradyM2M

I have been able to run this under ROS Melodic. @GradyM2M

JDaniel41 avatar May 03 '21 14:05 JDaniel41

@JDaniel41 I want to do similar work. But the code downloaded from the author does not work under ROS melodic. Could you share your code with me? Thank you!

GradyM2M avatar May 04 '21 08:05 GradyM2M

@GradyM2M Have you tried checking out my branch? It contains the version of the package I used for my project. If you check it out, I think it should work with Melodic.

JDaniel41 avatar May 04 '21 18:05 JDaniel41

@JDaniel41 Hi, I have checked out your branch "patch-1", but it still doesn't work. Do you have any good method to solve it?

GradyM2M avatar May 05 '21 08:05 GradyM2M

What's the error you are getting? @GradyM2M

JDaniel41 avatar May 05 '21 14:05 JDaniel41

@JDaniel41 When I run roslaunch rrt_exploration_tutorials multiple_simulated_house.launch, The TF is having no connected from robot_/odom to robot_/base_footprint correct. And when I run roslaunch rrt_exploration three_robots.launch, the three robots did not move?

GradyM2M avatar May 06 '21 01:05 GradyM2M

Hey @GradyM2M , is your issue solved? I am also facing same issue on ROS melodic, the robots are not moving.

phoenixrider12 avatar Jun 03 '22 06:06 phoenixrider12

frames In my case, the TF is correct I think. But nothing gets printed on terminal after "the map and global costmaps are received ". What I have figured out is that nothing gets published on "/detected_points" topic.

phoenixrider12 avatar Jun 03 '22 07:06 phoenixrider12

@phoenixrider12 Hi, I have solved the issue and you can compile the package: (https://github.com/GradyM2M/multi_rrt_exploration). 1 2 3

GradyM2M avatar Jun 03 '22 08:06 GradyM2M

It's not working for me. The same issue occurs with this package also

phoenixrider12 avatar Jun 03 '22 11:06 phoenixrider12

@phoenixrider12 What's the error you are getting? Is there any error message on the terminal?

GradyM2M avatar Jun 03 '22 11:06 GradyM2M

Nothing gets printed on terminal after "the map and global costmaps are received". What I have figured out is that nothing gets published on "/detected_points" topic.

phoenixrider12 avatar Jun 03 '22 11:06 phoenixrider12

Nothing gets published on topics /frontiers and /centroids also

phoenixrider12 avatar Jun 04 '22 07:06 phoenixrider12

Nothing gets published on topics /frontiers and /centroids also

I think it may be caused by incomplete installation of some dependencies. Specifically, check whether slam-gmapping, move-base, map-server, navigation and other functional packages are installed.

GradyM2M avatar Jun 04 '22 18:06 GradyM2M

The navigation, gmapping and all is working fine. The global_detector and local_detector are not publishing anything on topic /detected_points. For every iteration in the main loop, the value of the variable "checking" is coming out to be 0 and sometimes 1 in between but never -1. I have also tried increasing and decreasing the values of eta and Geta by 4 times but it's not making any difference. What is the reason for that? Here is the rqt_graph rosgraph

phoenixrider12 avatar Jun 05 '22 11:06 phoenixrider12

@JDaniel41 do you know what is the problem?

phoenixrider12 avatar Jun 06 '22 05:06 phoenixrider12