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

Fix Indexing Error in Filter.py #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JDaniel41
Copy link

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: '_'

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.
@GradyM2M
Copy link

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

@JDaniel41
Copy link
Author

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

@GradyM2M
Copy link

GradyM2M commented May 4, 2021

@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!

@JDaniel41
Copy link
Author

@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.

@GradyM2M
Copy link

GradyM2M commented May 5, 2021

@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?

@JDaniel41
Copy link
Author

What's the error you are getting? @GradyM2M

@GradyM2M
Copy link

GradyM2M commented May 6, 2021

@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?

@phoenixrider12
Copy link

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

@phoenixrider12
Copy link

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.

@GradyM2M
Copy link

GradyM2M commented Jun 3, 2022

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

@phoenixrider12
Copy link

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

@GradyM2M
Copy link

GradyM2M commented Jun 3, 2022

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

@phoenixrider12
Copy link

phoenixrider12 commented Jun 3, 2022

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
Copy link

Nothing gets published on topics /frontiers and /centroids also

@GradyM2M
Copy link

GradyM2M commented Jun 4, 2022

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.

@phoenixrider12
Copy link

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
Copy link

@JDaniel41 do you know what is the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants