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

ros_train.py: error: unrecognized arguments: ros_nerfacto #4

Closed
cchester25 opened this issue May 26, 2023 · 18 comments
Closed

ros_train.py: error: unrecognized arguments: ros_nerfacto #4

cchester25 opened this issue May 26, 2023 · 18 comments

Comments

@cchester25
Copy link

Hello, I have started the SLAM algorithm and played back the rosbag with images. Then, I entered the command 'python ros_train.py ros_nerfacto --data /home/pf/CODE/NERF/nerf_bridge/nsros_config_sample.json', but I received an error message saying 'ros_train.py: error: unrecognized arguments: ros_nerfacto'. The image publishing frequency is 15Hz and the odometry frequency is 10Hz. Also, I have modified the camera intrinsic parameters and topics accordingly in the json file.May I know what are the possible solutions to this issue? Thank you!
图片

@cchester25
Copy link
Author

"When running the command 'python ros_train.py --data /home/pf/CODE/NERF/nerf_bridge/nsros_config_sample.json' without adding 'ros_nerfacto', the code can be started, but it cannot subscribe to the image topic I published. The published topic exists and has data, and the topic name in the JSON file is consistent with the published one. What could be the reason for this?"

@javieryu
Copy link
Owner

I'll have a look at the first part to make sure that everything is setup correctly to call the appropriate method names. As for the topic not subscribing, does the nerfbridge node time out, or is there some other behavior happening? Can you give a little more insight into the system that you are using? If your images and poses are not time synchronized then you may have to make some modifications to the nerfbridge code. I'm planning to add this as a feature when I convert the repository to ROS2.

@cchester25
Copy link
Author

I'll have a look at the first part to make sure that everything is setup correctly to call the appropriate method names. As for the topic not subscribing, does the nerfbridge node time out, or is there some other behavior happening? Can you give a little more insight into the system that you are using? If your images and poses are not time synchronized then you may have to make some modifications to the nerfbridge code. I'm planning to add this as a feature when I convert the repository to ROS2.

"I am using Ubuntu 20.04 with CPU-17-13 generation and GPU-3090ti, CUDA11.8, ROS-Noetic. Additionally, our image and pose frequencies are the same, with image topic at 15hz and pose topic also at 15hz. Below is the output during runtime, which shows that it is waiting for images."
图片

@cchester25
Copy link
Author

"I solved the issue of 'ros_nerfacto' not being recognized by modifying the command line: 'python ros_train.py --method_name ros_nerfacto --data /home/pf/CODE/NERF/nerf_bridge/nsros_config_sample.json'. You should add '--method_name' before 'ros_nerfacto'."

@javieryu
Copy link
Owner

Okay, so this sounds like a problem with the time synchronization in the nerfbridge ros node. This node subscribes to the pose and image topics and then converts them to the coordinate frame convention of Nerfstudio and inserts them in a pytorch dataset. The problem is that this node expects that the images and poses come in pairs with the same time stamp.

It sounds like in your case you have images and poses that do not have matching time stamps so you'll need to make changes to nsros/ros_dataloader.py. You could use an ApproximateTimeSynchronizer from message_filters see http://wiki.ros.org/message_filters#ApproximateTime_Policy.

@cchester25
Copy link
Author

Okay, so this sounds like a problem with the time synchronization in the nerfbridge ros node. This node subscribes to the pose and image topics and then converts them to the coordinate frame convention of Nerfstudio and inserts them in a pytorch dataset. The problem is that this node expects that the images and poses come in pairs with the same time stamp.

It sounds like in your case you have images and poses that do not have matching time stamps so you'll need to make changes to nsros/ros_dataloader.py. You could use an ApproximateTimeSynchronizer from message_filters see http://wiki.ros.org/message_filters#ApproximateTime_Policy.
My image and posestamped timestamps are now consistent, but nerf-bridge still can't work properly, and it's stuck at the waiting for data stage.
图片

@joejep
Copy link

joejep commented Aug 27, 2023

I hav

Okay, so this sounds like a problem with the time synchronization in the nerfbridge ros node. This node subscribes to the pose and image topics and then converts them to the coordinate frame convention of Nerfstudio and inserts them in a pytorch dataset. The problem is that this node expects that the images and poses come in pairs with the same time stamp.

It sounds like in your case you have images and poses that do not have matching time stamps so you'll need to make changes to nsros/ros_dataloader.py. You could use an ApproximateTimeSynchronizer from message_filters see http://wiki.ros.org/message_filters#ApproximateTime_Policy.
I am having issues with the subcriber node of Orbslam2. You didnt write thee code that creates the topic.

@javieryu
Copy link
Owner

I've updated the documentation to solve this issue, and it will be merged with main once I've finished migrating to ROS2.

@joejep
Copy link

joejep commented Sep 10, 2023

I would like to know if you have finished migrating ros2. For ros1 I couldn’t get the orslam topics

@javieryu
Copy link
Owner

javieryu commented Sep 10, 2023

@eiyike123 It's still experimental, but yes, see the ros2 branch.

@joejep
Copy link

joejep commented Sep 10, 2023

Will it work so that I can switch to
It. What about the orbslam

@javieryu
Copy link
Owner

Will it work so that I can switch to It. What about the orbslam

Since it's still experimental, I am not sure!

@Eric-Ho-Matrix
Copy link

Well, sorry to comment under a closed question but I have two questions highly related to this topic.

  1. I also got the question that NSROS keep waiting for image streaming. Any detailed solution to this question?
  2. Indeed, my image topic and pose topic publish as 30 Hz and 15 Hz, respectively. I know this definitely cause problem. Do you have any detailed solution to solve this. I noticed you mentioned message_filter, is there any other way to fix this?

To be clear, I use realsense d455 and Vins-fusion to get image and pose, respectively.

@joejep
Copy link

joejep commented Sep 11, 2023

Well, sorry to comment under a closed question but I have two questions highly related to this topic.

  1. I also got the question that NSROS keep waiting for image streaming. Any detailed solution to this question?
  2. Indeed, my image topic and pose topic publish as 30 Hz and 15 Hz, respectively. I know this definitely cause problem. Do you have any detailed solution to solve this. I noticed you mentioned message_filter, is there any other way to fix this?

To be clear, I use realsense d455 and Vins-fusion to get image and pose, respectively.

Are you using ros1 or ros2

@Eric-Ho-Matrix
Copy link

Well, sorry to comment under a closed question but I have two questions highly related to this topic.

  1. I also got the question that NSROS keep waiting for image streaming. Any detailed solution to this question?
  2. Indeed, my image topic and pose topic publish as 30 Hz and 15 Hz, respectively. I know this definitely cause problem. Do you have any detailed solution to solve this. I noticed you mentioned message_filter, is there any other way to fix this?

To be clear, I use realsense d455 and Vins-fusion to get image and pose, respectively.

Are you using ros1 or ros2

I'm using ros1 with ubuntu noetic.

@joejep
Copy link

joejep commented Sep 11, 2023

And vin fusion publishes the pose of the images received

@javieryu
Copy link
Owner

@Eric-Ho-Matrix Please open a new issue with a description of your problem, and I'd be happy to help you figure this out.

@Eric-Ho-Matrix
Copy link

@Eric-Ho-Matrix Please open a new issue with a description of your problem, and I'd be happy to help you figure this out.

Sure! just open a new issue. Thanks for the help.

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

No branches or pull requests

4 participants