-
Notifications
You must be signed in to change notification settings - Fork 23
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 cam name var #105
Merged
Merged
Fix cam name var #105
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
67f9c50
making spawn changes and adding double handed cargo
marinagmoreira 719b744
Merge branch 'develop' of github.com:nasa/isaac into develop
marinagmoreira 58176a9
Merge branch 'develop' of github.com:nasa/isaac into develop
marinagmoreira 717fb29
fixing bug where cam_name wasn't initialized
marinagmoreira 589f98f
adding things from review and some bugfixes
marinagmoreira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -34,10 +34,9 @@ namespace inspection { | |||||
the camera frame and the other way around. It automatically reads the camera parameters | ||||||
from the config files based on the camera name, such that no setup is necessary. | ||||||
*/ | ||||||
CameraView::CameraView(const camera::CameraParameters & params, const float f, const float n, | ||||||
CameraView::CameraView(const std::string cam_name, const camera::CameraParameters& params, const float f, const float n, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const geometry_msgs::Transform::ConstPtr cam_transform) | ||||||
: camera::CameraModel(params), f_(f), n_(n) { | ||||||
|
||||||
: cam_name_(cam_name), camera::CameraModel(params), f_(f), n_(n) { | ||||||
// Get relative camera position | ||||||
if (cam_transform == NULL) { | ||||||
// Create a transform buffer to listen for transforms | ||||||
|
@@ -147,7 +146,7 @@ bool CameraView::InsideTarget(std::vector<int> vert_x, std::vector<int> vert_y, | |||||
double size_y) { | ||||||
// Create depth cam camera model | ||||||
static camera::CameraParameters depth_cam_params(&cfg_cam_, (depth_cam_name + "_cam").c_str()); | ||||||
CameraView depth_cam(depth_cam_params, f_, n_); | ||||||
CameraView depth_cam(depth_cam_name, depth_cam_params, f_, n_); | ||||||
|
||||||
// Get most recent depth message | ||||||
std::string cam_prefix = TOPIC_HARDWARE_PICOFLEXX_PREFIX; | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -215,7 +215,7 @@ int main(int argc, char** argv) { | |||||
new geometry_msgs::Transform(msg_conversions::eigen_transform_to_ros_transform(transform_body_to_cam))); | ||||||
|
||||||
camera::CameraParameters cam_params(&config, camera_name.c_str()); | ||||||
inspection::CameraView camera(cam_params, 2.0, 0.19, msg_pointer); | ||||||
inspection::CameraView camera(camera_name.c_str(), cam_params, 2.0, 0.19, msg_pointer); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(Converting to |
||||||
camera.SetTransform((msg_conversions::ros_pose_to_eigen_transform(ground_truth) * transform_body_to_cam).inverse()); | ||||||
|
||||||
|
||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Usually better to pass
std::string
as ref to avoid unnecessary extra copy, also style consistency of including the argument name.)