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

CAN IDs of 0x18FFFFFF not showing up in candump #478

Open
a-stana opened this issue Jun 26, 2023 · 0 comments
Open

CAN IDs of 0x18FFFFFF not showing up in candump #478

a-stana opened this issue Jun 26, 2023 · 0 comments

Comments

@a-stana
Copy link

a-stana commented Jun 26, 2023

Sorry if this is the wrong place to ask this question but I've been searching the web and haven't found any answers. Basically, I have a C++ code that generates CAN messages for my application. The correct ID to publish would be 0x18FFFFFF. However, generating this ID in my code does not produce any output in the candump. I need to generate the ID as 0x98FFFFFFFF to see the message displayed correctly in the candump.

As the devices I am communicating with use the j1939 protocol, I need to send the messages (0x18FFFFFFFF) generating the priority value of 6 in bit 28-26, hence 0x18. I don't know if the protocol is responsible for the miscommunication, but I assume it's not because the candump is not bound to protocols directly, it just puts out raw messages, right?

I am using a PEAK_USB as an interface coupled with ROS noetic running on Ubuntu 20.04 LTS and I guess I am relying on socket_can at system level, msgs::can in ROS and this C++ code snippet:
`
//can message
can_msg.id = 0x98FFFFFFFFFF // 0x98FFFFFFFFFFFF instead of 0x18FFFFFFFFFFFFFF to get the correct output in the dump
can_msg.length = 8;
can_msg.flags = 0x00;
can_msg.cob = 0x00;
//data
can_msg.data[0] = 0x00;
can_msg.data[1] = 0x01;
can_msg.data[2] = 0x02;
can_msg.data[3] = 0x00;
can_msg.data[4] = 0x00;
can_msg.data[5] = 0x00;
can_msg.data[6] = 0x00;
can_msg.data[7] = 0x00;

can_tx_pub.publish(can_msg); // inline void ros::Publisher::publishmsgs::can(const msgs::can &message) const
`
I was given this project by a colleague at university, I'm relatively new to ROS and C++ and don't know where to look for conversion errors or problems or basically what to do to find out what's happening. I would really appreciate any help or advice.

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

1 participant