-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implementing joint state publishing for 3d #10
base: master
Are you sure you want to change the base?
Conversation
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.
Not done reviewing (need to consider your class structure some more) but there are enough things here to address for now.
An additional note: in general, when using other people's work, it should be referenced. Include a link to the repo where you got the URDFs from in your readme.
robot_calibration_3d/include/robot_calibration_3d/joint_state_publisher.h
Outdated
Show resolved
Hide resolved
robot_calibration_3d/include/robot_calibration_3d/joint_state_publisher.h
Show resolved
Hide resolved
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.
Most requested changes are related to restructuring your class. Let me know if you have any questions about the motivation for doing this, or if anything isn't clear.
robot_calibration_3d/include/robot_calibration_3d/joint_state_publisher.h
Outdated
Show resolved
Hide resolved
last_update_time_ += state_update_interval_duration; | ||
|
||
// update count to return | ||
count++; |
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.
I'm not seeing any reason for this to be tracked outside of the class; especially as the number of joint angle updates we want overall is stored in the class. Instead, make this a private class variable that you can update every time an update is made. Update this function to have return type void and take no input arguments.
ros::Rate loop_rate(10); | ||
|
||
// start counting updates | ||
int count = 0; |
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.
See comment in joint_state_publisher.cpp
about moving this there instead.
// fill array with 6 new random angles | ||
// TODO: retrieve angle limits from URDF, rather than hardcoding limits as is done in this function |
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.
Move these comments to the updateJointStateMessage function, for greater clarity.
@@ -0,0 +1,89 @@ | |||
<?xml version="1.0"?> | |||
<robot xmlns:xacro="http://wiki.ros.org/xacro"> | |||
<xacro:include filename="$(find fanuc_resources)/urdf/common_colours.xacro"/> |
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.
Currently looking for the fanuc_resources package. Update to robot_calibration_3d
joint_states_message_.name.push_back("joint_" + std::to_string(i)); | ||
|
||
// initialise the joint state array of the message with random values for first update | ||
// TODO: retrieve angle limits from URDF, rather than hardcoding limits as is done in this function |
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.
Same comment as below; this comment should be moved to the function, so you don't have to duplicate this comment every time you use this function.
No description provided.