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

Ported the ROS2 fox drivers to ROS1 Noetic #37

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

VineetTambe
Copy link

No description provided.

@JWhitleyWork
Copy link
Collaborator

It looks like the CHANGELOG.rst files and copyright/license headers were deleted. Please restore these.

Copy link
Member

@hzheng40 hzheng40 left a 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/package.xml Outdated Show resolved Hide resolved
Copy link
Member

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it.

@hzheng40
Copy link
Member

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?
Also, I would remove all the madgwick filter related code since that's not necessary for publishing the IMU msg.

@VineetTambe
Copy link
Author

VineetTambe commented Apr 11, 2023

In the case of this noetic branch -
The vesc_driver still publishes the imu message as published by the original package (no change there).
The separate wrapper is to convert the vesc_imu_msg to the standard sensor_msgs::Imu structure in order for the madgwick filter to consume it.
I will remove those from the repo and keep them in a separate custom branch on my fork.

@VineetTambe
Copy link
Author

Additionally, I wanted to ask can we update our names in the list of authors in the package.xml?

@VineetTambe
Copy link
Author

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.

@VineetTambe
Copy link
Author

Following up on this.
Could you let me know if the changes are acceptable??
Or if any other changes are necessary?

<exec_depend>geometry_msgs</exec_depend>
<exec_depend>tf</exec_depend>
<exec_depend>ackermann_msgs</exec_depend>
<exec_depend>vesc_msgs</exec_depend>
Copy link
Collaborator

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.

Copy link
Author

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="" /> -->
Copy link
Collaborator

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.

<exec_depend>roscpp</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>vesc_msgs</exec_depend>
<exec_depend>serial</exec_depend>
Copy link
Collaborator

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?

@@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code.

// 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();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code.

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

Copy link
Collaborator

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.

Copy link
Author

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!

// 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;
// }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code.

// 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);}
// }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code.

Copy link
Author

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!

<exec_depend>message_runtime</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
Copy link
Collaborator

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_))
Copy link
Collaborator

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.

Copy link
Author

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!

@VineetTambe
Copy link
Author

VineetTambe commented Aug 23, 2023

Update:
I have resolved all the concerns highlighted and the Branch should be good to go.
However, instead of merging into "'main" I propose creating a new "noetic" branch.
This should prevent any breaking changes as highlighted here from causing any problems to others!

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?

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.

4 participants