-
Notifications
You must be signed in to change notification settings - Fork 78
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
Ported the ROS2 fox drivers to ROS1 Noetic #37
base: main
Are you sure you want to change the base?
Conversation
…sage to sensor messages IMU messages to beused by the madgwick fusion ros package
It looks like the CHANGELOG.rst files and copyright/license headers were deleted. Please restore these. |
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.
Looks like a lot of files were MIT's old version. It'll be great if we could only included necessary changes.
vesc_ackermann/CMakeLists.txt
Outdated
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.
This looks like an older version too?
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.
Fixed it.
Another comment is that in the ros2 branch, the imu msg is published by the vesc_driver instead of a separate wrapper. Is there any reason for this change? |
In the case of this noetic branch - |
Additionally, I wanted to ask can we update our names in the list of authors in the package.xml? |
I have reverted all the unnecessary changes to what was there originally. I am not sure what happened there. Please take a look and let me know if there are any more changes. |
Following up on this. |
vesc_ackermann/package.xml
Outdated
<exec_depend>geometry_msgs</exec_depend> | ||
<exec_depend>tf</exec_depend> | ||
<exec_depend>ackermann_msgs</exec_depend> | ||
<exec_depend>vesc_msgs</exec_depend> |
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.
Why did you split all of these out? <depend>
is perfectly valid for Noetic.
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.
Will fix and push the updates!
<arg unless="$(arg debug)" name="launch_prefix" value="" /> | ||
<!-- <arg name="debug" default="false" /> --> | ||
<!-- <arg if="$(arg debug)" name="launch_prefix" value="xterm -e gdb args" /> --> | ||
<!-- <arg unless="$(arg debug)" name="launch_prefix" value="" /> --> |
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.
Remove unused code. git
will keep the history and commenting out unused sections just leads to confusion.
vesc_driver/package.xml
Outdated
<exec_depend>roscpp</exec_depend> | ||
<exec_depend>std_msgs</exec_depend> | ||
<exec_depend>vesc_msgs</exec_depend> | ||
<exec_depend>serial</exec_depend> |
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.
Again, why split these out?
vesc_driver/src/vesc_driver.cpp
Outdated
@@ -73,14 +74,15 @@ VescDriver::VescDriver(ros::NodeHandle nh, | |||
|
|||
// create vesc state (telemetry) publisher | |||
state_pub_ = nh.advertise<vesc_msgs::VescStateStamped>("sensors/core", 10); | |||
imu_pub_ = nh.advertise<vesc_msgs::VescImuStamped>("sensors/imu", 10); | |||
// imu_std_pub_ = nh.advertise<vesc_msgs::VescImuStamped>("sensors/imu/raw", 10); |
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.
Remove commented-out code.
vesc_driver/src/vesc_driver.cpp
Outdated
// std_imu_msg.orientation.w = imuData->q_w(); | ||
// std_imu_msg.orientation.x = imuData->q_x(); | ||
// std_imu_msg.orientation.y = imuData->q_y(); | ||
// std_imu_msg.orientation.z = imuData->q_z(); |
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.
Remove commented-out code.
vesc_driver/src/vesc_driver_node.cpp
Outdated
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY | ||
// WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
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.
Please don't remove copyrights.
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.
Will revert it back. I am not sure why that was removed.
Thanks for pointing that out!
vesc_driver/src/vesc_packet.cpp
Outdated
// int16_t v = static_cast<int16_t>((static_cast<uint16_t>(*(payload_.first + 3)) << 8) + | ||
// static_cast<uint16_t>(*(payload_.first + 4))); | ||
// return static_cast<double>(v) / 10.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.
Remove commented-out code.
vesc_driver/src/vesc_packet.cpp
Outdated
// if (mask_ & ((uint32_t)1 << 13)) {q1_ = getFloat32Auto(&ind);} | ||
// if (mask_ & ((uint32_t)1 << 14)) {q2_ = getFloat32Auto(&ind);} | ||
// if (mask_ & ((uint32_t)1 << 15)) {q3_ = getFloat32Auto(&ind);} | ||
// } |
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.
Remove commented-out code.
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.
Will do a code cleanup and push the updates!
vesc_msgs/package.xml
Outdated
<exec_depend>message_runtime</exec_depend> | ||
<exec_depend>geometry_msgs</exec_depend> |
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.
No need to split out.
if (!getRequiredParam(nh, "steering_angle_to_servo_gain", &steering_to_servo_gain_)) | ||
return; | ||
if (!getRequiredParam(nh, "steering_angle_to_servo_offset", &steering_to_servo_offset_)) | ||
if (!getRequiredParam(nh, "steering_angle_to_servo_offset", steering_to_servo_offset_)) |
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.
Several of these changes are breaking changes (removing existing parameters and renaming others). This means a new major version would have to be released. Not that I won't do it, just giving you a heads-up.
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 will take a closer look and run some fixes for the noetic branch!
Thanks for the feedback! Very helpful to have another set of eyes on the code!
Update: I am not sure how to go about creating a new branch in the base repo - could you help me out with that by creating a new branch named noetic from main and pushing it upsteam - so that I can edit the PR to merge into the new noetic branch? |
No description provided.